Skip to content

Commit

Permalink
Merge pull request #356 from MaxUlysse/dev_controlfreec
Browse files Browse the repository at this point in the history
add option for controlfreec
  • Loading branch information
maxulysse authored Mar 9, 2021
2 parents f365b81 + eb0f8b4 commit f473afe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 7 deletions.
14 changes: 10 additions & 4 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ def helpMessage() {
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 @@ -427,9 +429,10 @@ 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_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_adjustment) summary['contaminationAdjustment'] = params.cf_contamination_adjustment
}

if ('haplotypecaller' in tools) summary['GVCF'] = params.generate_gvcf ? 'Yes' : 'No'
Expand Down Expand Up @@ -3274,7 +3277,7 @@ process ControlFREEC {
breakPointThreshold = params.target_bed ? "1.2" : "0.8"
breakPointType = params.target_bed ? "4" : "2"
mappabilitystr = params.mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : ""

contamination_adjustment = params.cf_contamination_adjustment ? "contaminationAdjustment = TRUE" : ""
"""
touch ${config}
echo "[general]" >> ${config}
Expand All @@ -3292,6 +3295,7 @@ process ControlFREEC {
echo "${window}" >> ${config}
echo "${coeffvar}" >> ${config}
echo "${mappabilitystr}" >> ${config}
echo "${contamination_adjustment}" >> ${config}
echo "" >> ${config}
echo "[control]" >> ${config}
Expand Down Expand Up @@ -3358,6 +3362,7 @@ process ControlFREECSingle {
breakPointThreshold = params.target_bed ? "1.2" : "0.8"
breakPointType = params.target_bed ? "4" : "2"
mappabilitystr = params.mappability ? "gemMappabilityFile = \${PWD}/${mappability}" : ""
contamination_adjustment = params.cf_contamination_adjustment ? "contaminationAdjustment = TRUE" : ""

"""
touch ${config}
Expand All @@ -3376,6 +3381,7 @@ process ControlFREECSingle {
echo "${window}" >> ${config}
echo "${coeffvar}" >> ${config}
echo "${mappabilitystr}" >> ${config}
echo "${contamination_adjustment}" >> ${config}
echo "" >> ${config}
echo "[sample]" >> ${config}
Expand Down
7 changes: 4 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ params {
// Variant Calling
ascat_ploidy = null // Use default value
ascat_purity = null // Use default value
cf_coeff = "0.05" // default value for 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_coeff = "0.05" // default value for 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
5 changes: 5 additions & 0 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,11 @@
"fa_icon": "fas fa-wrench",
"description": "Overwrite Control-FREEC coefficientOfVariation"
},
"cf_contamination_adjustment": {
"type": "boolean",
"fa_icon": "fas fa-wrench",
"description": "Overwrite Control-FREEC contaminationAdjustement"
},
"cf_ploidy": {
"type": "string",
"default": "2",
Expand Down

0 comments on commit f473afe

Please sign in to comment.