Commit 80e8742a authored by Peter van 't Hof's avatar Peter van 't Hof

Only suply bqsr files when printreads is not executed

parent cb17d470
...@@ -50,6 +50,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra ...@@ -50,6 +50,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
"unifiedgenotyper" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0) "unifiedgenotyper" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0)
) )
lazy val usePrintReads: Boolean = config("use_printreads", default = true)
/** Method to make the variantcalling namespace of shiva */ /** Method to make the variantcalling namespace of shiva */
def makeVariantcalling(multisample: Boolean, def makeVariantcalling(multisample: Boolean,
sample: Option[String] = None, sample: Option[String] = None,
...@@ -94,7 +96,6 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra ...@@ -94,7 +96,6 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
logger.warn("No Known site found, skipping base recalibration, file: " + inputBam) logger.warn("No Known site found, skipping base recalibration, file: " + inputBam)
c && br.knownSites.nonEmpty c && br.knownSites.nonEmpty
} }
lazy val usePrintReads: Boolean = if (useBaseRecalibration) config("use_printreads", default = true) else false
lazy val useAnalyzeCovariates: Boolean = if (useBaseRecalibration) config("use_analyze_covariates", default = true) else false lazy val useAnalyzeCovariates: Boolean = if (useBaseRecalibration) config("use_analyze_covariates", default = true) else false
lazy val bqsrFile: Option[File] = if (useBaseRecalibration) Some(createFile("baserecal")) else None lazy val bqsrFile: Option[File] = if (useBaseRecalibration) Some(createFile("baserecal")) else None
...@@ -115,7 +116,6 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra ...@@ -115,7 +116,6 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
"library_variantcalling" -> variantcalling.isDefined, "library_variantcalling" -> variantcalling.isDefined,
"use_indel_realigner" -> useIndelRealigner, "use_indel_realigner" -> useIndelRealigner,
"use_base_recalibration" -> useBaseRecalibration, "use_base_recalibration" -> useBaseRecalibration,
"use_print_reads" -> usePrintReads,
"useAnalyze_covariates" -> useAnalyzeCovariates "useAnalyze_covariates" -> useAnalyzeCovariates
) )
...@@ -242,7 +242,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra ...@@ -242,7 +242,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
multisampleVariantCalling.foreach(vc => { multisampleVariantCalling.foreach(vc => {
vc.outputDir = new File(outputDir, "variantcalling") vc.outputDir = new File(outputDir, "variantcalling")
vc.inputBams = samples.flatMap { case (sampleId, sample) => sample.preProcessBam.map(sampleId -> _) } vc.inputBams = samples.flatMap { case (sampleId, sample) => sample.preProcessBam.map(sampleId -> _) }
vc.inputBqsrFiles = samples.flatMap { case (sampleId, sample) => sample.bqsrFile.map(sampleId -> _) } if (!usePrintReads)
vc.inputBqsrFiles = samples.flatMap { case (sampleId, sample) => sample.bqsrFile.map(sampleId -> _) }
add(vc) add(vc)
annotation.foreach { toucan => annotation.foreach { toucan =>
...@@ -272,7 +273,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra ...@@ -272,7 +273,8 @@ class Shiva(val parent: Configurable) extends QScript with MultisampleMappingTra
"sv_calling" -> svCalling.isDefined, "sv_calling" -> svCalling.isDefined,
"cnv_calling" -> cnvCalling.isDefined, "cnv_calling" -> cnvCalling.isDefined,
"regions_of_interest" -> roiBedFiles.map(_.getName.stripSuffix(".bed")), "regions_of_interest" -> roiBedFiles.map(_.getName.stripSuffix(".bed")),
"amplicon_bed" -> ampliconBedFile.map(_.getName.stripSuffix(".bed")) "amplicon_bed" -> ampliconBedFile.map(_.getName.stripSuffix(".bed")),
"use_print_reads" -> usePrintReads
) )
/** Adds indel realignment jobs */ /** Adds indel realignment jobs */
......
Markdown is supported
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