Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add contamination parameter for Control-FREEC #372

Merged
merged 1 commit into from
May 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,14 @@ def helpMessage() {
Requires that --ascat_ploidy is set
--cf_coeff [str] Control-FREEC coefficientOfVariation
Default: ${params.cf_coeff}
--cf_contamination_adjustment[bool] Control-FREEC contaminationAdjustment
maxulysse marked this conversation as resolved.
Show resolved Hide resolved
Default: Disabled
--cf_contamination [int] Control-FREEC contamination value
Default: Disabled
--cf_ploidy [str] Control-FREEC ploidy
Default: ${params.cf_ploidy}
--cf_window [int] Control-FREEC window size
Default: Disabled
--cf_contamination_adjustment[bool] Control-FREEC contaminationAdjustment
Default: Disabled
--generate_gvcf [bool] Enable g.vcf output from GATK HaplotypeCaller
--no_strelka_bp [bool] Will not use Manta candidateSmallIndels for Strelka (not recommended by Best Practices)
--pon [file] Panel-of-normals VCF (bgzipped) for GATK Mutect2 / Sentieon TNscope
Expand Down Expand Up @@ -429,10 +431,11 @@ if ('ascat' in tools) {

if ('controlfreec' in tools) {
summary['Control-FREEC'] = "Options"
if (params.cf_window) summary['window'] = params.cf_window
if (params.cf_coeff) summary['coefficientOfVariation'] = params.cf_coeff
if (params.cf_ploidy) summary['ploidy'] = params.cf_ploidy
if (params.cf_contamination) summary['contamination'] = params.cf_contamination
if (params.cf_contamination_adjustment) summary['contaminationAdjustment'] = params.cf_contamination_adjustment
if (params.cf_ploidy) summary['ploidy'] = params.cf_ploidy
if (params.cf_window) summary['window'] = params.cf_window
}

if ('haplotypecaller' in tools) summary['GVCF'] = params.generate_gvcf ? 'Yes' : 'No'
Expand Down Expand Up @@ -3365,6 +3368,7 @@ process ControlFREEC {
breakPointType = params.target_bed ? "4" : "2"
mappabilitystr = params.mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : ""
contamination_adjustment = params.cf_contamination_adjustment ? "contaminationAdjustment = TRUE" : ""
contamination_value = params.cf_contamination ? "contamination = ${params.cf_contamination}" : ""
"""
touch ${config}
echo "[general]" >> ${config}
Expand All @@ -3383,6 +3387,7 @@ process ControlFREEC {
echo "${coeffvar}" >> ${config}
echo "${mappabilitystr}" >> ${config}
echo "${contamination_adjustment}" >> ${config}
echo "${contamination_value}" >> ${config}
echo "" >> ${config}

echo "[control]" >> ${config}
Expand Down Expand Up @@ -3450,7 +3455,7 @@ process ControlFREECSingle {
breakPointType = params.target_bed ? "4" : "2"
mappabilitystr = params.mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : ""
contamination_adjustment = params.cf_contamination_adjustment ? "contaminationAdjustment = TRUE" : ""

contamination_value = params.cf_contamination ? "contamination = ${params.cf_contamination}" : ""
"""
touch ${config}
echo "[general]" >> ${config}
Expand All @@ -3469,6 +3474,7 @@ process ControlFREECSingle {
echo "${coeffvar}" >> ${config}
echo "${mappabilitystr}" >> ${config}
echo "${contamination_adjustment}" >> ${config}
echo "${contamination_value}" >> ${config}
echo "" >> ${config}

echo "[sample]" >> ${config}
Expand Down
3 changes: 2 additions & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@ params {
ascat_ploidy = null // Use default value
ascat_purity = null // Use default value
cf_coeff = "0.05" // default value for Control-FREEC
cf_contamination = null // by default not specified in Control-FREEC
cf_contamination_adjustment = null // by default we are not using this in Control-FREEC
cf_ploidy = "2" // you can use 2,3,4
cf_window = null // by default we are not using this in Control-FREEC
cf_contamination_adjustment = null // by default we are not using this in Control-FREEC
generate_gvcf = null // g.vcf are not produced by HaplotypeCaller by default
no_strelka_bp = null // Strelka will use Manta candidateSmallIndels if available
pon = false // No default PON (Panel of Normals) file for GATK Mutect2 / Sentieon TNscope
Expand Down
6 changes: 6 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,12 @@
"fa_icon": "fas fa-wrench",
"description": "Overwrite Control-FREEC contaminationAdjustement"
},
"cf_contamination": {
"type": "string",
"default": "null",
"fa_icon": "fas fa-wrench",
"description": "Design known contamination value for Control-FREEC"
},
"cf_ploidy": {
"type": "string",
"default": "2",
Expand Down