diff --git a/conf/modules/cnvkit.config b/conf/modules/cnvkit.config index 93b06518b5..f77c6ef446 100644 --- a/conf/modules/cnvkit.config +++ b/conf/modules/cnvkit.config @@ -28,7 +28,7 @@ process { withName: 'CNVKIT_REFERENCE' { ext.prefix = "cnvkit" - ext.when = { params.tools && params.tools.split(',').contains('cnvkit') } + ext.when = { params.tools && params.tools.split(',').contains('cnvkit') && !params.cnvkit_reference } publishDir = [ enabled: params.save_reference, mode: params.publish_dir_mode, diff --git a/nextflow.config b/nextflow.config index dd886f8262..bf074101ca 100644 --- a/nextflow.config +++ b/nextflow.config @@ -63,6 +63,7 @@ params { cf_minqual = 0 // ControlFreec default values cf_window = null // by default we are not using this in Control-FREEC cf_chrom_len = null // by default we are using the fasta_fai. This can be used to circumvent this issue until there is a better option available upstream: https://github.com/nf-core/sarek/issues/670 + cnvkit_reference = null // by default the reference is build from the fasta file ignore_soft_clipped_bases = false // no --dont-use-soft-clipped-bases for GATK Mutect2 wes = false // Set to true, if data is exome/targeted sequencing data. Used to use correct models in various variant callers joint_germline = false // g.vcf & joint germline calling are not run by default if HaplotypeCaller is selected diff --git a/nextflow_schema.json b/nextflow_schema.json index bd50522344..64c319f511 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -278,7 +278,7 @@ }, "cf_chrom_len": { "type": "string", - "default": null, + "default": "None", "fa_icon": "fas fa-ruler-horizontal", "description": "Specify a custom chromosome length file.", "help_text": "Control-FREEC requires a file containing all chromosome lenghts. By default the fasta.fai is used. If the fasta.fai file contains chromosomes not present in the intervals, it fails (see: https://github.com/BoevaLab/FREEC/issues/106).\n\nIn this case, a custom chromosome length can be specified. It must be of the same format as the fai, but only contain the relevant chromosomes.\n\n\n\n", @@ -338,6 +338,12 @@ "help_text": "Details, see [ControlFREEC manual](http://boevalab.inf.ethz.ch/FREEC/tutorial.html).", "hidden": true }, + "cnvkit_reference": { + "type": "string", + "default": null, + "fa_icon": "fas fa-file", + "help_text": "https://cnvkit.readthedocs.io/en/stable/pipeline.html?highlight=reference.cnn#batch" + }, "pon": { "type": "string", "fa_icon": "fas fa-file", diff --git a/workflows/sarek.nf b/workflows/sarek.nf index ca91a47231..682f4aaf91 100644 --- a/workflows/sarek.nf +++ b/workflows/sarek.nf @@ -18,6 +18,7 @@ def checkPathParamList = [ params.bwa, params.bwamem2, params.cf_chrom_len, + params.cnvkit_reference, params.chr_dir, params.dbnsfp, params.dbnsfp_tbi, @@ -372,7 +373,8 @@ workflow SAREK { // Antitarget based reference for CNVKit PREPARE_REFERENCE_CNVKIT(fasta, intervals_bed_combined) - cnvkit_reference = params.tools && params.tools.split(',').contains('cnvkit') ? PREPARE_REFERENCE_CNVKIT.out.cnvkit_reference : Channel.empty() + cnvkit_reference = params.tools && params.tools.split(',').contains('cnvkit') ? (params.cnvkit_reference ? Channel.fromPath(params.cnvkit_reference).collect() : PREPARE_REFERENCE_CNVKIT.out.cnvkit_reference) : Channel.empty() + ch_versions = ch_versions.mix(PREPARE_REFERENCE_CNVKIT.out.versions) // PREPROCESSING