Commit 00a24e74 authored by Peter van 't Hof's avatar Peter van 't Hof
Browse files

Fix missing name refactorings

parent c2ef1e2e
...@@ -265,8 +265,8 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu ...@@ -265,8 +265,8 @@ class VariantEffectPredictor(val root: Configurable) extends BiopetCommandLineFu
def summaryStats: Map[String, Any] = { def summaryStats: Map[String, Any] = {
if (statsText) { if (statsText) {
val stats_file: File = new File(output.getAbsolutePath + "_summary.txt") val statsFile: File = new File(output.getAbsolutePath + "_summary.txt")
parseStatsFile(stats_file) parseStatsFile(statsFile)
} else { } else {
Map() Map()
} }
......
...@@ -102,85 +102,45 @@ class VcfFilterTest extends TestNGSuite with Matchers { ...@@ -102,85 +102,45 @@ class VcfFilterTest extends TestNGSuite with Matchers {
val command = cmd(vcfFilter.cmdLine) val command = cmd(vcfFilter.cmdLine)
var cmdString: List[String] = Nil var cmdString: List[String] = Nil
if (minSampleDepth.isDefined) { if (minSampleDepth.isDefined) cmdString = "--minSampleDepth " + minSampleDepth.getOrElse("") :: cmdString
cmdString = "--minSampleDepth " + minSampleDepth.getOrElse("") :: cmdString
}
if (minTotalDepth.isDefined) { if (minTotalDepth.isDefined) cmdString = "--minTotalDepth " + minTotalDepth.getOrElse("") :: cmdString
cmdString = "--minTotalDepth " + minTotalDepth.getOrElse("") :: cmdString
}
if (minAlternateDepth.isDefined) { if (minAlternateDepth.isDefined) cmdString = "--minAlternateDepth " + minAlternateDepth.getOrElse("") :: cmdString
cmdString = "--minAlternateDepth " + minAlternateDepth.getOrElse("") :: cmdString
}
if (minSamplesPass.isDefined) { if (minSamplesPass.isDefined) cmdString = "--minSamplesPass " + minSamplesPass.getOrElse("") :: cmdString
cmdString = "--minSamplesPass " + minSamplesPass.getOrElse("") :: cmdString
}
if (minGenomeQuality.isDefined) { if (minGenomeQuality.isDefined) cmdString = "--minGenomeQuality " + minGenomeQuality.getOrElse("") :: cmdString
cmdString = "--minGenomeQuality " + minGenomeQuality.getOrElse("") :: cmdString
}
if (filterRefCalls) { if (filterRefCalls) cmdString = "--filterRefCalls" :: cmdString
cmdString = "--filterRefCalls" :: cmdString
}
if (invertedOutputVcf.isDefined) { if (invertedOutputVcf.isDefined) cmdString = "--invertedOutputVcf " + invertedOutputVcf.getOrElse(new File("")).getAbsolutePath :: cmdString
cmdString = "--invertedOutputVcf " + invertedOutputVcf.getOrElse(new File("")).getAbsolutePath :: cmdString
}
if (resToDom.isDefined) { if (resToDom.isDefined) cmdString = "--resToDom " + resToDom.getOrElse("") :: cmdString
cmdString = "--resToDom " + resToDom.getOrElse("") :: cmdString
}
if (trioCompound.isDefined) { if (trioCompound.isDefined) cmdString = "--trioCompound " + trioCompound.getOrElse("") :: cmdString
cmdString = "--trioCompound " + trioCompound.getOrElse("") :: cmdString
}
if (deNovoInSample.isDefined) { if (deNovoInSample.isDefined) cmdString = "--deNovoInSample " + deNovoInSample.getOrElse("") :: cmdString
cmdString = "--deNovoInSample " + deNovoInSample.getOrElse("") :: cmdString
}
if (deNovoTrio.isDefined) { if (deNovoTrio.isDefined) cmdString = "--deNovoTrio " + deNovoTrio.getOrElse("") :: cmdString
cmdString = "--deNovoTrio " + deNovoTrio.getOrElse("") :: cmdString
}
if (trioLossOfHet.isDefined) { if (trioLossOfHet.isDefined) cmdString = "--trioLossOfHet " + trioLossOfHet.getOrElse("") :: cmdString
cmdString = "--trioLossOfHet " + trioLossOfHet.getOrElse("") :: cmdString
}
if (mustHaveVariant.nonEmpty) { if (mustHaveVariant.nonEmpty) cmdString = mustHaveVariant.map(x => "--mustHaveVariant " + x) ::: cmdString
cmdString = mustHaveVariant.map(x => "--mustHaveVariant " + x) ::: cmdString
}
if (calledIn.nonEmpty) { if (calledIn.nonEmpty) cmdString = calledIn.map(x => "--calledIn " + x) ::: cmdString
cmdString = calledIn.map(x => "--calledIn " + x) ::: cmdString
}
if (mustHaveGenotype.nonEmpty) { if (mustHaveGenotype.nonEmpty) cmdString = mustHaveGenotype.map(x => "--mustHaveGenotype " + x) ::: cmdString
cmdString = mustHaveGenotype.map(x => "--mustHaveGenotype " + x) ::: cmdString
}
if (diffGenotype.nonEmpty) { if (diffGenotype.nonEmpty) cmdString = diffGenotype.map(x => "--diffGenotype " + x) ::: cmdString
cmdString = diffGenotype.map(x => "--diffGenotype " + x) ::: cmdString
}
if (filterHetVarToHomVar.nonEmpty) { if (filterHetVarToHomVar.nonEmpty) cmdString = filterHetVarToHomVar.map(x => "--filterHetVarToHomVar " + x) ::: cmdString
cmdString = filterHetVarToHomVar.map(x => "--filterHetVarToHomVar " + x) ::: cmdString
}
if (id.nonEmpty) { if (id.nonEmpty) cmdString = id.map(x => "--id " + x) ::: cmdString
cmdString = id.map(x => "--id " + x) ::: cmdString
}
if (idFile.isDefined) { if (idFile.isDefined) cmdString = "--idFile " + idFile.getOrElse(new File("")).getAbsolutePath :: cmdString
cmdString = "--idFile " + idFile.getOrElse(new File("")).getAbsolutePath :: cmdString
}
if (minQualScore.isDefined) { if (minQualScore.isDefined) cmdString = "--minQualScore " + minQualScore.getOrElse("") :: cmdString
cmdString = "--minQualScore " + minQualScore.getOrElse("") :: cmdString
}
cmdString.foreach(x => command.contains(x) shouldBe true) cmdString.foreach(x => command.contains(x) shouldBe true)
} }
......
...@@ -34,25 +34,25 @@ class AnnotateVcfWithBedTest extends TestNGSuite with MockitoSugar with Matchers ...@@ -34,25 +34,25 @@ class AnnotateVcfWithBedTest extends TestNGSuite with MockitoSugar with Matchers
Paths.get(getClass.getResource(p).toURI).toString Paths.get(getClass.getResource(p).toURI).toString
} }
val vepped_path = resourcePath("/VEP_oneline.vcf") val veppedPath = resourcePath("/VEP_oneline.vcf")
val bed = resourcePath("/rrna01.bed") val bed = resourcePath("/rrna01.bed")
val rand = new Random() val rand = new Random()
@Test def testOutputTypeVcf() = { @Test def testOutputTypeVcf() = {
val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf" val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf"
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmpPath, "-B", bed, "-f", "testing") val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath, "-B", bed, "-f", "testing")
main(arguments) main(arguments)
} }
@Test def testOutputTypeBcf() = { @Test def testOutputTypeBcf() = {
val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".bcf" val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".bcf"
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmpPath, "-B", bed, "-f", "testing") val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath, "-B", bed, "-f", "testing")
main(arguments) main(arguments)
} }
@Test def testOutputTypeVcfGz() = { @Test def testOutputTypeVcfGz() = {
val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf.gz" val tmpPath = "/tmp/VcfFilter_" + rand.nextString(10) + ".vcf.gz"
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmpPath, "-B", bed, "-f", "testing") val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath, "-B", bed, "-f", "testing")
main(arguments) main(arguments)
} }
......
...@@ -37,7 +37,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -37,7 +37,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers {
Paths.get(getClass.getResource(p).toURI).toString Paths.get(getClass.getResource(p).toURI).toString
} }
val vepped_path = resourcePath("/chrQ.vcf.gz") val veppedPath = resourcePath("/chrQ.vcf.gz")
val reference = resourcePath("/fake_chrQ.fa") val reference = resourcePath("/fake_chrQ.fa")
// These two have to created // These two have to created
...@@ -52,7 +52,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -52,7 +52,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers {
val tmp = File.createTempFile("MergeAlleles", ".vcf") val tmp = File.createTempFile("MergeAlleles", ".vcf")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmpPath = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments = Array("-I", vepped_path, "-o", tmpPath, "-R", reference) val arguments = Array("-I", veppedPath, "-o", tmpPath, "-R", reference)
main(arguments) main(arguments)
} }
...@@ -60,7 +60,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -60,7 +60,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers {
val tmp = File.createTempFile("MergeAlleles", ".vcf.gz") val tmp = File.createTempFile("MergeAlleles", ".vcf.gz")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmpPath = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments = Array("-I", vepped_path, "-o", tmpPath, "-R", reference) val arguments = Array("-I", veppedPath, "-o", tmpPath, "-R", reference)
main(arguments) main(arguments)
} }
...@@ -68,7 +68,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -68,7 +68,7 @@ class MergeAllelesTest extends TestNGSuite with MockitoSugar with Matchers {
val tmp = File.createTempFile("MergeAlleles", ".bcf") val tmp = File.createTempFile("MergeAlleles", ".bcf")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmpPath = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments = Array("-I", vepped_path, "-o", tmpPath, "-R", reference) val arguments = Array("-I", veppedPath, "-o", tmpPath, "-R", reference)
main(arguments) main(arguments)
} }
} }
...@@ -39,31 +39,31 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -39,31 +39,31 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers {
Paths.get(getClass.getResource(p).toURI).toString Paths.get(getClass.getResource(p).toURI).toString
} }
val vepped_path = resourcePath("/VEP_oneline.vcf") val veppedPath = resourcePath("/VEP_oneline.vcf")
val vepped = new File(vepped_path) val vepped = new File(veppedPath)
val rand = new Random() val rand = new Random()
@Test def testOutputTypeVcf() = { @Test def testOutputTypeVcf() = {
val tmp = File.createTempFile("VcfFilter", ".vcf") val tmp = File.createTempFile("VcfFilter", ".vcf")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmp_path = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath)
main(arguments) main(arguments)
} }
@Test def testOutputTypeBcf() = { @Test def testOutputTypeBcf() = {
val tmp = File.createTempFile("VcfFilter", ".bcf") val tmp = File.createTempFile("VcfFilter", ".bcf")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmp_path = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath)
main(arguments) main(arguments)
} }
@Test def testOutputTypeVcfGz() = { @Test def testOutputTypeVcfGz() = {
val tmp = File.createTempFile("VcfFilter", ".vcf.gz") val tmp = File.createTempFile("VcfFilter", ".vcf.gz")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmp_path = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path) val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath)
main(arguments) main(arguments)
} }
...@@ -73,22 +73,22 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers { ...@@ -73,22 +73,22 @@ class VcfFilterTest extends TestNGSuite with MockitoSugar with Matchers {
*/ */
val tmp = File.createTempFile("VCfFilter", ".vcf.gz") val tmp = File.createTempFile("VCfFilter", ".vcf.gz")
tmp.deleteOnExit() tmp.deleteOnExit()
val tmp_path = tmp.getAbsolutePath val tmpPath = tmp.getAbsolutePath
val arguments: Array[String] = Array("-I", vepped_path, "-o", tmp_path, val arguments: Array[String] = Array("-I", veppedPath, "-o", tmpPath,
"--mustHaveGenotype", "Sample_101:HET") "--mustHaveGenotype", "Sample_101:HET")
main(arguments) main(arguments)
val size = new VCFFileReader(new File(tmp_path), false).size val size = new VCFFileReader(new File(tmpPath), false).size
size shouldBe 1 size shouldBe 1
val tmp2 = File.createTempFile("VcfFilter", ".vcf.gz") val tmp2 = File.createTempFile("VcfFilter", ".vcf.gz")
tmp2.deleteOnExit() tmp2.deleteOnExit()
val tmp2_path = tmp2.getAbsolutePath val tmpPath2 = tmp2.getAbsolutePath
val arguments2: Array[String] = Array("-I", vepped_path, "-o", tmp2_path, val arguments2: Array[String] = Array("-I", veppedPath, "-o", tmpPath2,
"--mustHaveGenotype", "Sample_101:HOM_VAR") "--mustHaveGenotype", "Sample_101:HOM_VAR")
main(arguments2) main(arguments2)
val size2 = new VCFFileReader(new File(tmp2_path), false).size val size2 = new VCFFileReader(new File(tmpPath2), false).size
size2 shouldBe 0 size2 shouldBe 0
} }
......
...@@ -31,7 +31,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -31,7 +31,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
var inputR1: File = _ var inputR1: File = _
@Input(doc = "R2 fastq file (gzipped allowed)", shortName = "R2", required = false) @Input(doc = "R2 fastq file (gzipped allowed)", shortName = "R2", required = false)
var input_R2: Option[File] = None var inputR2: Option[File] = None
/** Skip Trim fastq files */ /** Skip Trim fastq files */
var skipTrim: Boolean = config("skip_trim", default = false) var skipTrim: Boolean = config("skip_trim", default = false)
...@@ -48,13 +48,13 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -48,13 +48,13 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
/** Returns files to store in summary */ /** Returns files to store in summary */
def summaryFiles: Map[String, File] = { def summaryFiles: Map[String, File] = {
Map("input_R1" -> inputR1, "output_R1" -> fastqR1Qc) ++ Map("input_R1" -> inputR1, "output_R1" -> fastqR1Qc) ++
(if (paired) Map("input_R2" -> input_R2.get, "output_R2" -> fastqR2Qc.get) else Map()) (if (paired) Map("input_R2" -> inputR2.get, "output_R2" -> fastqR2Qc.get) else Map())
} }
/** returns settings to store in summary */ /** returns settings to store in summary */
def summarySettings = Map("skip_trim" -> skipTrim, "skip_clip" -> skipClip, "paired" -> paired) def summarySettings = Map("skip_trim" -> skipTrim, "skip_clip" -> skipClip, "paired" -> paired)
var paired: Boolean = input_R2.isDefined var paired: Boolean = inputR2.isDefined
var R1Name: String = _ var R1Name: String = _
var R2Name: String = _ var R2Name: String = _
...@@ -80,13 +80,13 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -80,13 +80,13 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
require(sampleId != null, "Missing sample ID on flexiprep module") require(sampleId != null, "Missing sample ID on flexiprep module")
require(libId != null, "Missing library ID on flexiprep module") require(libId != null, "Missing library ID on flexiprep module")
paired = input_R2.isDefined paired = inputR2.isDefined
inputFiles :+= new InputFile(inputR1) inputFiles :+= new InputFile(inputR1)
input_R2.foreach(inputFiles :+= new InputFile(_)) inputR2.foreach(inputFiles :+= new InputFile(_))
R1Name = getUncompressedFileName(inputR1) R1Name = getUncompressedFileName(inputR1)
input_R2.foreach { fileR2 => inputR2.foreach { fileR2 =>
paired = true paired = true
R2Name = getUncompressedFileName(fileR2) R2Name = getUncompressedFileName(fileR2)
} }
...@@ -96,7 +96,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -96,7 +96,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
def biopetScript() { def biopetScript() {
runInitialJobs() runInitialJobs()
if (paired) runTrimClip(inputR1, input_R2, outputDir) if (paired) runTrimClip(inputR1, inputR2, outputDir)
else runTrimClip(inputR1, outputDir) else runTrimClip(inputR1, outputDir)
val R1Files = for ((k, v) <- outputFiles if k.endsWith("output_R1")) yield v val R1Files = for ((k, v) <- outputFiles if k.endsWith("output_R1")) yield v
...@@ -107,7 +107,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -107,7 +107,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
/** Add init non chunkable jobs */ /** Add init non chunkable jobs */
def runInitialJobs() { def runInitialJobs() {
outputFiles += ("fastq_input_R1" -> inputR1) outputFiles += ("fastq_input_R1" -> inputR1)
if (paired) outputFiles += ("fastq_input_R2" -> input_R2.get) if (paired) outputFiles += ("fastq_input_R2" -> inputR2.get)
fastqcR1 = Fastqc(this, inputR1, new File(outputDir, R1Name + ".fastqc/")) fastqcR1 = Fastqc(this, inputR1, new File(outputDir, R1Name + ".fastqc/"))
add(fastqcR1) add(fastqcR1)
...@@ -116,7 +116,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -116,7 +116,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
val validateFastq = new ValidateFastq(this) val validateFastq = new ValidateFastq(this)
validateFastq.r1Fastq = inputR1 validateFastq.r1Fastq = inputR1
validateFastq.r2Fastq = input_R2 validateFastq.r2Fastq = inputR2
validateFastq.jobOutputFile = new File(outputDir, ".validate_fastq.log.out") validateFastq.jobOutputFile = new File(outputDir, ".validate_fastq.log.out")
add(validateFastq) add(validateFastq)
...@@ -128,7 +128,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -128,7 +128,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
} }
if (paired) { if (paired) {
fastqcR2 = Fastqc(this, input_R2.get, new File(outputDir, R2Name + ".fastqc/")) fastqcR2 = Fastqc(this, inputR2.get, new File(outputDir, R2Name + ".fastqc/"))
add(fastqcR2) add(fastqcR2)
addSummarizable(fastqcR2, "fastqc_R2") addSummarizable(fastqcR2, "fastqc_R2")
outputFiles += ("fastqc_R2" -> fastqcR2.output) outputFiles += ("fastqc_R2" -> fastqcR2.output)
...@@ -140,7 +140,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with ...@@ -140,7 +140,7 @@ class Flexiprep(val root: Configurable) extends QScript with SummaryQScript with
addSummarizable(seqstatR1, "seqstat_R1") addSummarizable(seqstatR1, "seqstat_R1")
if (paired) { if (paired) {
val seqstatR2 = SeqStat(this, input_R2.get, outputDir) val seqstatR2 = SeqStat(this, inputR2.get, outputDir)
seqstatR2.isIntermediate = true seqstatR2.isIntermediate = true
add(seqstatR2) add(seqstatR2)
addSummarizable(seqstatR2, "seqstat_R2") addSummarizable(seqstatR2, "seqstat_R2")
......
...@@ -71,7 +71,7 @@ class FlexiprepTest extends TestNGSuite with Matchers { ...@@ -71,7 +71,7 @@ class FlexiprepTest extends TestNGSuite with Matchers {
val flexiprep: Flexiprep = initPipeline(map) val flexiprep: Flexiprep = initPipeline(map)
flexiprep.inputR1 = (if (zipped) FlexiprepTest.r1Zipped else FlexiprepTest.r1) flexiprep.inputR1 = (if (zipped) FlexiprepTest.r1Zipped else FlexiprepTest.r1)
if (paired) flexiprep.input_R2 = Some((if (zipped) FlexiprepTest.r2Zipped else FlexiprepTest.r2)) if (paired) flexiprep.inputR2 = Some((if (zipped) FlexiprepTest.r2Zipped else FlexiprepTest.r2))
flexiprep.sampleId = Some("1") flexiprep.sampleId = Some("1")
flexiprep.libId = Some("1") flexiprep.libId = Some("1")
flexiprep.script() flexiprep.script()
......
...@@ -98,7 +98,7 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs ...@@ -98,7 +98,7 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
flexiprep.sampleId = Some(sampleId) flexiprep.sampleId = Some(sampleId)
flexiprep.libId = Some(libId) flexiprep.libId = Some(libId)
flexiprep.inputR1 = config("R1") flexiprep.inputR1 = config("R1")
flexiprep.input_R2 = config("R2") flexiprep.inputR2 = config("R2")
flexiprep.outputDir = new File(libDir, "flexiprep") flexiprep.outputDir = new File(libDir, "flexiprep")
lazy val gs = new GearsSingle(qscript) lazy val gs = new GearsSingle(qscript)
...@@ -109,7 +109,7 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs ...@@ -109,7 +109,7 @@ class Gears(val root: Configurable) extends QScript with MultiSampleQScript { qs
/** Function that add library jobs */ /** Function that add library jobs */
protected def addJobs(): Unit = { protected def addJobs(): Unit = {
inputFiles :+= InputFile(flexiprep.inputR1, config("R1_md5")) inputFiles :+= InputFile(flexiprep.inputR1, config("R1_md5"))
flexiprep.input_R2.foreach(inputFiles :+= InputFile(_, config("R2_md5"))) flexiprep.inputR2.foreach(inputFiles :+= InputFile(_, config("R2_md5")))
add(flexiprep) add(flexiprep)
gs.fastqR1 = Some(flexiprep.fastqR1Qc) gs.fastqR1 = Some(flexiprep.fastqR1Qc)
......
...@@ -80,7 +80,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi ...@@ -80,7 +80,7 @@ class GearsSingle(val root: Configurable) extends QScript with SummaryQScript wi
if (!skipFlexiprep) { if (!skipFlexiprep) {
val flexiprep = new Flexiprep(this) val flexiprep = new Flexiprep(this)
flexiprep.inputR1 = r1 flexiprep.inputR1 = r1
flexiprep.input_R2 = r2 flexiprep.inputR2 = r2
flexiprep.outputDir = new File(outputDir, "flexiprep") flexiprep.outputDir = new File(outputDir, "flexiprep")
add(flexiprep) add(flexiprep)
(flexiprep.fastqR1Qc, flexiprep.fastqR2Qc) (flexiprep.fastqR1Qc, flexiprep.fastqR2Qc)
......
...@@ -167,7 +167,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S ...@@ -167,7 +167,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
if (!skipFlexiprep) { if (!skipFlexiprep) {
flexiprep.outputDir = new File(outputDir, "flexiprep") flexiprep.outputDir = new File(outputDir, "flexiprep")
flexiprep.inputR1 = inputR1 flexiprep.inputR1 = inputR1
flexiprep.input_R2 = inputR2 flexiprep.inputR2 = inputR2
flexiprep.sampleId = this.sampleId flexiprep.sampleId = this.sampleId
flexiprep.libId = this.libId flexiprep.libId = this.libId
flexiprep.init() flexiprep.init()
...@@ -184,7 +184,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S ...@@ -184,7 +184,7 @@ class Mapping(val root: Configurable) extends QScript with SummaryQScript with S
if (paired) Some(new File(chunkDir, inputR2.get.getName)) else None) if (paired) Some(new File(chunkDir, inputR2.get.getName)) else None)
}).toMap }).toMap
else if (skipFlexiprep) Map(outputDir -> (inputR1, if (paired) inputR2 else None)) else if (skipFlexiprep) Map(outputDir -> (inputR1, if (paired) inputR2 else None))
else Map(outputDir -> (flexiprep.inputR1, flexiprep.input_R2)) else Map(outputDir -> (flexiprep.inputR1, flexiprep.inputR2))
} }
if (chunking) {