Commit 9123df32 authored by Wai Yi Leung's avatar Wai Yi Leung
Browse files

Make better use of the File object, let the file object concat the paths for me

parent df55de18
......@@ -80,7 +80,7 @@ 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) {
......@@ -88,9 +88,10 @@ class ConiferPipeline(val root: Configurable) extends QScript with BiopetQScript
var refRPKMlist: List[File] = Nil
// Sync the .txt only, these files contain the RPKM Values
for (controlRPKMfile <- controlsDir.list.filter(_.toLowerCase.endsWith(".txt"))) {
val target = new File(RPKMdir + File.separator + controlRPKMfile.getName)
val source = new File(controlsDir + File.separator + controlRPKMfile)
if (!target.exists()) {
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)) {
......@@ -104,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