Commit a0959af0 authored by Peter van 't Hof's avatar Peter van 't Hof

Move variantcallers to public

parent 8d6c71f8
/**
* Due to the license issue with GATK, this part of Biopet can only be used inside the
* LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions
* on how to use this protected part of biopet or contact us at sasc@lumc.nl
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.utils.config.Configurable
import nl.lumc.sasc.biopet.pipelines.basty.BastyTrait
import org.broadinstitute.gatk.queue.QScript
/**
* Basty pipeline including GATK steps
*
* Created by pjvan_thof on 3/4/15.
*/
class Basty(val root: Configurable) extends QScript with BastyTrait {
qscript =>
def this() = this(null)
override def variantcallers = List("unifiedgenotyper")
override lazy val shiva = new Shiva(qscript)
}
object Basty extends PipelineCommand
\ No newline at end of file
......@@ -7,7 +7,7 @@ package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.extensions.gatk.broad._
import nl.lumc.sasc.biopet.pipelines.shiva.ShivaTrait
import nl.lumc.sasc.biopet.pipelines.shiva.{ ShivaTrait, ShivaVariantcalling }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
......
/**
* Due to the license issue with GATK, this part of Biopet can only be used inside the
* LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions
* on how to use this protected part of biopet or contact us at sasc@lumc.nl
*/
package nl.lumc.sasc.biopet.pipelines.gatk
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.pipelines.gatk.variantcallers._
import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcallingTrait
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* ShivaVariantcalling with GATK variantcallers
*
* Created by pjvan_thof on 2/26/15.
*/
class ShivaVariantcalling(val root: Configurable) extends QScript with ShivaVariantcallingTrait {
qscript =>
def this() = this(null)
/** Will generate all available variantcallers */
override def callersList = {
new HaplotypeCallerGvcf(this) ::
new HaplotypeCallerAllele(this) ::
new UnifiedGenotyperAllele(this) ::
new UnifiedGenotyper(this) ::
new HaplotypeCaller(this) ::
super.callersList
}
}
/** object to add default main method to pipeline */
object ShivaVariantcalling extends PipelineCommand
\ No newline at end of file
......@@ -12,6 +12,7 @@ import nl.lumc.sasc.biopet.utils.config.Config
import nl.lumc.sasc.biopet.extensions.gatk.CombineVariants
import nl.lumc.sasc.biopet.extensions.gatk.broad.{ HaplotypeCaller, UnifiedGenotyper }
import nl.lumc.sasc.biopet.extensions.tools.{ MpileupToVcf, VcfFilter, VcfStats }
import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.apache.commons.io.FileUtils
import org.broadinstitute.gatk.queue.QSettings
......
......@@ -9,9 +9,7 @@ import nl.lumc.sasc.biopet.utils.{ BiopetExecutable, MainCommand }
object BiopetExecutableProtected extends BiopetExecutable {
def pipelines: List[MainCommand] = BiopetExecutablePublic.publicPipelines ::: List(
nl.lumc.sasc.biopet.pipelines.gatk.Shiva,
nl.lumc.sasc.biopet.pipelines.gatk.ShivaVariantcalling,
nl.lumc.sasc.biopet.pipelines.gatk.Basty)
nl.lumc.sasc.biopet.pipelines.gatk.Shiva)
def tools = BiopetExecutablePublic.tools
}
\ No newline at end of file
......@@ -13,19 +13,189 @@
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
/**
* Due to the license issue with GATK, this part of Biopet can only be used inside the
* LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions
* on how to use this protected part of biopet or contact us at sasc@lumc.nl
*/
package nl.lumc.sasc.biopet.pipelines.basty
import nl.lumc.sasc.biopet.core.PipelineCommand
import java.io.File
import nl.lumc.sasc.biopet.core.{ MultiSampleQScript, PipelineCommand }
import nl.lumc.sasc.biopet.extensions.{ Cat, Raxml, RunGubbins }
import nl.lumc.sasc.biopet.pipelines.shiva.{ Shiva, ShivaTrait }
import nl.lumc.sasc.biopet.extensions.tools.BastyGenerateFasta
import nl.lumc.sasc.biopet.utils.ConfigUtils
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Basty implementation without GATK parts
*
* Created by pjvan_thof on 3/4/15.
*/
class Basty(val root: Configurable) extends QScript with BastyTrait {
class Basty(val root: Configurable) extends QScript with MultiSampleQScript {
qscript =>
def this() = this(null)
case class FastaOutput(variants: File, consensus: File, consensusVariants: File)
def variantcallers = List("unifiedgenotyper")
override def defaults = Map(
"ploidy" -> 1,
"variantcallers" -> variantcallers
)
lazy val shiva: ShivaTrait = new Shiva(qscript)
def summaryFile: File = new File(outputDir, "Basty.summary.json")
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summarySettings: Map[String, Any] = Map()
def makeSample(id: String) = new Sample(id)
class Sample(sampleId: String) extends AbstractSample(sampleId) {
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summaryStats: Map[String, Any] = Map()
def makeLibrary(id: String) = new Library(id)
class Library(libId: String) extends AbstractLibrary(libId) {
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summaryStats: Map[String, Any] = Map()
protected def addJobs(): Unit = {}
}
var output: FastaOutput = _
var outputSnps: FastaOutput = _
protected def addJobs(): Unit = {
addPerLibJobs()
output = addGenerateFasta(sampleId, sampleDir)
outputSnps = addGenerateFasta(sampleId, sampleDir, snpsOnly = true)
}
}
def init() {
shiva.outputDir = outputDir
shiva.init()
}
def biopetScript() {
shiva.biopetScript()
addAll(shiva.functions)
addSummaryQScript(shiva)
inputFiles :::= shiva.inputFiles
addSamplesJobs()
}
def addMultiSampleJobs(): Unit = {
val refVariants = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference")
val refVariantSnps = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference", snpsOnly = true)
val catVariants = Cat(this, refVariants.variants :: samples.map(_._2.output.variants).toList,
new File(outputDir, "fastas" + File.separator + "variant.fasta"))
add(catVariants)
val catVariantsSnps = Cat(this, refVariantSnps.variants :: samples.map(_._2.outputSnps.variants).toList,
new File(outputDir, "fastas" + File.separator + "variant.snps_only.fasta"))
add(catVariantsSnps)
val catConsensus = Cat(this, refVariants.consensus :: samples.map(_._2.output.consensus).toList,
new File(outputDir, "fastas" + File.separator + "consensus.fasta"))
add(catConsensus)
val catConsensusSnps = Cat(this, refVariantSnps.consensus :: samples.map(_._2.outputSnps.consensus).toList,
new File(outputDir, "fastas" + File.separator + "consensus.snps_only.fasta"))
add(catConsensusSnps)
val catConsensusVariants = Cat(this, refVariants.consensusVariants :: samples.map(_._2.output.consensusVariants).toList,
new File(outputDir, "fastas" + File.separator + "consensus.variant.fasta"))
add(catConsensusVariants)
val catConsensusVariantsSnps = Cat(this, refVariantSnps.consensusVariants :: samples.map(_._2.outputSnps.consensusVariants).toList,
new File(outputDir, "fastas" + File.separator + "consensus.variant.snps_only.fasta"))
add(catConsensusVariantsSnps)
val seed: Int = config("seed", default = 12345)
def addTreeJobs(variants: File, concensusVariants: File, outputDir: File, outputName: String) {
val dirSufixRaxml = new File(outputDir, "raxml")
val dirSufixGubbins = new File(outputDir, "gubbins")
val raxmlMl = new Raxml(this)
raxmlMl.input = variants
raxmlMl.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlMl.p = Some(seed)
raxmlMl.n = outputName + "_ml"
raxmlMl.w = dirSufixRaxml
raxmlMl.N = config("ml_runs", default = 20, namespace = "raxml")
add(raxmlMl)
val r = new scala.util.Random(seed)
val numBoot = config("boot_runs", default = 100, namespace = "raxml").asInt
val bootList = for (t <- 0 until numBoot) yield {
val raxmlBoot = new Raxml(this)
raxmlBoot.input = variants
raxmlBoot.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlBoot.p = Some(seed)
raxmlBoot.b = Some(math.abs(r.nextInt()))
raxmlBoot.w = dirSufixRaxml
raxmlBoot.N = Some(1)
raxmlBoot.n = outputName + "_boot_" + t
add(raxmlBoot)
raxmlBoot.getBootstrapFile.get
}
val cat = Cat(this, bootList.toList, new File(outputDir, "/boot_list"))
add(cat)
val raxmlBi = new Raxml(this)
raxmlBi.input = concensusVariants
raxmlBi.t = raxmlMl.getBestTreeFile
raxmlBi.z = Some(cat.output)
raxmlBi.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlBi.p = Some(seed)
raxmlBi.f = "b"
raxmlBi.n = outputName + "_bi"
raxmlBi.w = dirSufixRaxml
add(raxmlBi)
val gubbins = new RunGubbins(this)
gubbins.fastafile = concensusVariants
gubbins.startingTree = raxmlBi.getBipartitionsFile
gubbins.outputDirectory = dirSufixGubbins
add(gubbins)
}
addTreeJobs(catVariantsSnps.output, catConsensusVariantsSnps.output,
new File(outputDir, "trees" + File.separator + "snps_only"), "snps_only")
addTreeJobs(catVariants.output, catConsensusVariants.output,
new File(outputDir, "trees" + File.separator + "snps_indels"), "snps_indels")
}
def addGenerateFasta(sampleName: String, outputDir: File, outputName: String = null,
snpsOnly: Boolean = false): FastaOutput = {
val bastyGenerateFasta = new BastyGenerateFasta(this)
bastyGenerateFasta.outputName = if (outputName != null) outputName else sampleName
bastyGenerateFasta.inputVcf = shiva.multisampleVariantCalling.get.finalFile
if (shiva.samples.contains(sampleName)) {
bastyGenerateFasta.bamFile = shiva.samples(sampleName).preProcessBam.get
}
bastyGenerateFasta.outputVariants = new File(outputDir, bastyGenerateFasta.outputName + ".variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensus = new File(outputDir, bastyGenerateFasta.outputName + ".consensus" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensusVariants = new File(outputDir, bastyGenerateFasta.outputName + ".consensus_variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.sampleName = sampleName
bastyGenerateFasta.snpsOnly = snpsOnly
qscript.add(bastyGenerateFasta)
FastaOutput(bastyGenerateFasta.outputVariants, bastyGenerateFasta.outputConsensus, bastyGenerateFasta.outputConsensusVariants)
}
}
object Basty extends PipelineCommand
\ No newline at end of file
object Basty extends PipelineCommand
/**
* Biopet is built on top of GATK Queue for building bioinformatic
* pipelines. It is mainly intended to support LUMC SHARK cluster which is running
* SGE. But other types of HPC that are supported by GATK Queue (such as PBS)
* should also be able to execute Biopet tools and pipelines.
*
* Copyright 2014 Sequencing Analysis Support Core - Leiden University Medical Center
*
* Contact us at: sasc@lumc.nl
*
* A dual licensing mode is applied. The source code within this project that are
* not part of GATK Queue is freely available for non-commercial use under an AGPL
* license; For commercial users or users who do not want to follow the AGPL
* license, please contact us to obtain a separate license.
*/
/**
* Due to the license issue with GATK, this part of Biopet can only be used inside the
* LUMC. Please refer to https://git.lumc.nl/biopet/biopet/wikis/home for instructions
* on how to use this protected part of biopet or contact us at sasc@lumc.nl
*/
package nl.lumc.sasc.biopet.pipelines.basty
import java.io.File
import nl.lumc.sasc.biopet.core.MultiSampleQScript
import nl.lumc.sasc.biopet.extensions.{ Cat, Raxml, RunGubbins }
import nl.lumc.sasc.biopet.pipelines.shiva.{ Shiva, ShivaTrait }
import nl.lumc.sasc.biopet.extensions.tools.BastyGenerateFasta
import nl.lumc.sasc.biopet.utils.ConfigUtils
import org.broadinstitute.gatk.queue.QScript
trait BastyTrait extends MultiSampleQScript {
qscript: QScript =>
case class FastaOutput(variants: File, consensus: File, consensusVariants: File)
def variantcallers = List("freebayes")
override def defaults = Map(
"ploidy" -> 1,
"variantcallers" -> variantcallers
)
lazy val shiva: ShivaTrait = new Shiva(qscript)
def summaryFile: File = new File(outputDir, "Basty.summary.json")
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summarySettings: Map[String, Any] = Map()
def makeSample(id: String) = new Sample(id)
class Sample(sampleId: String) extends AbstractSample(sampleId) {
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summaryStats: Map[String, Any] = Map()
def makeLibrary(id: String) = new Library(id)
class Library(libId: String) extends AbstractLibrary(libId) {
//TODO: Add summary
def summaryFiles: Map[String, File] = Map()
//TODO: Add summary
def summaryStats: Map[String, Any] = Map()
protected def addJobs(): Unit = {}
}
var output: FastaOutput = _
var outputSnps: FastaOutput = _
protected def addJobs(): Unit = {
addPerLibJobs()
output = addGenerateFasta(sampleId, sampleDir)
outputSnps = addGenerateFasta(sampleId, sampleDir, snpsOnly = true)
}
}
def init() {
shiva.outputDir = outputDir
shiva.init()
}
def biopetScript() {
shiva.biopetScript()
addAll(shiva.functions)
addSummaryQScript(shiva)
inputFiles :::= shiva.inputFiles
addSamplesJobs()
}
def addMultiSampleJobs(): Unit = {
val refVariants = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference")
val refVariantSnps = addGenerateFasta(null, new File(outputDir, "fastas" + File.separator + "reference"), outputName = "reference", snpsOnly = true)
val catVariants = Cat(this, refVariants.variants :: samples.map(_._2.output.variants).toList,
new File(outputDir, "fastas" + File.separator + "variant.fasta"))
add(catVariants)
val catVariantsSnps = Cat(this, refVariantSnps.variants :: samples.map(_._2.outputSnps.variants).toList,
new File(outputDir, "fastas" + File.separator + "variant.snps_only.fasta"))
add(catVariantsSnps)
val catConsensus = Cat(this, refVariants.consensus :: samples.map(_._2.output.consensus).toList,
new File(outputDir, "fastas" + File.separator + "consensus.fasta"))
add(catConsensus)
val catConsensusSnps = Cat(this, refVariantSnps.consensus :: samples.map(_._2.outputSnps.consensus).toList,
new File(outputDir, "fastas" + File.separator + "consensus.snps_only.fasta"))
add(catConsensusSnps)
val catConsensusVariants = Cat(this, refVariants.consensusVariants :: samples.map(_._2.output.consensusVariants).toList,
new File(outputDir, "fastas" + File.separator + "consensus.variant.fasta"))
add(catConsensusVariants)
val catConsensusVariantsSnps = Cat(this, refVariantSnps.consensusVariants :: samples.map(_._2.outputSnps.consensusVariants).toList,
new File(outputDir, "fastas" + File.separator + "consensus.variant.snps_only.fasta"))
add(catConsensusVariantsSnps)
val seed: Int = config("seed", default = 12345)
def addTreeJobs(variants: File, concensusVariants: File, outputDir: File, outputName: String) {
val dirSufixRaxml = new File(outputDir, "raxml")
val dirSufixGubbins = new File(outputDir, "gubbins")
val raxmlMl = new Raxml(this)
raxmlMl.input = variants
raxmlMl.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlMl.p = Some(seed)
raxmlMl.n = outputName + "_ml"
raxmlMl.w = dirSufixRaxml
raxmlMl.N = config("ml_runs", default = 20, namespace = "raxml")
add(raxmlMl)
val r = new scala.util.Random(seed)
val numBoot = config("boot_runs", default = 100, namespace = "raxml").asInt
val bootList = for (t <- 0 until numBoot) yield {
val raxmlBoot = new Raxml(this)
raxmlBoot.input = variants
raxmlBoot.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlBoot.p = Some(seed)
raxmlBoot.b = Some(math.abs(r.nextInt()))
raxmlBoot.w = dirSufixRaxml
raxmlBoot.N = Some(1)
raxmlBoot.n = outputName + "_boot_" + t
add(raxmlBoot)
raxmlBoot.getBootstrapFile.get
}
val cat = Cat(this, bootList.toList, new File(outputDir, "/boot_list"))
add(cat)
val raxmlBi = new Raxml(this)
raxmlBi.input = concensusVariants
raxmlBi.t = raxmlMl.getBestTreeFile
raxmlBi.z = Some(cat.output)
raxmlBi.m = config("raxml_ml_model", default = "GTRGAMMAX")
raxmlBi.p = Some(seed)
raxmlBi.f = "b"
raxmlBi.n = outputName + "_bi"
raxmlBi.w = dirSufixRaxml
add(raxmlBi)
val gubbins = new RunGubbins(this)
gubbins.fastafile = concensusVariants
gubbins.startingTree = raxmlBi.getBipartitionsFile
gubbins.outputDirectory = dirSufixGubbins
add(gubbins)
}
addTreeJobs(catVariantsSnps.output, catConsensusVariantsSnps.output,
new File(outputDir, "trees" + File.separator + "snps_only"), "snps_only")
addTreeJobs(catVariants.output, catConsensusVariants.output,
new File(outputDir, "trees" + File.separator + "snps_indels"), "snps_indels")
}
def addGenerateFasta(sampleName: String, outputDir: File, outputName: String = null,
snpsOnly: Boolean = false): FastaOutput = {
val bastyGenerateFasta = new BastyGenerateFasta(this)
bastyGenerateFasta.outputName = if (outputName != null) outputName else sampleName
bastyGenerateFasta.inputVcf = shiva.multisampleVariantCalling.get.finalFile
if (shiva.samples.contains(sampleName)) {
bastyGenerateFasta.bamFile = shiva.samples(sampleName).preProcessBam.get
}
bastyGenerateFasta.outputVariants = new File(outputDir, bastyGenerateFasta.outputName + ".variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensus = new File(outputDir, bastyGenerateFasta.outputName + ".consensus" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.outputConsensusVariants = new File(outputDir, bastyGenerateFasta.outputName + ".consensus_variants" + (if (snpsOnly) ".snps_only" else "") + ".fasta")
bastyGenerateFasta.sampleName = sampleName
bastyGenerateFasta.snpsOnly = snpsOnly
qscript.add(bastyGenerateFasta)
FastaOutput(bastyGenerateFasta.outputVariants, bastyGenerateFasta.outputConsensus, bastyGenerateFasta.outputConsensusVariants)
}
}
......@@ -15,7 +15,6 @@
*/
package nl.lumc.sasc.biopet
import nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling
import nl.lumc.sasc.biopet.utils.{ BiopetExecutable, MainCommand }
object BiopetExecutablePublic extends BiopetExecutable {
......@@ -33,13 +32,13 @@ object BiopetExecutablePublic extends BiopetExecutable {
nl.lumc.sasc.biopet.pipelines.shiva.ShivaSvCalling,
nl.lumc.sasc.biopet.pipelines.gears.GearsSingle,
nl.lumc.sasc.biopet.pipelines.gears.Gears,
nl.lumc.sasc.biopet.pipelines.gwastest.GwasTest
nl.lumc.sasc.biopet.pipelines.gwastest.GwasTest,
nl.lumc.sasc.biopet.pipelines.shiva.ShivaVariantcalling,
nl.lumc.sasc.biopet.pipelines.basty.Basty
)
def pipelines: List[MainCommand] = List(
nl.lumc.sasc.biopet.pipelines.shiva.Shiva,
ShivaVariantcalling,
nl.lumc.sasc.biopet.pipelines.basty.Basty
nl.lumc.sasc.biopet.pipelines.shiva.Shiva
) ::: publicPipelines
def tools: List[MainCommand] = BiopetToolsExecutable.tools
......
......@@ -43,7 +43,7 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
)
/** Method to make the variantcalling namespace of shiva */
def makeVariantcalling(multisample: Boolean = false): ShivaVariantcallingTrait with QScript = {
def makeVariantcalling(multisample: Boolean = false): ShivaVariantcalling with QScript = {
if (multisample) new ShivaVariantcalling(qscript) {
override def namePrefix = "multisample"
override def configNamespace: String = "shivavariantcalling"
......
......@@ -15,17 +15,178 @@
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import nl.lumc.sasc.biopet.core.PipelineCommand
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, SampleLibraryTag }
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.extensions.Tabix
import nl.lumc.sasc.biopet.extensions.gatk.{ CombineVariants, GenotypeConcordance }
import nl.lumc.sasc.biopet.extensions.tools.VcfStats
import nl.lumc.sasc.biopet.extensions.vt.{ VtDecompose, VtNormalize }
import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions
import nl.lumc.sasc.biopet.pipelines.gatk.variantcallers._
import nl.lumc.sasc.biopet.pipelines.shiva.variantcallers.{ VarscanCnsSingleSample, _ }
import nl.lumc.sasc.biopet.utils.{ BamUtils, Logging }
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
* Implementation of ShivaVariantcalling without GATK variantcallers
* Implementation of ShivaVariantcalling
*
* Created by pjvan_thof on 2/26/15.
*/
class ShivaVariantcalling(val root: Configurable) extends QScript with ShivaVariantcallingTrait {
class ShivaVariantcalling(val root: Configurable) extends QScript
with SummaryQScript
with SampleLibraryTag
with Reference
with TargetRegions {
qscript =>
def this() = this(null)
@Input(doc = "Bam files (should be deduped bams)", shortName = "BAM", required = true)
protected var inputBamsArg: List[File] = Nil
var inputBams: Map[String, File] = Map()
/** Executed before script */
def init(): Unit = {
if (inputBamsArg.nonEmpty) inputBams = BamUtils.sampleBamMap(inputBamsArg)