Skip to content

Replace several skip_<tools> parameters with a single skip_tools parameter #690

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

Merged
merged 12 commits into from
Mar 26, 2025
12 changes: 9 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Parameters

| Old parameter | New parameter |
| ------------- | ------------- |
| | |
| Old parameter | New parameter |
| ------------------------ | ------------- |
| skip_haplogrep3 | skip_tools |
| skip_fastp | |
| skip_gens | |
| skip_germlinecnvcaller | |
| skip_peddy | |
| skip_smncopynumbercaller | |
| skip_vcf2cytosure | |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add skip_fastqc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip_fastqc doesn't exist actually. I just added that functionality to skip_tools 😅


### Tool updates

Expand Down
5 changes: 1 addition & 4 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,9 @@ params {
mito_name = 'MT'

// analysis params
skip_germlinecnvcaller = true
skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI
skip_mt_subsample = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip subsample on Github CI
skip_peddy = true
skip_haplogrep3 = true

skip_tools = 'gens,haplogrep3,peddy,germlinecnvcaller'
// Input data

input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_fq_spring.csv'
Expand Down
4 changes: 1 addition & 3 deletions conf/test_bam.config
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ params {
ngsbits_samplegender_method = 'sry'

// analysis params
skip_germlinecnvcaller = true
skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI
skip_mt_subsample = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip subsample on Github CI
skip_peddy = true
skip_haplogrep3 = true
skip_tools = 'gens,haplogrep3,peddy,germlinecnvcaller'


// Input data
Expand Down
5 changes: 2 additions & 3 deletions conf/test_full.config
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ params {
mito_name = 'MT'

// analysis params
skip_germlinecnvcaller = true
skip_peddy = true
skip_tools = 'gens,haplogrep3,peddy,germlinecnvcaller'

// Input data
input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_trio.csv'
input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_trio.csv'

// Genome references
fasta = params.pipelines_testdata_base_path + 'raredisease/reference/reference.fasta'
Expand Down
3 changes: 1 addition & 2 deletions conf/test_one_sample.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,9 @@ params {
mito_name = 'MT'

// analysis params
skip_germlinecnvcaller = true
skip_mt_annotation = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip annotation on Github CI
skip_mt_subsample = System.getenv("GITHUB_ACTIONS").equals(null) ? false : true // skip subsample on Github CI
skip_peddy = true
skip_tools = 'gens,haplogrep3,peddy,germlinecnvcaller'

// Input data
input = params.pipelines_testdata_base_path + 'raredisease/testdata/samplesheet_single.csv'
Expand Down
4 changes: 1 addition & 3 deletions conf/test_sentieon.config
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ params {
mito_name = 'MT'

// analysis params
skip_germlinecnvcaller = true
skip_peddy = true
skip_haplogrep3 = true
skip_tools = 'gens,haplogrep3,peddy,germlinecnvcaller'

// Input data
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/raredisease/testdata/samplesheet_trio.csv'
Expand Down
4 changes: 2 additions & 2 deletions docs/output.md
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ The pipeline performs variant calling using [Sentieon DNAscope](https://support.

#### SVDB merge

[SVDB merge](https://github.com/J35P312/SVDB#merge) is used to merge the variant calls from GATK's GermlineCNVCaller (only if `skip_germlinecnvcaller` is set to false), Manta, and TIDDIT. Output files are published in the output folder.
[SVDB merge](https://github.com/J35P312/SVDB#merge) is used to merge the variant calls from GATK's GermlineCNVCaller (only if `skip_tools` doesn't include germlinecnvcaller), Manta, and TIDDIT. Output files are published in the output folder.

<details markdown="1">
<summary>Output files</summary>
Expand Down Expand Up @@ -616,7 +616,7 @@ Provided a truth set, SNVs can be evaluated using RTG Tools' vcfeval engine. Out

### Gens

The sequencing data can be prepared for visualization of CNVs in [Gens](https://github.com/Clinical-Genomics-Lund/gens). This subworkflow is turned off by default. You can activate it by supplying the option `--skip_gens false`. You can read more about how to setup Gens [here](https://github.com/Clinical-Genomics-Lund/gens).
The sequencing data can be prepared for visualization of CNVs in [Gens](https://github.com/Clinical-Genomics-Lund/gens). You can turn it off by supplying the option `--skip_tools gens`. You can read more about how to setup Gens [here](https://github.com/Clinical-Genomics-Lund/gens).

<details markdown="1">
<summary>Output files</summary>
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ We use CADD only to annotate small indels. To annotate SNVs with precomputed CAD

##### 13. Prepare data for CNV visualisation in Gens

Optionally the read data can be prepared for CNV visualization in [Gens](https://github.com/Clinical-Genomics-Lund/gens). This subworkflow is turned off by default. You can activate it by supplying the option `--skip_gens false`.
Optionally the read data can be prepared for CNV visualization in [Gens](https://github.com/Clinical-Genomics-Lund/gens). You can turn it off it by supplying the option `--skip_tools gens`.

| Mandatory | Optional |
| ------------------------------ | -------- |
Expand Down
8 changes: 1 addition & 7 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,17 @@ params {
run_rtgvcfeval = false
save_mapped_as_cram = false
scatter_count = 20
skip_fastp = false
skip_gens = true
skip_germlinecnvcaller = false
skip_haplogrep3 = false
skip_peddy = false
skip_tools = null
skip_me_calling = false
skip_me_annotation = false
skip_mt_annotation = false
skip_repeat_annotation = false
skip_repeat_calling = false
skip_smncopynumbercaller = false
skip_snv_annotation = false

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you planning to add another skip parameter for the remaining params? Or you plan to infer it from samplesheet in future?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other skip parameters turn off entire subworkflows so it would be misleading to combine them under skip_tools. So as of now, I don't plan on combining them with skip_tools:)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

himm, maybe having them combine into --skip_subworkflows, or adding like --steps "snvcalling, snvannotation,repeat_annotation" might work.. I guess I am into clustering :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. I will do that in a different PR.

skip_snv_calling = false
skip_sv_annotation = false
skip_sv_calling = false
skip_mt_subsample = false
skip_vcf2cytosure = true
skip_vep_filter = false
cadd_resources = null
platform = 'illumina'
Expand Down
42 changes: 6 additions & 36 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -549,31 +549,6 @@
"description": "Number of intervals to split your genome into (used to parallelize annotations)",
"fa_icon": "fas fa-less-than"
},
"skip_fastp": {
"type": "boolean",
"description": "Specifies whether or not to skip trimming with fastp.",
"fa_icon": "fas fa-toggle-on"
},
"skip_gens": {
"type": "boolean",
"description": "Specifies whether or not to skip gens preprocessing subworkflow.",
"fa_icon": "fas fa-toggle-on"
},
"skip_germlinecnvcaller": {
"type": "boolean",
"description": "Specifies whether or not to skip CNV calling using GATK's GermlineCNVCaller",
"fa_icon": "fas fa-toggle-on"
},
"skip_haplogrep3": {
"type": "boolean",
"description": "Specifies whether or not to skip haplogrep3.",
"fa_icon": "fas fa-toggle-on"
},
"skip_peddy": {
"type": "boolean",
"description": "Specifies whether or not to skip peddy.",
"fa_icon": "fas fa-toggle-on"
},
"skip_me_calling": {
"type": "boolean",
"description": "Specifies whether or not to skip calling mobile elements, and the subsequent annotation step.",
Expand Down Expand Up @@ -604,11 +579,6 @@
"description": "Specifies whether or not to skip calling of repeat expansions.",
"fa_icon": "fas fa-toggle-on"
},
"skip_smncopynumbercaller": {
"type": "boolean",
"description": "Specifies whether or not to skip smncopynumbercaller.",
"fa_icon": "fas fa-toggle-on"
},
"skip_snv_annotation": {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might make sense to add more general skip option here? like skip "annotation"? I think it would be a rare case to have lets say snvannotation on while svannotaton off?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depends on the use case, I believe. There are scenarios where someone might have updated databases for SNVs, and in such cases, they might not want to run SV annotation.

"type": "boolean",
"description": "Specifies whether or not to skip annotate SNV subworkflow.",
Expand All @@ -629,12 +599,12 @@
"description": "Specifies whether or not to skip nuclear and mitochondrial SV calling and annotation.",
"fa_icon": "fas fa-toggle-on"
},
"skip_vcf2cytosure": {
"type": "boolean",
"default": true,
"description": "Specifies whether or not to skip the vcf2cytosure subworkflow",
"help_text": "vcf2cytosure can generate CGH files from a structural variant VCF file that can be analysed in the CytoSure interpretation software. Cut-offs for allele frequencies and bin sizes can be modified in the config file. Turned off by default.",
"fa_icon": "fas fa-toggle-on"
"skip_tools": {
"type": "string",
"fa_icon": "fas fa-forward",
"description": "Disable specified tools.",
"help_text": "Multiple tools can be specified, separated by commas.\n\n> **NB** `--skip_tools baserecalibrator_report` is actually just not saving the reports.\n> **NB** `--skip_tools markduplicates_report` does not skip `MarkDuplicates` but prevent the collection of duplicate metrics that slows down performance.",
"pattern": "^((fastp|gens|germlinecnvcaller|haplogrep3|peddy|smncopynumbercaller|vcf2cytosure|fastqc)?,?)*(?<!,)$"
},
"skip_vep_filter": {
"type": "boolean",
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/align.nf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ workflow ALIGN {
ch_sentieon_bai = Channel.empty()
ch_versions = Channel.empty()

if (!params.skip_fastp) {
if (!(params.skip_tools && params.skip_tools.split(',').contains('fastp'))) {
FASTP (ch_reads, [], false, false, false)
ch_reads = FASTP.out.reads
ch_versions = ch_versions.mix(FASTP.out.versions)
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/annotate_mt_snvs.nf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ workflow ANNOTATE_MT_SNVS {
TABIX_TABIX_VEP_MT(ENSEMBLVEP_MT.out.vcf)

// Running haplogrep3
if (!params.skip_haplogrep3) {
if (!(params.skip_tools && params.skip_tools.split(',').contains('haplogrep3'))) {
HAPLOGREP3_CLASSIFY_MT(ch_haplogrep_in)
ch_haplog = HAPLOGREP3_CLASSIFY_MT.out.txt
ch_versions = ch_versions.mix(HAPLOGREP3_CLASSIFY_MT.out.versions)
Expand Down
4 changes: 2 additions & 2 deletions subworkflows/local/call_structural_variants.nf
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ workflow CALL_STRUCTURAL_VARIANTS {
ch_versions = ch_versions.mix(CALL_SV_CNVNATOR.out.versions)
}

if (!params.skip_germlinecnvcaller) {
if (!(params.skip_tools && params.skip_tools.split(',').contains('germlinecnvcaller'))) {
CALL_SV_GERMLINECNVCALLER (ch_genome_bam_bai, ch_genome_fasta, ch_genome_fai, ch_readcount_intervals, ch_genome_dictionary, ch_ploidy_model, ch_gcnvcaller_model, ch_case_info)
.genotyped_filtered_segments_vcf
.collect{it[1]}
Expand All @@ -72,7 +72,7 @@ workflow CALL_STRUCTURAL_VARIANTS {
}

//merge
if (params.skip_germlinecnvcaller) {
if (params.skip_tools && params.skip_tools.split(',').contains('germlinecnvcaller')) {
if (params.analysis_type.equals("wgs")) {
tiddit_vcf
.combine(manta_vcf)
Expand Down
Loading