Skip to content
Snippets Groups Projects
Commit 8a670218 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Update on the pipeline, streamline and minimize the required arguments taken from the commandline

parent 45776fbc
No related branches found
No related tags found
No related merge requests found
......@@ -39,30 +39,6 @@ class ConiferAnalyze(val root: Configurable) extends Conifer {
@Argument(doc = "Minimum population median RPKM per probe", required = false)
var min_rpkm: Option[Double] = config("min_rpkm")
override def afterGraph: Unit = {
super.afterGraph
//
// // create new RPKM_dir with the controls in it together with the subject
// new_rpkm_dir = new File(this.output.getParent() + File.separator + "rpkm_tmp")
// logger.info("Creating " + new_rpkm_dir.getAbsolutePath)
// new_rpkm_dir.mkdir()
//
// for (f <- rpkm_dir.listFiles()) {
// var target = new File(new_rpkm_dir + File.separator + f.getName)
// if (!target.exists()) {
// logger.info("Creating " + target.getAbsolutePath)
// Ln(this, f, target, true).run
// }
// }
// for (f <- rpkm_refdir.listFiles()) {
// var target = new File(new_rpkm_dir + File.separator + f.getName)
// if (!target.exists()) {
// logger.info("Creating " + target.getAbsolutePath)
// Ln(this, f, target, true).run
// }
// }
}
override def cmdLine = super.cmdLine +
" analyze " +
" --probes" + required(probes) +
......
......@@ -28,10 +28,6 @@ class ConiferCall(val root: Configurable) extends Conifer {
@Output(doc = "Output calls.txt", shortName = "out")
var output: File = _
override def afterGraph {
this.checkExecutable
}
override def cmdLine = super.cmdLine +
" call " +
" --input" + required(input) +
......
......@@ -84,7 +84,7 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
var target = new File(RPKMdir + File.separator + f.getName)
if (!target.exists()) {
logger.info("Creating " + target.getAbsolutePath)
add(Ln(this, f, target, false))
add(Ln(this, f, target, true))
refRPKMlist :+= target
}
}
......@@ -104,7 +104,7 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
summary.deps = List(coniferCall.output)
summary.label = sampleLabel
summary.calls = coniferCall.output
summary.out = input2Calls(inputBam)
summary.out = new File(sampleDir + File.separator + input2Calls(inputBam))
add(summary)
......
......@@ -26,10 +26,10 @@ import scala.io.Source
class ConiferSummary(val root: Configurable) extends InProcessFunction with Configurable {
def filterCalls(callFile: File, outFile: File, sampleName: String): Unit = {
val filename = callFile.getAbsolutePath
// val filename = callFile.getAbsolutePath
val writer = new BufferedWriter(new FileWriter(outFile))
for (line <- Source.fromFile(filename).getLines()) {
for (line <- Source.fromFile(callFile).getLines()) {
line.startsWith(sampleName) || line.startsWith("sampleID") match {
case true => writer.write(line)
case _ =>
......@@ -58,7 +58,7 @@ class ConiferSummary(val root: Configurable) extends InProcessFunction with Conf
override def run {
logger.debug("Start")
filterCalls(out, calls, label)
filterCalls(calls, out, label)
logger.debug("Stop")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment