Skip to content
Snippets Groups Projects
Unverified Commit c3f2adf6 authored by Cats's avatar Cats Committed by GitHub
Browse files

Merge pull request #40 from biowdl/various_new_tasks

Add Various new tasks
parents 07f3ade6 ac408688
No related branches found
No related tags found
No related merge requests found
# Tasks
This repository contains the WDL task definitions used in the various
[Biowdl](https://github.com/biowdl) workflows and pipelines.
## Documentation
Documentation for this workflow can be found
[here](https://biowdl.github.io/tasks/).
## About
These tasks are part of [Biowdl](https://github.com/biowdl)
developed by [the SASC team](http://sasc.lumc.nl/).
## Contact
<p>
<!-- Obscure e-mail address for spammers -->
For any question related to these tasks, please use the
<a href='https://github.com/biowdl/tasks/issues'>github issue tracker</a>
or contact
<a href='http://sasc.lumc.nl/'>the SASC team</a> directly at: <a href='&#109;&#97;&#105;&#108;&#116;&#111;&#58;&#115;&#97;&#115;&#99;&#64;&#108;&#117;&#109;&#99;&#46;&#110;&#108;'>
&#115;&#97;&#115;&#99;&#64;&#108;&#117;&#109;&#99;&#46;&#110;&#108;</a>.
</p>
......@@ -417,3 +417,71 @@ task ValidateVcf {
memory: ceil(memory * memoryMultiplier)
}
}
task VcfStats {
input {
File vcfFile
File vcfIndex
File refFasta
File refFastaIndex
File refDict
String outDir
File? intervals
Array[String]+? infoTags
Array[String]+? genotypeTags
Int? sampleToSampleMinDepth
Int? binSize
Int? maxContigsInSingleJob
Boolean writeBinStats = false
Int localThreads = 1
Boolean notWriteContigStats = false
Boolean skipGeneral = false
Boolean skipGenotype = false
Boolean skipSampleDistributions = false
Boolean skipSampleCompare = false
String? sparkMaster
Int? sparkExecutorMemory
Array[String]+? sparkConfigValues
Int memory = 4
Float memoryMultiplier = 2.0
File? toolJar
String? preCommand
}
String toolCommand = if defined(toolJar)
then "java -Xmx" + memory + "G -jar " + toolJar
else "biopet-vcfstats -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
-I ~{vcfFile} \
-R ~{refFasta} \
-o ~{outDir} \
-t ~{localThreads} \
~{"--intervals " + intervals} \
~{true="--infoTag" false="" defined(infoTags)} ~{sep=" --infoTag " infoTags} \
~{true="--genotypeTag" false="" defined(genotypeTags)} ~{sep=" --genotypeTag "
genotypeTags} \
~{"--sampleToSampleMinDepth " + sampleToSampleMinDepth} \
~{"--binSize " + binSize} \
~{"--maxContigsInSingleJob " + maxContigsInSingleJob} \
~{true="--writeBinStats" false="" writeBinStats} \
~{true="--notWriteContigStats" false="" notWriteContigStats} \
~{true="--skipGeneral" false="" skipGeneral} \
~{true="--skipGenotype" false="" skipGenotype} \
~{true="--skipSampleDistributions" false="" skipSampleDistributions} \
~{true="--skipSampleCompare" false="" skipSampleCompare} \
~{"--sparkMaster " + sparkMaster} \
~{"--sparkExecutorMemory " + sparkExecutorMemory} \
~{true="--sparkConfigValue" false="" defined(sparkConfigValues)} ~{
sep=" --sparkConfigValue" sparkConfigValues}
}
runtime {
cpu: localThreads
memory: ceil(memory * memoryMultiplier)
}
}
......@@ -293,6 +293,51 @@ task HaplotypeCallerGvcf {
}
}
task MuTect2 {
input {
String? preCommand
Array[File]+ inputBams
File inputBamIndex
File refFasta
File refFastaIndex
File refDict
String outputVcf
String tumorSample
String? normalSample
Array[File]+ intervals
String? gatkJar
Int memory = 4
Float memoryMultiplier = 3
}
String toolCommand = if defined(gatkJar)
then "java -Xmx" + memory + "G -jar " + gatkJar
else "gatk --java-options -Xmx" + memory + "G"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
Mutect2 \
-R ~{refFasta} \
-I ~{sep=" -I " inputBams} \
-tumor ~{tumorSample} \
~{"-normal " + normalSample} \
-O ~{outputVcf} \
-L ~{sep=" -L " intervals}
}
output {
File vcfFile = outputVcf
}
runtime {
memory: ceil(memory * memoryMultiplier)
}
}
task SplitNCigarReads {
input {
String? preCommand
......
version 1.0
task Somatic {
input {
String? preCommand
String? installDir
String runDir
File normalBam
File tumorBam
File refFasta
Int cores = 1
Int memory = 4
}
String toolCommand = if defined(installDir)
then installDir + "bin/configureStrelkaSomaticWorkflow.py"
else "configureStrelkaSomaticWorkflow.py"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
--normalBam ~{normalBam} \
--tumorBam ~{tumorBam} \
--ref ~{refFasta} \
--runDir ~{runDir}
~{runDir}/runWorkflow.py \
-m local \
-J ~{cores} \
-g ~{memory}
}
output {
File indelsVcf = runDir + "/results/variants/somatic.indels.vcf.gz"
File indelsIndex = runDir + "/results/variants/somatic.indels.vcf.gz.tbi"
File snvVcf = runDir + "/results/variants/somatic.snvs.vcf.gz"
File snvIndex = runDir + "/results/variants/somatic.snvs.vcf.gz.tbi"
}
runtime {
cpu: cores
memory: memory
}
}
\ No newline at end of file
version 1.0
task VarDict {
input {
String? installDir
File tumorBam
File normalBam
File refFasta
File bedFile
String tumorSampleName
String normalSampleName
String outputVcf
Int chromosomeColumn = 1
Int startColumn = 2
Int endColumn = 3
Int geneColumn = 4
String? preCommand
}
String toolCommand = if defined(installDir)
then installDir + "/VarDict"
else "vardict"
command {
set -e -o pipefail
~{preCommand}
~{toolCommand} \
-G ~{refFasta} \
-N ~{tumorSampleName} \
-b "~{tumorBam}|~{normalBam}" \
-c ~{chromosomeColumn} \
-S ~{startColumn} \
-E ~{endColumn} \
-g ~{geneColumn} \
~{bedFile} | \
~{installDir + "/"}testsomatic.R | \
~{installDir + "/"}var2vcf_paired.pl \
-N "~{tumorSampleName}|~{normalSampleName}" \
> ~{outputVcf}
}
output {
File vcfFile = outputVcf
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment