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

Merge branch 'release-0.7.0' into 'master'

Release 0.7.0



See merge request !449
parents 23c1ccea bf548a42
......@@ -8,18 +8,20 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import nl.lumc.sasc.biopet.core.Reference
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference }
import nl.lumc.sasc.biopet.core.report.ReportBuilderExtension
import nl.lumc.sasc.biopet.extensions.gatk._
import nl.lumc.sasc.biopet.pipelines.bammetrics.TargetRegions
import nl.lumc.sasc.biopet.pipelines.kopisu.Kopisu
import nl.lumc.sasc.biopet.pipelines.mapping.MultisampleMappingTrait
import nl.lumc.sasc.biopet.pipelines.toucan.Toucan
import nl.lumc.sasc.biopet.utils.config.Configurable
import org.broadinstitute.gatk.queue.QScript
/**
......@@ -27,7 +29,9 @@ import org.broadinstitute.gatk.queue.QScript
*
* Created by pjvan_thof on 2/26/15.
*/
trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegions { qscript: QScript =>
class Shiva(val root: Configurable) extends QScript with MultisampleMappingTrait with Reference with TargetRegions { qscript =>
def this() = this(null)
override def reportClass: Option[ReportBuilderExtension] = {
val shiva = new ShivaReport(this)
......@@ -36,15 +40,21 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
Some(shiva)
}
/** Method to make the variantcalling submodule of shiva */
def makeVariantcalling(multisample: Boolean = false): ShivaVariantcallingTrait with QScript = {
override def defaults = Map(
"haplotypecaller" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0),
"genotypegvcfs" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0),
"unifiedgenotyper" -> Map("stand_call_conf" -> 30, "stand_emit_conf" -> 0)
)
/** Method to make the variantcalling namespace of shiva */
def makeVariantcalling(multisample: Boolean = false): ShivaVariantcalling with QScript = {
if (multisample) new ShivaVariantcalling(qscript) {
override def namePrefix = "multisample"
override def configName: String = "shivavariantcalling"
override def configNamespace: String = "shivavariantcalling"
override def configPath: List[String] = super.configPath ::: "multisample" :: Nil
}
else new ShivaVariantcalling(qscript) {
override def configName = "shivavariantcalling"
override def configNamespace = "shivavariantcalling"
}
}
......@@ -57,12 +67,32 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
override def makeLibrary(id: String) = new this.Library(id)
/** Sample specific settings */
override def summarySettings = Map("single_sample_variantcalling" -> variantcalling.isDefined)
override def summarySettings = super.summarySettings ++
Map("single_sample_variantcalling" -> variantcalling.isDefined, "use_indel_realigner" -> useIndelRealigner)
/** Class to generate jobs for a library */
class Library(libId: String) extends super.Library(libId) {
lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true)
lazy val useBaseRecalibration: Boolean = {
val c: Boolean = config("use_base_recalibration", default = true)
val br = new BaseRecalibrator(qscript)
if (c && br.knownSites.isEmpty)
logger.warn("No Known site found, skipping base recalibration, file: " + inputBam)
c && br.knownSites.nonEmpty
}
override def preProcessBam = if (useIndelRealigner && useBaseRecalibration)
bamFile.map(swapExt(libDir, _, ".bam", ".realign.baserecal.bam"))
else if (useIndelRealigner) bamFile.map(swapExt(libDir, _, ".bam", ".realign.bam"))
else if (useBaseRecalibration) bamFile.map(swapExt(libDir, _, ".bam", ".baserecal.bam"))
else bamFile
/** Library specific settings */
override def summarySettings = Map("library_variantcalling" -> variantcalling.isDefined)
override def summarySettings = Map(
"library_variantcalling" -> variantcalling.isDefined,
"use_indel_realigner" -> useIndelRealigner,
"use_base_recalibration" -> useBaseRecalibration)
lazy val variantcalling = if (config("library_variantcalling", default = false).asBoolean &&
(bamFile.isDefined || preProcessBam.isDefined)) {
......@@ -73,6 +103,15 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
override def addJobs() = {
super.addJobs()
if (useIndelRealigner && useBaseRecalibration) {
val file = addIndelRealign(bamFile.get, libDir, isIntermediate = true)
addBaseRecalibrator(file, libDir, libraries.size > 1)
} else if (useIndelRealigner) {
addIndelRealign(bamFile.get, libDir, libraries.size > 1)
} else if (useBaseRecalibration) {
addBaseRecalibrator(bamFile.get, libDir, libraries.size > 1)
}
variantcalling.foreach(vc => {
vc.sampleId = Some(sampleId)
vc.libId = Some(libId)
......@@ -88,10 +127,22 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
Some(makeVariantcalling(multisample = false))
} else None
override def keepMergedFiles: Boolean = config("keep_merged_files", default = !useIndelRealigner)
lazy val useIndelRealigner: Boolean = config("use_indel_realigner", default = true)
override def preProcessBam = if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) {
bamFile.map(swapExt(sampleDir, _, ".bam", ".realign.bam"))
} else bamFile
/** This will add sample jobs */
override def addJobs(): Unit = {
super.addJobs()
if (useIndelRealigner && libraries.values.flatMap(_.preProcessBam).size > 1) {
addIndelRealign(bamFile.get, sampleDir, false)
}
preProcessBam.foreach { bam =>
variantcalling.foreach(vc => {
vc.sampleId = Some(sampleId)
......@@ -111,6 +162,10 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
Some(new ShivaSvCalling(this))
} else None
lazy val cnvCalling = if (config("cnv_calling", default = false).asBoolean) {
Some(new Kopisu(this))
} else None
lazy val annotation = if (multisampleVariantCalling.isDefined &&
config("annotation", default = false).asBoolean) {
Some(new Toucan(this))
......@@ -127,16 +182,22 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
annotation.foreach { toucan =>
toucan.outputDir = new File(outputDir, "annotation")
toucan.inputVCF = vc.finalFile
toucan.inputVcf = vc.finalFile
add(toucan)
}
})
svCalling.foreach(sv => {
svCalling.foreach { sv =>
sv.outputDir = new File(outputDir, "sv_calling")
sv.inputBams = samples.flatMap { case (sampleId, sample) => sample.preProcessBam.map(sampleId -> _) }
add(sv)
})
}
cnvCalling.foreach { cnv =>
cnv.outputDir = new File(outputDir, "cnv_calling")
cnv.inputBams = samples.flatMap { case (sampleId, sample) => sample.preProcessBam.map(sampleId -> _) }
add(cnv)
}
}
/** Location of summary file */
......@@ -147,7 +208,47 @@ trait ShivaTrait extends MultisampleMappingTrait with Reference with TargetRegio
"annotation" -> annotation.isDefined,
"multisample_variantcalling" -> multisampleVariantCalling.isDefined,
"sv_calling" -> svCalling.isDefined,
"cnv_calling" -> cnvCalling.isDefined,
"regions_of_interest" -> roiBedFiles.map(_.getName.stripSuffix(".bed")),
"amplicon_bed" -> ampliconBedFile.map(_.getName.stripSuffix(".bed"))
)
/** Adds indel realignment jobs */
def addIndelRealign(inputBam: File, dir: File, isIntermediate: Boolean): File = {
val realignerTargetCreator = RealignerTargetCreator(this, inputBam, dir)
realignerTargetCreator.isIntermediate = true
add(realignerTargetCreator)
val indelRealigner = IndelRealigner(this, inputBam, realignerTargetCreator.out, dir)
indelRealigner.isIntermediate = isIntermediate
add(indelRealigner)
indelRealigner.out
}
/** Adds base recalibration jobs */
def addBaseRecalibrator(inputBam: File, dir: File, isIntermediate: Boolean): File = {
val baseRecalibrator = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal"))
if (baseRecalibrator.knownSites.isEmpty) return inputBam
add(baseRecalibrator)
if (config("use_analyze_covariates", default = true).asBoolean) {
val baseRecalibratorAfter = BaseRecalibrator(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.after"))
baseRecalibratorAfter.BQSR = Some(baseRecalibrator.out)
add(baseRecalibratorAfter)
add(AnalyzeCovariates(this, baseRecalibrator.out, baseRecalibratorAfter.out, swapExt(dir, inputBam, ".bam", ".baserecal.pdf")))
}
val printReads = PrintReads(this, inputBam, swapExt(dir, inputBam, ".bam", ".baserecal.bam"))
printReads.BQSR = Some(baseRecalibrator.out)
printReads.isIntermediate = isIntermediate
add(printReads)
printReads.out
}
}
/** This object give a default main method to the pipelines */
object Shiva extends PipelineCommand
\ No newline at end of file
......@@ -8,8 +8,7 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
......@@ -33,7 +32,10 @@ class ShivaReport(val root: Configurable) extends ReportBuilderExtension {
}
/** Object for report generation for Shiva pipeline */
object ShivaReport extends MultisampleMappingReportTrait {
object ShivaReport extends ShivaReportTrait
/** Trait for report generation for Shiva pipeline, this can be extended */
trait ShivaReportTrait extends MultisampleMappingReportTrait {
def variantcallingExecuted = summary.getValue("shiva", "settings", "multisample_variantcalling") match {
case Some(true) => true
......@@ -44,9 +46,6 @@ object ShivaReport extends MultisampleMappingReportTrait {
override def pipelineName = "shiva"
override def extFiles = super.extFiles ++ List("js/gears.js")
.map(x => ExtFile("/nl/lumc/sasc/biopet/pipelines/gears/report/ext/" + x, x))
override def additionalSections = super.additionalSections ++ (if (variantcallingExecuted) List("Variantcalling" -> ReportSection("/nl/lumc/sasc/biopet/pipelines/shiva/sampleVariants.ssp",
Map("showPlot" -> true, "showTable" -> false)))
else Nil)
......@@ -120,6 +119,7 @@ object ShivaReport extends MultisampleMappingReportTrait {
/**
* Generate a stackbar plot for found variants
*
* @param outputDir OutputDir for the tsv and png file
* @param prefix Prefix of the tsv and png file
* @param summary Summary class
......
......@@ -8,8 +8,7 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
......
......@@ -8,34 +8,38 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
package nl.lumc.sasc.biopet.pipelines.shiva
import nl.lumc.sasc.biopet.core.{ PipelineCommand, Reference, SampleLibraryTag }
import nl.lumc.sasc.biopet.core.summary.SummaryQScript
import nl.lumc.sasc.biopet.core.{ Reference, SampleLibraryTag }
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.shiva.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
import org.broadinstitute.gatk.queue.extensions.gatk.TaggedFile
/**
* Common trait for ShivaVariantcalling
* Implementation of ShivaVariantcalling
*
* Created by pjvan_thof on 2/26/15.
*/
trait ShivaVariantcallingTrait extends SummaryQScript
class ShivaVariantcalling(val root: Configurable) extends QScript
with SummaryQScript
with SampleLibraryTag
with Reference
with TargetRegions {
qscript: QScript =>
qscript =>
def this() = this(null)
@Input(doc = "Bam files (should be deduped bams)", shortName = "BAM", required = true)
protected var inputBamsArg: List[File] = Nil
......@@ -68,7 +72,7 @@ trait ShivaVariantcallingTrait extends SummaryQScript
/** Variantcallers requested by the config */
protected val configCallers: Set[String] = config("variantcallers")
protected val callers: List[Variantcaller] = {
val callers: List[Variantcaller] = {
(for (name <- configCallers) yield {
if (!callersList.exists(_.name == name))
Logging.addError(s"variantcaller '$name' does not exist, possible to use: " + callersList.map(_.name).mkString(", "))
......@@ -82,18 +86,18 @@ trait ShivaVariantcallingTrait extends SummaryQScript
require(callers.nonEmpty, "must select at least 1 variantcaller, choices are: " + callersList.map(_.name).mkString(", "))
val cv = new CombineVariants(qscript)
cv.outputFile = finalFile
cv.setKey = "VariantCaller"
cv.genotypeMergeOptions = Some("PRIORITIZE")
cv.rodPriorityList = callers.map(_.name).mkString(",")
cv.out = finalFile
cv.setKey = Some("VariantCaller")
cv.genotypemergeoption = Some("PRIORITIZE")
cv.rod_priority_list = Some(callers.map(_.name).mkString(","))
for (caller <- callers) {
caller.inputBams = inputBams
caller.namePrefix = namePrefix
caller.outputDir = new File(outputDir, caller.name)
add(caller)
addStats(caller.outputFile, caller.name)
val normalize: Boolean = config("execute_vt_normalize", default = false, submodule = caller.configName)
val decompose: Boolean = config("execute_vt_decompose", default = false, submodule = caller.configName)
val normalize: Boolean = config("execute_vt_normalize", default = false, namespace = caller.configNamespace)
val decompose: Boolean = config("execute_vt_decompose", default = false, namespace = caller.configNamespace)
val vtNormalize = new VtNormalize(this)
vtNormalize.inputVcf = caller.outputFile
......@@ -106,17 +110,17 @@ trait ShivaVariantcallingTrait extends SummaryQScript
vtDecompose.inputVcf = vtNormalize.outputVcf
vtDecompose.outputVcf = swapExt(caller.outputDir, vtNormalize.outputVcf, ".vcf.gz", ".decompose.vcf.gz")
add(vtDecompose, Tabix(this, vtDecompose.outputVcf))
cv.addInput(vtDecompose.outputVcf, caller.name)
cv.variant :+= TaggedFile(vtDecompose.outputVcf, caller.name)
} else if (normalize && !decompose) {
vtNormalize.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normalized.vcf.gz")
add(vtNormalize, Tabix(this, vtNormalize.outputVcf))
cv.addInput(vtNormalize.outputVcf, caller.name)
cv.variant :+= TaggedFile(vtNormalize.outputVcf, caller.name)
} else if (!normalize && decompose) {
vtDecompose.inputVcf = caller.outputFile
vtDecompose.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".decompose.vcf.gz")
add(vtDecompose, Tabix(this, vtDecompose.outputVcf))
cv.addInput(vtDecompose.outputVcf, caller.name)
} else cv.addInput(caller.outputFile, caller.name)
cv.variant :+= TaggedFile(vtDecompose.outputVcf, caller.name)
} else cv.variant :+= TaggedFile(caller.outputFile, caller.name)
}
add(cv)
......@@ -135,9 +139,9 @@ trait ShivaVariantcallingTrait extends SummaryQScript
referenceVcf.foreach(referenceVcfFile => {
val gc = new GenotypeConcordance(this)
gc.evalFile = vcfFile
gc.compFile = referenceVcfFile
gc.outputFile = new File(vcfFile.getParentFile, s"$namePrefix-genotype_concordance.$name.txt")
gc.eval = vcfFile
gc.comp = referenceVcfFile
gc.out = new File(vcfFile.getParentFile, s"$namePrefix-genotype_concordance.$name.txt")
referenceVcfRegions.foreach(gc.intervals ::= _)
add(gc)
addSummarizable(gc, s"$namePrefix-genotype_concordance-$name")
......@@ -156,12 +160,17 @@ trait ShivaVariantcallingTrait extends SummaryQScript
}
/** Will generate all available variantcallers */
protected def callersList: List[Variantcaller] = List(
new Freebayes(this),
new RawVcf(this),
new Bcftools(this),
new BcftoolsSingleSample(this),
new VarscanCnsSingleSample(this))
protected def callersList: List[Variantcaller] =
new HaplotypeCallerGvcf(this) ::
new HaplotypeCallerAllele(this) ::
new UnifiedGenotyperAllele(this) ::
new UnifiedGenotyper(this) ::
new HaplotypeCaller(this) ::
new Freebayes(this) ::
new RawVcf(this) ::
new Bcftools(this) ::
new BcftoolsSingleSample(this) ::
new VarscanCnsSingleSample(this) :: Nil
/** Location of summary file */
def summaryFile = new File(outputDir, "ShivaVariantcalling.summary.json")
......@@ -169,12 +178,14 @@ trait ShivaVariantcallingTrait extends SummaryQScript
/** Settings for the summary */
def summarySettings = Map(
"variantcallers" -> configCallers.toList,
"regions_of_interest" -> roiBedFiles.map(_.getName.stripSuffix(".bed")),
"amplicon_bed" -> ampliconBedFile.map(_.getName.stripSuffix(".bed"))
"regions_of_interest" -> roiBedFiles.map(_.getName),
"amplicon_bed" -> ampliconBedFile.map(_.getAbsolutePath)
)
/** Files for the summary */
def summaryFiles: Map[String, File] = {
callers.map(x => x.name -> x.outputFile).toMap + ("final" -> finalFile)
}
}
\ No newline at end of file
}
object ShivaVariantcalling extends PipelineCommand
\ No newline at end of file
......@@ -8,14 +8,14 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
package nl.lumc.sasc.biopet.pipelines.shiva.svcallers
import nl.lumc.sasc.biopet.extensions.breakdancer.{ BreakdancerVCF, BreakdancerCaller, BreakdancerConfig }
import nl.lumc.sasc.biopet.extensions.breakdancer.{ BreakdancerCaller, BreakdancerConfig, BreakdancerVCF }
import nl.lumc.sasc.biopet.extensions.picard.SortVcf
import nl.lumc.sasc.biopet.utils.config.Configurable
/** Script for sv caler Breakdancer */
......@@ -31,10 +31,16 @@ class Breakdancer(val root: Configurable) extends SvCaller {
val bdcfg = BreakdancerConfig(this, bamFile, new File(breakdancerSampleDir, sample + ".breakdancer.cfg"))
val breakdancer = BreakdancerCaller(this, bdcfg.output, new File(breakdancerSampleDir, sample + ".breakdancer.tsv"))
val bdvcf = BreakdancerVCF(this, breakdancer.output, new File(breakdancerSampleDir, sample + ".breakdancer.vcf"))
add(bdcfg, breakdancer, bdvcf)
val bdvcf = BreakdancerVCF(this, breakdancer.output, new File(breakdancerSampleDir, sample + ".breakdancer.vcf"),
sample = sample + sampleNameSuffix)
addVCF(sample, bdvcf.output)
val compressedVCF = new SortVcf(this)
compressedVCF.input = bdvcf.output
compressedVCF.output = new File(breakdancerSampleDir, s"${sample}.breakdancer.vcf.gz")
add(bdcfg, breakdancer, bdvcf, compressedVCF)
addVCF(sample, compressedVCF.output)
}
}
}
......@@ -8,14 +8,14 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
package nl.lumc.sasc.biopet.pipelines.shiva.svcallers
import nl.lumc.sasc.biopet.extensions.clever.CleverCaller
import nl.lumc.sasc.biopet.extensions.clever.{ CleverCaller, CleverFixVCF }
import nl.lumc.sasc.biopet.extensions.picard.SortVcf
import nl.lumc.sasc.biopet.utils.config.Configurable
/** Script for sv caler Clever */
......@@ -29,7 +29,19 @@ class Clever(val root: Configurable) extends SvCaller {
val clever = CleverCaller(this, bamFile, cleverDir)
add(clever)
addVCF(sample, clever.outputvcf)
val cleverVCF = new CleverFixVCF(this)
cleverVCF.input = clever.outputvcf
cleverVCF.output = new File(cleverDir, s".${sample}.clever.vcf")
cleverVCF.sampleName = sample + sampleNameSuffix
cleverVCF.isIntermediate = true
add(cleverVCF)
val compressedVCF = new SortVcf(this)
compressedVCF.input = cleverVCF.output
compressedVCF.output = new File(cleverDir, s"${sample}.clever.vcf.gz")
add(compressedVCF)
addVCF(sample, compressedVCF.output)
}
}
}
......@@ -8,8 +8,7 @@
*
* 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
* A dual licensing mode is applied. The source code within this project 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.
*/
......@@ -17,6 +16,7 @@ package nl.lumc.sasc.biopet.pipelines.shiva.svcallers
import nl.lumc.sasc.biopet.extensions.delly.DellyCaller
import nl.lumc.sasc.biopet.extensions.gatk.CatVariants
import nl.lumc.sasc.biopet.extensions.picard.SortVcf
import nl.lumc.sasc.biopet.utils.config.Configurable
/** Script for sv caller delly */
......@@ -41,7 +41,13 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "DEL"
delly.outputvcf = new File(dellyDir, sample + ".delly.del.vcf")
add(delly)
catVariants.inputFiles :+= delly.outputvcf
val compressedVCF = new SortVcf(this)
compressedVCF.input = delly.outputvcf
compressedVCF.output = new File(dellyDir, s"${sample}.delly.del.vcf.gz")
add(compressedVCF)
catVariants.variant :+= compressedVCF.output
}
if (dup) {
val delly = new DellyCaller(this)
......@@ -49,7 +55,13 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "DUP"
delly.outputvcf = new File(dellyDir, sample + ".delly.dup.vcf")
add(delly)
catVariants.inputFiles :+= delly.outputvcf
val compressedVCF = new SortVcf(this)
compressedVCF.input = delly.outputvcf
compressedVCF.output = new File(dellyDir, s"${sample}.delly.dup.vcf.gz")
add(compressedVCF)
catVariants.variant :+= compressedVCF.output
}
if (inv) {
val delly = new DellyCaller(this)
......@@ -57,18 +69,30 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "INV"
delly.outputvcf = new File(dellyDir, sample + ".delly.inv.vcf")
add(delly)
catVariants.inputFiles :+= delly.outputvcf
val compressedVCF = new SortVcf(this)
compressedVCF.input = delly.outputvcf
compressedVCF.output = new File(dellyDir, s"${sample}.delly.inv.vcf.gz")
add(compressedVCF)
catVariants.variant :+= compressedVCF.output
}
if (tra) {
val delly = new DellyCaller(this)