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

Invert option, true is default now

parent f602182e
......@@ -76,7 +76,6 @@ class ShivaSvCalling(val root: Configurable) extends QScript with SummaryQScript
val mergeSVcalls = new Pysvtools(this)
mergeSVcalls.input = sampleVCFS.flatten
mergeSVcalls.output = new File(outputDir, sample + ".merged.vcf")
mergeSVcalls.mainFunction = true
add(mergeSVcalls)
outputMergedVCFbySample += (sample -> mergeSVcalls.output)
}
......@@ -85,7 +84,6 @@ class ShivaSvCalling(val root: Configurable) extends QScript with SummaryQScript
val mergeSVcallsProject = new Pysvtools(this)
mergeSVcallsProject.input = outputMergedVCFbySample.values.toList
mergeSVcallsProject.output = outputMergedVCF
mergeSVcallsProject.mainFunction = true
add(mergeSVcallsProject)
// merging the VCF calls by project
......
......@@ -106,27 +106,22 @@ class ShivaVariantcalling(val root: Configurable) extends QScript
if (normalize && decompose) {
vtNormalize.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normalized.vcf.gz")
vtNormalize.isIntermediate = true
vtNormalize.mainFunction = true
add(vtNormalize, Tabix(this, vtNormalize.outputVcf))
vtDecompose.inputVcf = vtNormalize.outputVcf
vtDecompose.outputVcf = swapExt(caller.outputDir, vtNormalize.outputVcf, ".vcf.gz", ".decompose.vcf.gz")
vtDecompose.mainFunction = true
add(vtDecompose, Tabix(this, vtDecompose.outputVcf))
cv.variant :+= TaggedFile(vtDecompose.outputVcf, caller.name)
} else if (normalize && !decompose) {
vtNormalize.outputVcf = swapExt(caller.outputDir, caller.outputFile, ".vcf.gz", ".normalized.vcf.gz")
vtNormalize.mainFunction = true
add(vtNormalize, Tabix(this, vtNormalize.outputVcf))
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")
vtDecompose.mainFunction = true
add(vtDecompose, Tabix(this, vtDecompose.outputVcf))
cv.variant :+= TaggedFile(vtDecompose.outputVcf, caller.name)
} else cv.variant :+= TaggedFile(caller.outputFile, caller.name)
}
cv.mainFunction = true
add(cv)
addStats(finalFile, "final")
......
......@@ -30,17 +30,13 @@ class Breakdancer(val root: Configurable) extends SvCaller {
logger.debug("Starting Breakdancer configuration")
val bdcfg = BreakdancerConfig(this, bamFile, new File(breakdancerSampleDir, sample + ".breakdancer.cfg"))
bdcfg.mainFunction = true
val breakdancer = BreakdancerCaller(this, bdcfg.output, new File(breakdancerSampleDir, sample + ".breakdancer.tsv"))
breakdancer.mainFunction = true
val bdvcf = BreakdancerVCF(this, breakdancer.output, new File(breakdancerSampleDir, sample + ".breakdancer.vcf"),
sample = sample + sampleNameSuffix)
bdvcf.mainFunction = true
val compressedVCF = new SortVcf(this)
compressedVCF.input = bdvcf.output
compressedVCF.output = new File(breakdancerSampleDir, s"${sample}.breakdancer.vcf.gz")
compressedVCF.mainFunction = true
add(bdcfg, breakdancer, bdvcf, compressedVCF)
......
......@@ -27,7 +27,6 @@ class Clever(val root: Configurable) extends SvCaller {
for ((sample, bamFile) <- inputBams) {
val cleverDir = new File(outputDir, sample)
val clever = CleverCaller(this, bamFile, cleverDir)
clever.mainFunction = true
add(clever)
val cleverVCF = new CleverFixVCF(this)
......@@ -35,13 +34,11 @@ class Clever(val root: Configurable) extends SvCaller {
cleverVCF.output = new File(cleverDir, s".${sample}.clever.vcf")
cleverVCF.sampleName = sample + sampleNameSuffix
cleverVCF.isIntermediate = true
cleverVCF.mainFunction = true
add(cleverVCF)
val compressedVCF = new SortVcf(this)
compressedVCF.input = cleverVCF.output
compressedVCF.output = new File(cleverDir, s"${sample}.clever.vcf.gz")
compressedVCF.mainFunction = true
add(compressedVCF)
addVCF(sample, compressedVCF.output)
......
......@@ -43,7 +43,6 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "DEL"
delly.isIntermediate = true
delly.outputvcf = new File(dellyDir, sample + ".delly.del.vcf")
delly.mainFunction = true
add(delly)
catVariants.variant :+= delly.outputvcf
......@@ -54,7 +53,6 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "DUP"
delly.isIntermediate = true
delly.outputvcf = new File(dellyDir, sample + ".delly.dup.vcf")
delly.mainFunction = true
add(delly)
catVariants.variant :+= delly.outputvcf
......@@ -65,7 +63,6 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "INV"
delly.isIntermediate = true
delly.outputvcf = new File(dellyDir, sample + ".delly.inv.vcf")
delly.mainFunction = true
add(delly)
catVariants.variant :+= delly.outputvcf
......@@ -76,7 +73,6 @@ class Delly(val root: Configurable) extends SvCaller {
delly.analysistype = "TRA"
delly.isIntermediate = true
delly.outputvcf = new File(dellyDir, sample + ".delly.tra.vcf")
delly.mainFunction = true
add(delly)
catVariants.variant :+= delly.outputvcf
......@@ -84,13 +80,11 @@ class Delly(val root: Configurable) extends SvCaller {
if (catVariants.variant.isEmpty) Logging.addError("At least 1 SV-type should be selected for Delly")
catVariants.mainFunction = true
add(catVariants)
val compressedVCF = new SortVcf(this)
compressedVCF.input = catVariants.outputFile
compressedVCF.output = catVariants.outputFile + ".gz"
compressedVCF.mainFunction = true
add(compressedVCF)
addVCF(sample, compressedVCF.output)
......
......@@ -41,11 +41,9 @@ class Pindel(val root: Configurable) extends SvCaller {
cfg.input = bamFile
cfg.sampleName = sample + sampleNameSuffix
cfg.output = configFile
cfg.mainFunction = true
add(cfg)
val pindel = PindelCaller(this, cfg.output, pindelDir)
pindel.mainFunction = true
add(pindel)
// Current date
......@@ -58,13 +56,11 @@ class Pindel(val root: Configurable) extends SvCaller {
pindelVcf.pindelOutputRoot = Some(new File(pindelDir, "sample"))
pindelVcf.rDate = todayformat.format(today) // officially, we should enter the date of the genome here
pindelVcf.outputVCF = new File(pindelDir, s"${sample}.pindel.vcf")
pindelVcf.mainFunction = true
add(pindelVcf)
val compressedVCF = new SortVcf(this)
compressedVCF.input = pindelVcf.outputVCF
compressedVCF.output = new File(pindelDir, s"${sample}.pindel.vcf.gz")
compressedVCF.mainFunction = true
add(compressedVCF)
addVCF(sample, compressedVCF.output)
......
......@@ -37,7 +37,6 @@ class Bcftools(val root: Configurable) extends Variantcaller {
bt.c = true
val pipe = mp | new FixMpileup(this) | bt > outputFile
pipe.mainFunction = true
add(pipe)
add(Tabix(this, outputFile))
}
......
......@@ -39,7 +39,6 @@ class BcftoolsSingleSample(val root: Configurable) extends Variantcaller {
bt.output = new File(outputDir, sample + ".vcf.gz")
val pipe = mp | new FixMpileup(this) | bt
pipe.mainFunction = true
add(pipe)
add(Tabix(this, bt.output))
bt.output
......@@ -50,7 +49,6 @@ class BcftoolsSingleSample(val root: Configurable) extends Variantcaller {
bcfmerge.input = sampleVcfs
bcfmerge.output = outputFile
bcfmerge.O = Some("z")
bcfmerge.mainFunction = true
add(bcfmerge)
} else add(Ln.apply(this, sampleVcfs.head, outputFile))
add(Tabix(this, outputFile))
......
......@@ -29,7 +29,6 @@ class Freebayes(val root: Configurable) extends Variantcaller {
fb.bamfiles = inputBams.values.toList
fb.outputVcf = new File(outputDir, namePrefix + ".freebayes.vcf")
val pipe = fb | new Bgzip(this) > outputFile
pipe.mainFunction = true
add(pipe)
add(Tabix.apply(this, outputFile))
......
......@@ -29,7 +29,6 @@ class HaplotypeCaller(val root: Configurable) extends Variantcaller {
def biopetScript() {
val hc = gatk.HaplotypeCaller(this, inputBams.values.toList, outputFile)
hc.mainFunction = true
add(hc)
}
}
......
......@@ -34,7 +34,6 @@ class HaplotypeCallerAllele(val root: Configurable) extends Variantcaller {
val hc = gatk.HaplotypeCaller(this, inputBams.values.toList, outputFile)
hc.alleles = Some(alleles)
hc.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES")
hc.mainFunction = true
add(hc)
}
}
......@@ -44,13 +44,11 @@ class HaplotypeCallerGvcf(val root: Configurable) extends Variantcaller {
def biopetScript() {
gVcfFiles = for ((sample, inputBam) <- inputBams) yield {
val hc = gatk.HaplotypeCaller(this, List(inputBam), new File(outputDir, sample + ".gvcf.vcf.gz"))
hc.mainFunction = true
add(hc)
sample -> hc.out
}
val genotypeGVCFs = gatk.GenotypeGVCFs(this, gVcfFiles.values.toList, outputFile)
genotypeGVCFs.mainFunction = true
add(genotypeGVCFs)
}
}
......@@ -41,7 +41,6 @@ class RawVcf(val root: Configurable) extends Variantcaller {
m2v.inputBam = bamFile
m2v.output = new File(outputDir, sample + ".raw.vcf")
val pipe = mp | m2v
pipe.mainFunction = true
add(pipe)
val vcfFilter = new VcfFilter(this) {
......@@ -54,7 +53,6 @@ class RawVcf(val root: Configurable) extends Variantcaller {
}
vcfFilter.inputVcf = m2v.output
vcfFilter.outputVcf = new File(outputDir, bamFile.getName.stripSuffix(".bam") + ".raw.filter.vcf.gz")
vcfFilter.mainFunction = true
add(vcfFilter)
vcfFilter.outputVcf
}
......@@ -64,7 +62,6 @@ class RawVcf(val root: Configurable) extends Variantcaller {
cv.out = outputFile
cv.setKey = Some("null")
cv.excludeNonVariants = !keepRefCalls
cv.mainFunction = true
add(cv)
}
}
......@@ -29,7 +29,6 @@ class UnifiedGenotyper(val root: Configurable) extends Variantcaller {
def biopetScript() {
val ug = gatk.UnifiedGenotyper(this, inputBams.values.toList, outputFile)
ug.mainFunction = true
add(ug)
}
}
......@@ -33,7 +33,6 @@ class UnifiedGenotyperAllele(val root: Configurable) extends Variantcaller {
val ug = gatk.UnifiedGenotyper(this, inputBams.values.toList, outputFile)
ug.alleles = Some(alleles)
ug.genotyping_mode = Some("GENOTYPE_GIVEN_ALLELES")
ug.mainFunction = true
add(ug)
}
}
......@@ -62,7 +62,6 @@ class VarscanCnsSingleSample(val root: Configurable) extends Variantcaller {
val variantcallingJob = mpileup | new FixMpileup(this) | varscan | new Bgzip(this) > sampleVcf
variantcallingJob.threadsCorrection = -2
variantcallingJob.mainFunction = true
add(variantcallingJob)
add(Tabix(this, sampleVcf))
......@@ -74,7 +73,6 @@ class VarscanCnsSingleSample(val root: Configurable) extends Variantcaller {
cv.out = outputFile
cv.setKey = Some("null")
cv.excludeNonVariants = true
cv.mainFunction = true
add(cv)
}
}
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