Commit 4731b21d authored by bow's avatar bow
Browse files

Merge branch 'patch_coniferfix' into 'develop'

Patch coniferfix

There was a bug in reading files from the RPKM ref directory.

Now filters to *.txt and the .out file is now created as a hidden file (for inprocess runs we need to overrride this)

Reporter: Gijs Santen,
Fix: Wai Yi Leung

See merge request !93
parents bec375ba 9123df32
......@@ -35,6 +35,12 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
var relative: Boolean = true
override def freezeFieldValues(): Unit = {
val outLog: String = ".%s.%s.out".format(out.getName, analysisName)
jobOutputFile = new File(out.getAbsoluteFile.getParentFile, outLog)
super.freezeFieldValues()
}
lazy val cmd: String = {
lazy val inCanonical: String = {
// need to remove "/~" to correctly expand path with tilde
......
......@@ -15,7 +15,7 @@
*/
package nl.lumc.sasc.biopet.pipelines.kopisu
import java.io.{ BufferedWriter, FileWriter, File }
import java.io.{ FileFilter, BufferedWriter, FileWriter, File }
import nl.lumc.sasc.biopet.core.{ PipelineCommand, _ }
import nl.lumc.sasc.biopet.core.config._
......@@ -80,17 +80,23 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
val coniferRPKM = new ConiferRPKM(this)
coniferRPKM.bamFile = this.inputBam.getAbsoluteFile
coniferRPKM.probes = this.probeFile
coniferRPKM.output = new File(RPKMdir + File.separator + input2RPKM(inputBam))
coniferRPKM.output = new File(RPKMdir, input2RPKM(inputBam))
add(coniferRPKM)
if (!RPKMonly) {
/** Collect the rpkm_output to a temp directory, where we merge with the control files */
var refRPKMlist: List[File] = Nil
for (f <- controlsDir.listFiles()) {
var target = new File(RPKMdir + File.separator + f.getName)
if (!target.exists()) {
logger.info("Creating " + target.getAbsolutePath)
add(Ln(this, f, target, true))
// Sync the .txt only, these files contain the RPKM Values
for (controlRPKMfile <- controlsDir.list.filter(_.toLowerCase.endsWith(".txt"))) {
val target = new File(RPKMdir, controlRPKMfile)
val source = new File(controlsDir, controlRPKMfile)
if (!target.exists) {
add(Ln(this, source, target, false))
refRPKMlist :+= target
} else if (!target.equals(source)) {
target.delete()
add(Ln(this, source, target, false))
refRPKMlist :+= target
}
}
......@@ -99,18 +105,18 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
coniferAnalyze.deps = List(coniferRPKM.output) ++ refRPKMlist
coniferAnalyze.probes = this.probeFile
coniferAnalyze.rpkmDir = RPKMdir
coniferAnalyze.output = new File(sampleDir + File.separator + input2HDF5(inputBam))
coniferAnalyze.output = new File(sampleDir, input2HDF5(inputBam))
add(coniferAnalyze)
val coniferCall = new ConiferCall(this)
coniferCall.input = coniferAnalyze.output
coniferCall.output = new File(sampleDir + File.separator + "calls.txt")
coniferCall.output = new File(sampleDir, "calls.txt")
add(coniferCall)
summary.deps = List(coniferCall.output)
summary.label = sampleLabel
summary.calls = coniferCall.output
summary.out = new File(sampleDir + File.separator + input2Calls(inputBam))
summary.out = new File(sampleDir, input2Calls(inputBam))
add(summary)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment