-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from TRON-Bioinformatics/migrate-dsl2
Migrate to DSL 2
- Loading branch information
Showing
16 changed files
with
478 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
params.memory_mutect2 = "16g" | ||
params.cpus_mutect2 = 2 | ||
params.output = 'output' | ||
params.gnomad = false | ||
params.pon = false | ||
params.disable_common_germline_filter = false | ||
params.reference = false | ||
params.intervals = false | ||
|
||
|
||
process MUTECT2 { | ||
cpus params.cpus_mutect2 | ||
memory params.memory_mutect2 | ||
tag "${name}" | ||
publishDir "${params.output}/${name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
tuple val(name), val(tumor_bam), val(normal_bam) | ||
|
||
output: | ||
tuple val("${name}"), file("${name}.mutect2.unfiltered.vcf"), file("${name}.mutect2.unfiltered.vcf.stats"), emit: unfiltered_vcfs | ||
tuple val("${name}"), file("${name}.f1r2.tar.gz"), emit: f1r2_stats | ||
|
||
script: | ||
normal_panel_option = params.pon ? "--panel-of-normals ${params.pon}" : "" | ||
germline_filter = params.disable_common_germline_filter ? "" : "--germline-resource ${params.gnomad}" | ||
normal_inputs = normal_bam.split(",").collect({v -> "--input $v"}).join(" ") | ||
tumor_inputs = tumor_bam.split(",").collect({v -> "--input $v"}).join(" ") | ||
intervals_option = params.intervals ? "--intervals ${params.intervals}" : "" | ||
""" | ||
gatk --java-options '-Xmx${params.memory_mutect2}' Mutect2 \ | ||
--reference ${params.reference} \ | ||
${intervals_option} \ | ||
${germline_filter} \ | ||
${normal_panel_option} \ | ||
${normal_inputs} --normal-sample normal \ | ||
${tumor_inputs} --tumor-sample tumor \ | ||
--output ${name}.mutect2.unfiltered.vcf \ | ||
--f1r2-tar-gz ${name}.f1r2.tar.gz | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
params.memory_read_orientation = "16g" | ||
params.cpus_read_orientation = 2 | ||
params.output = 'output' | ||
|
||
|
||
process LEARN_READ_ORIENTATION_MODEL { | ||
cpus params.cpus_read_orientation | ||
memory params.memory_read_orientation | ||
tag "${name}" | ||
publishDir "${params.output}/${name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
tuple val(name), file(f1r2_stats) | ||
|
||
output: | ||
tuple val(name), file("${name}.read-orientation-model.tar.gz"), emit: read_orientation_model | ||
|
||
""" | ||
gatk --java-options '-Xmx${params.memory_read_orientation}' LearnReadOrientationModel \ | ||
--input ${f1r2_stats} \ | ||
--output ${name}.read-orientation-model.tar.gz | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
params.memory_pileup = "32g" | ||
params.cpus_pileup = 2 | ||
params.output = 'output' | ||
params.gnomad = false | ||
|
||
|
||
process PILEUP_SUMMARIES { | ||
cpus params.cpus_pileup | ||
memory params.memory_pileup | ||
tag "${name}" | ||
publishDir "${params.output}/${name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
tuple val(name), val(tumor_bam), val(normal_bam) | ||
|
||
output: | ||
tuple val("${name}"), file("${name}.pileupsummaries.table"), emit: pileupsummaries | ||
|
||
script: | ||
tumor_inputs = tumor_bam.split(",").collect({v -> "--input $v"}).join(" ") | ||
""" | ||
gatk --java-options '-Xmx${params.memory_pileup}' GetPileupSummaries \ | ||
--intervals ${params.gnomad} \ | ||
--variant ${params.gnomad} \ | ||
${tumor_inputs} \ | ||
--output ${name}.pileupsummaries.table | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
params.memory_contamination = "16g" | ||
params.cpus_contamination = 2 | ||
params.output = 'output' | ||
|
||
|
||
process CALCULATE_CONTAMINATION { | ||
cpus params.cpus_contamination | ||
memory params.memory_contamination | ||
tag "${name}" | ||
publishDir "${params.output}/${name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
tuple val(name), file(table) | ||
|
||
output: | ||
tuple val(name), file("${name}.segments.table"), file("${name}.calculatecontamination.table"), emit: contaminationTables | ||
|
||
""" | ||
gatk --java-options '-Xmx${params.memory_contamination}' CalculateContamination \ | ||
--input ${table} \ | ||
-tumor-segmentation ${name}.segments.table \ | ||
--output ${name}.calculatecontamination.table | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
params.memory_filter = "16g" | ||
params.cpus_filter = 2 | ||
params.output = 'output' | ||
params.reference = false | ||
|
||
|
||
process FILTER_CALLS { | ||
cpus params.cpus_filter | ||
memory params.memory_filter | ||
tag "${name}" | ||
publishDir "${params.output}/${name}", mode: "copy" | ||
|
||
conda (params.enable_conda ? "bioconda::gatk4=4.2.0.0" : null) | ||
|
||
input: | ||
tuple val(name), file(segments_table), file(contamination_table), file(model), file(unfiltered_vcf), file(vcf_stats) | ||
|
||
output: | ||
tuple val(name), val("${params.output}/${name}/${name}.mutect2.vcf"), emit: final_vcfs | ||
file "${name}.mutect2.vcf" | ||
|
||
""" | ||
gatk --java-options '-Xmx${params.memory_filter}' FilterMutectCalls \ | ||
-V ${unfiltered_vcf} \ | ||
--reference ${params.reference} \ | ||
--tumor-segmentation ${segments_table} \ | ||
--contamination-table ${contamination_table} \ | ||
--ob-priors ${model} \ | ||
--output ${name}.mutect2.vcf | ||
""" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.