diff --git a/docs/usage.md b/docs/usage.md index 1bc6a75..91ff464 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -114,6 +114,24 @@ If you are running the pipeline to generate references for the GATK's germlinecn 1 To learn more about this file, see [this comment](https://gatk.broadinstitute.org/hc/en-us/community/posts/360074399831/comments/13441240230299) on GATK forum.
+### cnvkit + +If you are running the pipeline to generate references for the CNVkit variant calling workflow, you should consider that currently the default method for this pipeline is whole-genome. In order to use the CNVkit default, i.e. hybrid capture, when the user is creating a background for targeted capture sequencing (most commonly, exomes or panels), the user should + +1. provide an additional config file, in order to change or remove the method specified in the default `ext.args`, i.e. + +``` +process { + + withName: CNVKIT_BATCH { + ext.args = {"--output-reference ${meta.id}.cnn"} + } + +} +``` + +2. provide the `--cnvkit_target` parameter (optional) as a .bed file for the targets + ## Core Nextflow arguments > **NB:** These options are part of Nextflow and use a _single_ hyphen (pipeline parameters use a double-hyphen). diff --git a/nextflow.config b/nextflow.config index 7956a66..75bd145 100644 --- a/nextflow.config +++ b/nextflow.config @@ -28,6 +28,9 @@ params { scatter_content = 5000 segmental_duplications = null + // CNVkit options + cnvkit_targets = null + // MultiQC options multiqc_config = null multiqc_title = null diff --git a/nextflow_schema.json b/nextflow_schema.json index 1e05670..dafa1b2 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -66,6 +66,17 @@ } } }, + "cnvkit_options": { + "title": "CNVkit options", + "type": "object", + "description": "Options used by the cnvkit subworkflow", + "default": "", + "properties": { + "cnvkit_targets": { + "type": "string" + } + } + }, "input_output_options": { "title": "Input/output options", "type": "object", @@ -384,6 +395,9 @@ { "$ref": "#/definitions/germlinecnvcaller_options" }, + { + "$ref": "#/definitions/cnvkit_options" + }, { "$ref": "#/definitions/input_output_options" }, diff --git a/workflows/createpanelrefs.nf b/workflows/createpanelrefs.nf index d6cc32e..5105db9 100644 --- a/workflows/createpanelrefs.nf +++ b/workflows/createpanelrefs.nf @@ -43,14 +43,16 @@ ch_input = ch_from_samplesheet.map{meta, bam, bai, cram, crai -> } // Initialize file channels based on params, defined in the params.genomes[params.genome] scope -ch_dict = params.dict ? Channel.fromPath(params.dict).map { dict -> [[id:dict.baseName],dict]}.collect() - : Channel.empty() -ch_fai = params.fai ? Channel.fromPath(params.fai).map { fai -> [[id:fai.baseName],fai]}.collect() - : Channel.empty() -ch_fasta = params.fasta ? Channel.fromPath(params.fasta).map { fasta -> [[id:fasta.baseName],fasta]}.collect() - : Channel.empty() -ch_ploidy_priors = params.ploidy_priors ? Channel.fromPath(params.ploidy_priors).collect() - : Channel.empty() +ch_dict = params.dict ? Channel.fromPath(params.dict).map { dict -> [[id:dict.baseName],dict]}.collect() + : Channel.empty() +ch_fai = params.fai ? Channel.fromPath(params.fai).map { fai -> [[id:fai.baseName],fai]}.collect() + : Channel.empty() +ch_fasta = params.fasta ? Channel.fromPath(params.fasta).map { fasta -> [[id:fasta.baseName],fasta]}.collect() + : Channel.empty() +ch_ploidy_priors = params.ploidy_priors ? Channel.fromPath(params.ploidy_priors).collect() + : Channel.empty() +ch_cnvkit_targets = params.cnvkit_targets ? Channel.fromPath(params.cnvkit_targets).map { targets -> [[id:targets.baseName],targets]}.collect() + : Channel.value([[:],[]]) /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -117,7 +119,7 @@ workflow CREATEPANELREFS { .map {meta, bam -> [ meta, [], bam ]} .set { ch_cnvkit_input } - CNVKIT_BATCH ( ch_cnvkit_input, ch_fasta, [[:],[]], [[:],[]], [[:],[]], true ) + CNVKIT_BATCH ( ch_cnvkit_input, ch_fasta, [[:],[]], ch_cnvkit_targets, [[:],[]], true ) ch_versions = ch_versions.mix(CNVKIT_BATCH.out.versions) }