Skip to content

Commit

Permalink
Removed snpeff bits, we only annotate with VEP. Adapt parameters acco…
Browse files Browse the repository at this point in the history
…rding to skip_tools as well.
  • Loading branch information
RaqManzano committed Aug 17, 2023
1 parent 87e5339 commit 6f3d36b
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 190 deletions.
2 changes: 1 addition & 1 deletion assets/multiqc_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module_order:
name: "Read Alignment (STAR)"
- picard:
name: "GATK4 MarkDuplicates"
info: " metrics generated either by GATK4 MarkDuplicates or EstimateLibraryComplexity (with --use_gatk_spark)."
info: " metrics generated either by GATK4 MarkDuplicates."
- samtools:
name: "Samtools Flagstat"
- mosdepth:
Expand Down
26 changes: 6 additions & 20 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -325,10 +325,8 @@ process {
}

withName: ".*:GATK4_MAPPING:(BWAMEM.*_MEM|DRAGMAP_ALIGN)" {
// Markduplicates Spark NEEDS name-sorted reads or runtime goes through the roof
// However if it's skipped, reads need to be coordinate-sorted
// Only name sort if Spark for Markduplicates + duplicate marking is not skipped
ext.args2 = { params.use_gatk_spark && params.use_gatk_spark.contains('markduplicates') && (!params.skip_tools || (params.skip_tools && !params.skip_tools.split(',').contains('markduplicates'))) ? '-n' : '' }
ext.args2 = { (!params.skip_tools || (params.skip_tools && !params.skip_tools.split(',').contains('markduplicates'))) ? '-n' : '' }
ext.prefix = { params.split_fastq > 1 ? "${meta.id}".concat('.').concat(reads.get(0).name.tokenize('.')[0]) : "" }
publishDir = [
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -650,21 +648,9 @@ process {
// ]
// }

if (params.use_gatk_spark && params.use_gatk_spark.split(',').contains('markduplicates')) {
withName: '.*:GATK_PREPROCESSING:MARKDUPLICATES_SPARK:SAMTOOLS_CRAMTOBAM'{
ext.prefix = { "${meta.id}.md" }
ext.when = { params.save_output_as_bam}
publishDir = [
enabled: params.save_output_as_bam,
mode: params.publish_dir_mode,
path: { "${params.outdir}/preprocessing/markduplicates/${meta.patient}/${meta.id}/" },
pattern: "*{md.bam,md.bam.bai}"
]
}
}

// PREPARE_RECALIBRATION
withName: 'BASERECALIBRATOR|BASERECALIBRATOR_SPARK' {
withName: 'BASERECALIBRATOR' {
ext.args = { meta.status == 2 ? "--lenient" : "" }
ext.prefix = { meta.num_intervals <= 1 ? "${meta.id}.recal" : "${meta.id}_${intervals.simpleName}.recal" }
publishDir = [
Expand All @@ -687,7 +673,7 @@ process {

// RECALIBRATE

withName: 'APPLYBQSR|APPLYBQSR_SPARK' {
withName: 'APPLYBQSR' {
ext.prefix = { meta.num_intervals <= 1 ? "${meta.id}.recal" : "${meta.id}_${intervals.simpleName}.recal" }
publishDir = [
enabled: !params.save_output_as_bam,
Expand All @@ -700,7 +686,7 @@ process {


if ((params.step == 'mapping' || params.step == 'markduplicates'|| params.step == 'prepare_recalibration'|| params.step == 'recalibrate') && (!(params.skip_tools && params.skip_tools.split(',').contains('baserecalibrator')))) {
withName: '.*:GATK_PREPROCESSING:(RECALIBRATE|RECALIBRATE_SPARK):MERGE_INDEX_CRAM:MERGE_CRAM' {
withName: '.*:GATK_PREPROCESSING:RECALIBRATE:MERGE_INDEX_CRAM:MERGE_CRAM' {
ext.prefix = { "${meta.id}.recal" }
ext.when = { meta.num_intervals > 1 }
publishDir = [
Expand All @@ -711,7 +697,7 @@ process {
]
}

withName: '.*:GATK_PREPROCESSING:(RECALIBRATE|RECALIBRATE_SPARK):MERGE_INDEX_CRAM:INDEX_CRAM' {
withName: '.*:GATK_PREPROCESSING:RECALIBRATE:MERGE_INDEX_CRAM:INDEX_CRAM' {
publishDir = [
enabled: !params.save_output_as_bam,
mode: params.publish_dir_mode,
Expand Down Expand Up @@ -1326,7 +1312,7 @@ process {
path: { "${params.outdir}/reports"},
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename },
enabled: !params.skip_multiqc
enabled: !(params.tools && (params.skip_tools.split(',').contains('multiqc')))
]
errorStrategy = {task.exitStatus == 143 ? 'retry' : 'ignore'}
}
Expand Down
16 changes: 1 addition & 15 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ params {

// Alignment
aligner = 'bwa-mem' // Only STAR is currently supported.
use_gatk_spark = null // GATK Spark implementation of their tools in local mode not used by default
star_twopass = true
star_ignore_sjdbgtf = false // Ignore GTF file while creating index or alignment by STAR
star_max_memory_bamsort = 0 // STAR parameter limitBAMsortRAM to specify maximum RAM for sorting BAM
Expand All @@ -48,12 +47,6 @@ params {
dragmap = null
hisat2_build_memory = null

// Skip steps
skip_baserecalibration = false
skip_intervallisttools = false
skip_variantfiltration = false
skip_variantannotation = false
skip_multiqc = false

// Preprocessing of alignment
remove_duplicates = false
Expand Down Expand Up @@ -95,16 +88,9 @@ params {
ignore_soft_clipped_bases = true
// Variant annotation
tools = null // No default Variant_Calling or Annotation tools
annotate_tools = null // List of annotation tools to run - snpeff or vep or merge
annotate_tools = null // List of annotation tools to run - only vep available
annotation_cache = false // Annotation cache disabled
cadd_cache = null // CADD cache disabled
cadd_indels = null // No CADD InDels file
cadd_indels_tbi = null // No CADD InDels index
cadd_wg_snvs = null // No CADD SNVs file
cadd_wg_snvs_tbi = null // No CADD SNVs index
genesplicer = null // genesplicer disabled within VEP
snpeff_cache = null // No directory for snpEff cache
snpeff_db = null // No default db for snpeff
vep_cache = null // No directory for VEP cache
vep_genome = null // No default genome for VEP
// vep_cache_version = '106' // No default cache version for VEP
Expand Down
94 changes: 54 additions & 40 deletions nextflow_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@
"type": "string",
"fa_icon": "fas fa-toolbox",
"description": "Tools to use for variant calling and/or for annotation.",
"help_text": "Multiple tools separated with commas.\n\n**Variant Calling:**\n\nGermline variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: DeepVariant, FreeBayes, HaplotypeCaller, mpileup, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit\n\nTumor-only somatic variant calling can currently be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, mpileup, Mutect2, Strelka\n- Structural Variants: Manta, TIDDIT\n- Copy-number: CNVKit, ControlFREEC\n\nSomatic variant calling can currently only be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, Mutect2, Strelka2\n- Structural variants: Manta, TIDDIT\n- Copy-Number: ASCAT, CNVKit, Control-FREEC\n- Microsatellite Instability: MSIsensorpro\n\n> **NB** Mutect2 for somatic variant calling cannot be combined with `--no_intervals`\n\n**Annotation:**\n \n- snpEff, VEP, merge (both consecutively).\n\n> **NB** As Sarek will use bgzip and tabix to compress and index VCF files annotated, it expects VCF files to be sorted when starting from `--step annotate`.",
"pattern": "^((freebayes|manta|merge|sage|mutect2|snpeff|strelka|vep|consensus|filtering|normalise|normalize|rna_filtering|vcf_qc|vcf2maf|preprocessing|second_run)*,?)*$"
"help_text": "Multiple tools separated with commas.\n\n**Variant Calling:**\n\nSomatic variant calling can currently only be performed with the following variant callers:\n- SNPs/Indels: FreeBayes, Mutect2, Strelka2, SAGE\n\n> **NB** Mutect2 for somatic variant calling cannot be combined with `--no_intervals`\n\n**Annotation:**\n \n- VEP (only).\n\n> **NB** As RNADNAVAR will use bgzip and tabix to compress and index VCF files annotated, it expects VCF files to be sorted when starting from `--step annotate`.",
"pattern": "^((freebayes|manta|merge|sage|mutect2|strelka|vep|consensus|filtering|normalise|normalize|rna_filtering|vcf_qc|vcf2maf|preprocessing|second_run)*,?)*$"
},
"skip_tools": {
"type": "string",
Expand Down Expand Up @@ -504,79 +504,93 @@
"annotate_tools": {
"type": "string",
"fa_icon": "fas fa-hammer",
"description": "Specify which tools RNADNAvar should use for annotating variants. Values can be 'snpeff', 'vep' or 'merge'. If you specify 'merge', the pipeline runs both snpeff and VEP annotation.",
"description": "Specify which tools RNADNAvar should use for annotating variants. Only VEP implemented.",
"help_text": "List of tools to be used for variant annotation.",
"pattern": "^((snpeff|vep|merge)*(,)*)*$",
"pattern": "^((vep)*(,)*)*$",
"hidden": true
},
"annotation_cache": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable the use of cache for annotation",
"help_text": "And disable usage of snpeff and vep specific containers for annotation\n\nTo be used with `--snpeff_cache` and/or `--vep_cache`",
"help_text": "And disable usage of vep specific containers for annotation\n\nTo be used with `--vep_cache`",
"hidden": true
},
"cadd_cache": {
"genesplicer": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable CADD cache.",
"fa_icon": "fas fa-gavel",
"description": "Enable the use of the VEP GeneSplicer plugin.",
"hidden": true
},
"cadd_indels": {
"type": "string",
"fa_icon": "fas fa-file",
"description": "Path to CADD InDels file.",
"hidden": true
"vep_loftee": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable the use of the VEP LOFTEE plugin.",
"hidden": true,
"help_text": "For details, see [here](https://github.com/konradjk/loftee)."
},
"cadd_indels_tbi": {
"vep_cache": {
"type": "string",
"fa_icon": "fas fa-file",
"description": "Path to CADD InDels index.",
"fa_icon": "fas fa-database",
"description": "Path to VEP cache",
"help_text": "To be used with `--annotation_cache`",
"hidden": true
},
"cadd_wg_snvs": {
"vep_dbnsfp": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable the use of the VEP dbNSFP plugin.",
"hidden": true,
"help_text": "For details, see [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html#dbnsfp)."
},
"vep_spliceai": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable the use of the VEP SpliceAI plugin.",
"hidden": true,
"help_text": "For details, see [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html#spliceai)."
},
"spliceai_snv": {
"type": "string",
"fa_icon": "fas fa-file",
"description": "Path to CADD SNVs file.",
"description": "Path to spliceai raw scores snv file.",
"help_text": "To be used with `--vep_spliceai`.",
"hidden": true
},
"cadd_wg_snvs_tbi": {
"spliceai_snv_tbi": {
"type": "string",
"fa_icon": "fas fa-file",
"description": "Path to CADD SNVs index.",
"hidden": true
},
"genesplicer": {
"type": "boolean",
"fa_icon": "fas fa-gavel",
"description": "Enable the use of the VEP GeneSplicer plugin.",
"description": "Path to spliceai raw scores snv tabix indexed file.",
"help_text": "To be used with `--vep_spliceai`.",
"hidden": true
},
"snpeff_cache": {
"spliceai_indel": {
"type": "string",
"fa_icon": "fas fa-database",
"description": "Path to snpEff cache",
"help_text": "To be used with `--annotation_cache`",
"fa_icon": "fas fa-file",
"description": "Path to spliceai raw scores indel file.",
"help_text": "To be used with `--vep_spliceai`.",
"hidden": true
},
"vep_cache": {
"spliceai_indel_tbi": {
"type": "string",
"fa_icon": "fas fa-database",
"description": "Path to VEP cache",
"help_text": "To be used with `--annotation_cache`",
"fa_icon": "fas fa-file",
"description": "Path to spliceai raw scores indel tabix indexed file.",
"help_text": "To be used with `--vep_spliceai`.",
"hidden": true
},
"vep_dbnsfp": {
"vep_spliceregion": {
"type": "boolean",
"fa_icon": "fas fa-database",
"description": "Enable the use of the VEP dbNSFP plugin.",
"description": "Enable the use of the VEP SpliceRegion plugin.",
"hidden": true,
"help_text": "For details, see [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html#dbnsfp)."
"help_text": "For details, see [here](https://www.ensembl.org/info/docs/tools/vep/script/vep_plugins.html#spliceregion) and [here](https://www.ensembl.info/2018/10/26/cool-stuff-the-vep-can-do-splice-site-variant-annotation/)."
},
"snpeff_db": {
"vep_custom_args": {
"type": "string",
"fa_icon": "fas fa-database",
"description": "snpEff DB version"
"fa_icon": "fas fa-toolbox",
"description": "Add an extra custom argument to VEP.",
"hidden": true,
"help_text": "Using this params you can add custom args to VEP."
},
"vep_genome": {
"type": "string",
Expand Down
28 changes: 0 additions & 28 deletions subworkflows/nf-core/annotation/snpeff/main.nf

This file was deleted.

29 changes: 0 additions & 29 deletions subworkflows/nf-core/annotation/snpeff/meta.yml

This file was deleted.

34 changes: 0 additions & 34 deletions subworkflows/nf-core/snpeff_annotate.nf

This file was deleted.

23 changes: 2 additions & 21 deletions tests/test_annotation.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,8 @@
- name: Run snpEff
command: nextflow run main.nf -profile test,docker --annotate_tools snpeff
tags:
- annotation
- snpeff
files:
- path: results/variant_annotation/GM12878/GM12878_snpEff.ann.vcf.gz
- path: results/variant_annotation/GM12878/GM12878_snpEff.ann.vcf.gz.tbi
- path: results/reports/multiqc_report.html
- name: Run VEP
command: nextflow run main.nf -profile test,docker --annotate_tools vep --skip_multiqc
command: nextflow run main.nf -profile test,docker --tools vep --skip_tools 'multiqc'
tags:
- annotation
- vep
files:
- path: results/variant_annotation/GM12878/GM12878_VEP.ann.vcf.gz
- path: results/variant_annotation/GM12878/GM12878_VEP.ann.vcf.gz.tbi
- name: Run snpEff followed by VEP
command: nextflow run main.nf -profile test,docker --annotate_tools merge --skip_multiqc
tags:
- annotation
- merge
- snpeff
- vep
files:
- path: results/variant_annotation/GM12878/GM12878_snpEff_VEP.ann.vcf.gz
- path: results/variant_annotation/GM12878/GM12878_snpEff_VEP.ann.vcf.gz.tbi
- path: results/variant_annotation/GM12878/GM12878_VEP.ann.vcf.gz.tbi
2 changes: 1 addition & 1 deletion tests/test_skipbasecalib.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- name: Run pipeline without base calibration step
command: nextflow run main.nf -profile test,docker --skip_baserecalibration true
command: nextflow run main.nf -profile test,docker --skip_tools 'baserecalibrator'
tags:
- skipbasecalib
- preprocessing
Expand Down
Loading

0 comments on commit 6f3d36b

Please sign in to comment.