Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,12 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable { ...@@ -35,6 +35,12 @@ class Ln(val root: Configurable) extends InProcessFunction with Configurable {
var relative: Boolean = true 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 cmd: String = {
lazy val inCanonical: String = { lazy val inCanonical: String = {
// need to remove "/~" to correctly expand path with tilde // need to remove "/~" to correctly expand path with tilde
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
*/ */
package nl.lumc.sasc.biopet.pipelines.kopisu 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.{ PipelineCommand, _ }
import nl.lumc.sasc.biopet.core.config._ import nl.lumc.sasc.biopet.core.config._
...@@ -80,17 +80,23 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript ...@@ -80,17 +80,23 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
val coniferRPKM = new ConiferRPKM(this) val coniferRPKM = new ConiferRPKM(this)
coniferRPKM.bamFile = this.inputBam.getAbsoluteFile coniferRPKM.bamFile = this.inputBam.getAbsoluteFile
coniferRPKM.probes = this.probeFile coniferRPKM.probes = this.probeFile
coniferRPKM.output = new File(RPKMdir + File.separator + input2RPKM(inputBam)) coniferRPKM.output = new File(RPKMdir, input2RPKM(inputBam))
add(coniferRPKM) add(coniferRPKM)
if (!RPKMonly) { if (!RPKMonly) {
/** Collect the rpkm_output to a temp directory, where we merge with the control files */ /** Collect the rpkm_output to a temp directory, where we merge with the control files */
var refRPKMlist: List[File] = Nil var refRPKMlist: List[File] = Nil
for (f <- controlsDir.listFiles()) { // Sync the .txt only, these files contain the RPKM Values
var target = new File(RPKMdir + File.separator + f.getName) for (controlRPKMfile <- controlsDir.list.filter(_.toLowerCase.endsWith(".txt"))) {
if (!target.exists()) { val target = new File(RPKMdir, controlRPKMfile)
logger.info("Creating " + target.getAbsolutePath) val source = new File(controlsDir, controlRPKMfile)
add(Ln(this, f, target, true))
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 refRPKMlist :+= target
} }
} }
...@@ -99,18 +105,18 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript ...@@ -99,18 +105,18 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
coniferAnalyze.deps = List(coniferRPKM.output) ++ refRPKMlist coniferAnalyze.deps = List(coniferRPKM.output) ++ refRPKMlist
coniferAnalyze.probes = this.probeFile coniferAnalyze.probes = this.probeFile
coniferAnalyze.rpkmDir = RPKMdir coniferAnalyze.rpkmDir = RPKMdir
coniferAnalyze.output = new File(sampleDir + File.separator + input2HDF5(inputBam)) coniferAnalyze.output = new File(sampleDir, input2HDF5(inputBam))
add(coniferAnalyze) add(coniferAnalyze)
val coniferCall = new ConiferCall(this) val coniferCall = new ConiferCall(this)
coniferCall.input = coniferAnalyze.output coniferCall.input = coniferAnalyze.output
coniferCall.output = new File(sampleDir + File.separator + "calls.txt") coniferCall.output = new File(sampleDir, "calls.txt")
add(coniferCall) add(coniferCall)
summary.deps = List(coniferCall.output) summary.deps = List(coniferCall.output)
summary.label = sampleLabel summary.label = sampleLabel
summary.calls = coniferCall.output summary.calls = coniferCall.output
summary.out = new File(sampleDir + File.separator + input2Calls(inputBam)) summary.out = new File(sampleDir, input2Calls(inputBam))
add(summary) add(summary)
} }
......
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