mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Add subworkflows for ensemblvep and snpeff (#1124)
* greatly simplify syntax * feat: add subworkflows to annotate (+ bgzip/tabix index) with ensemblvep and snpeff * feat: get versions from all tools * add commented infor for new annotation modules
This commit is contained in:
parent
7389963d5c
commit
31d4099f38
11 changed files with 196 additions and 11 deletions
26
subworkflows/nf-core/annotation_ensemblvep/main.nf
Normal file
26
subworkflows/nf-core/annotation_ensemblvep/main.nf
Normal file
|
@ -0,0 +1,26 @@
|
|||
//
|
||||
// Run VEP to annotate VCF files
|
||||
//
|
||||
|
||||
include { ENSEMBLVEP } from '../../../modules/ensemblvep/main'
|
||||
include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main'
|
||||
|
||||
workflow ANNOTATION_ENSEMBLVEP {
|
||||
take:
|
||||
vcf // channel: [ val(meta), vcf ]
|
||||
vep_genome // value: which genome
|
||||
vep_species // value: which species
|
||||
vep_cache_version // value: which cache version
|
||||
vep_cache // path: path_to_vep_cache (optionnal)
|
||||
|
||||
main:
|
||||
ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache)
|
||||
ANNOTATION_BGZIPTABIX(ENSEMBLVEP.out.vcf)
|
||||
|
||||
ch_versions = ENSEMBLVEP.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first())
|
||||
|
||||
emit:
|
||||
vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ]
|
||||
reports = ENSEMBLVEP.out.report // path: *.html
|
||||
versions = ch_versions // path: versions.yml
|
||||
}
|
29
subworkflows/nf-core/annotation_ensemblvep/meta.yml
Normal file
29
subworkflows/nf-core/annotation_ensemblvep/meta.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: annotation_ensemblvep
|
||||
description: |
|
||||
Perform annotation with ensemblvep and bgzip + tabix index the resulting VCF file
|
||||
keywords:
|
||||
- ensemblvep
|
||||
modules:
|
||||
- ensemblvep
|
||||
- tabix/bgziptabix
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test' ]
|
||||
- input:
|
||||
type: vcf
|
||||
description: list containing one vcf file
|
||||
pattern: "[ *.{vcf,vcf.gz} ]"
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: 'versions.yml'
|
||||
- vcf_tbi:
|
||||
type: file
|
||||
description: Compressed vcf file + tabix index
|
||||
pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]"
|
||||
authors:
|
||||
- '@maxulysse'
|
23
subworkflows/nf-core/annotation_snpeff/main.nf
Normal file
23
subworkflows/nf-core/annotation_snpeff/main.nf
Normal file
|
@ -0,0 +1,23 @@
|
|||
//
|
||||
// Run SNPEFF to annotate VCF files
|
||||
//
|
||||
|
||||
include { SNPEFF } from '../../../modules/snpeff/main'
|
||||
include { TABIX_BGZIPTABIX as ANNOTATION_BGZIPTABIX } from '../../../modules/tabix/bgziptabix/main'
|
||||
|
||||
workflow ANNOTATION_SNPEFF {
|
||||
take:
|
||||
vcf // channel: [ val(meta), vcf ]
|
||||
snpeff_db // value: version of db to use
|
||||
snpeff_cache // path: path_to_snpeff_cache (optionnal)
|
||||
|
||||
main:
|
||||
SNPEFF(vcf, snpeff_db, snpeff_cache)
|
||||
ANNOTATION_BGZIPTABIX(SNPEFF.out.vcf)
|
||||
ch_versions = SNPEFF.out.versions.first().mix(ANNOTATION_BGZIPTABIX.out.versions.first())
|
||||
|
||||
emit:
|
||||
vcf_tbi = ANNOTATION_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ]
|
||||
reports = SNPEFF.out.report // path: *.html
|
||||
versions = ch_versions // path: versions.yml
|
||||
}
|
29
subworkflows/nf-core/annotation_snpeff/meta.yml
Normal file
29
subworkflows/nf-core/annotation_snpeff/meta.yml
Normal file
|
@ -0,0 +1,29 @@
|
|||
name: annotation_snpeff
|
||||
description: |
|
||||
Perform annotation with snpeff and bgzip + tabix index the resulting VCF file
|
||||
keywords:
|
||||
- snpeff
|
||||
modules:
|
||||
- snpeff
|
||||
- tabix/bgziptabix
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
description: |
|
||||
Groovy Map containing sample information
|
||||
e.g. [ id:'test' ]
|
||||
- input:
|
||||
type: vcf
|
||||
description: list containing one vcf file
|
||||
pattern: "[ *.{vcf,vcf.gz} ]"
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
||||
description: File containing software versions
|
||||
pattern: 'versions.yml'
|
||||
- vcf_tbi:
|
||||
type: file
|
||||
description: Compressed vcf file + tabix index
|
||||
pattern: "[ *{.vcf.gz,vcf.gz.tbi} ]"
|
||||
authors:
|
||||
- '@maxulysse'
|
|
@ -1451,6 +1451,19 @@ yara/mapper:
|
|||
- modules/yara/mapper/**
|
||||
- tests/modules/yara/mapper/**
|
||||
|
||||
# subworkflows/align_bowtie2:
|
||||
# - subworkflows/nf-core/align_bowtie2/**
|
||||
# - tests/subworkflows/nf-core/align_bowtie2/**
|
||||
# - *subworkflows_bam_sort_samtools
|
||||
|
||||
# subworkflows/annotation_ensemblvep: &subworkflows_annotation_ensemblvep
|
||||
# - subworkflows/nf-core/annotation_ensemblvep/**
|
||||
# - tests/subworkflows/nf-core/annotation_ensemblvep/**
|
||||
|
||||
# subworkflows/annotation_snpeff: &subworkflows_annotation_snpeff
|
||||
# - subworkflows/nf-core/annotation_snpeff/**
|
||||
# - tests/subworkflows/nf-core/annotation_snpeff/**
|
||||
|
||||
# subworkflows/bam_stats_samtools: &subworkflows_bam_stats_samtools
|
||||
# - subworkflows/nf-core/bam_stats_samtools/**
|
||||
# - tests/subworkflows/nf-core/bam_stats_samtools/**
|
||||
|
@ -1462,17 +1475,6 @@ yara/mapper:
|
|||
# - *samtools_index
|
||||
# - *subworkflows_bam_stats_samtools
|
||||
|
||||
# subworkflows/align_bowtie2:
|
||||
# - subworkflows/nf-core/align_bowtie2/**
|
||||
# - tests/subworkflows/nf-core/align_bowtie2/**
|
||||
# - *subworkflows_bam_sort_samtools
|
||||
|
||||
# subworkflows/sra_fastq:
|
||||
# - subworkflows/nf-core/sra_fastq/**
|
||||
# - tests/subworkflows/nf-core/sra_fastq/**
|
||||
# - *sratools_fasterqdump
|
||||
# - *sratools_prefetch
|
||||
|
||||
# subworkflows/gatk_create_som_pon:
|
||||
# - subworkflows/nf-core/gatk_create_som_pon/**
|
||||
# - tests/subworkflows/nf-core/gatk_create_som_pon/**
|
||||
|
@ -1495,3 +1497,9 @@ yara/mapper:
|
|||
# - *gatk4_getpileupsummaries
|
||||
# - *gatk4_calculatecontamination
|
||||
# - *gatk4_filtermutectcalls
|
||||
|
||||
# subworkflows/sra_fastq:
|
||||
# - subworkflows/nf-core/sra_fastq/**
|
||||
# - tests/subworkflows/nf-core/sra_fastq/**
|
||||
# - *sratools_fasterqdump
|
||||
# - *sratools_prefetch
|
||||
|
|
14
tests/subworkflows/nf-core/annotation_ensemblvep/main.nf
Normal file
14
tests/subworkflows/nf-core/annotation_ensemblvep/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main'
|
||||
|
||||
workflow annotation_ensemblvep {
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] )
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: ENSEMBLVEP {
|
||||
container = 'nfcore/vep:104.3.WBcel235'
|
||||
publishDir = [ enabled: false ]
|
||||
}
|
||||
|
||||
withName: ANNOTATION_BGZIPTABIX {
|
||||
ext.prefix = { "${meta.id}_VEP.ann.vcf" }
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
- name: ensemblvep annotation_ensemblvep
|
||||
command: nextflow run ./tests/subworkflows/nf-core/annotation_ensemblvep -entry annotation_ensemblvep -c ./tests/config/nextflow.config -c ./tests/subworkflows/nf-core/annotation_ensemblvep/nextflow.config
|
||||
tags:
|
||||
- annotation_ensemblvep
|
||||
files:
|
||||
- path: output/annotation/test_VEP.ann.vcf.gz
|
||||
- path: output/annotation/test_VEP.ann.vcf.gz.tbi
|
14
tests/subworkflows/nf-core/annotation_snpeff/main.nf
Normal file
14
tests/subworkflows/nf-core/annotation_snpeff/main.nf
Normal file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env nextflow
|
||||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main'
|
||||
|
||||
workflow annotation_snpeff {
|
||||
input = [
|
||||
[ id:'test' ], // meta map
|
||||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
ANNOTATION_SNPEFF ( input, "WBcel235.99", [] )
|
||||
}
|
14
tests/subworkflows/nf-core/annotation_snpeff/nextflow.config
Normal file
14
tests/subworkflows/nf-core/annotation_snpeff/nextflow.config
Normal file
|
@ -0,0 +1,14 @@
|
|||
process {
|
||||
|
||||
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||
|
||||
withName: SNPEFF {
|
||||
container = 'nfcore/snpeff:5.0.WBcel235'
|
||||
publishDir = [ enabled: false ]
|
||||
}
|
||||
|
||||
withName: ANNOTATION_BGZIPTABIX {
|
||||
ext.prefix = { "${meta.id}_snpEff.ann.vcf" }
|
||||
}
|
||||
|
||||
}
|
7
tests/subworkflows/nf-core/annotation_snpeff/test.yml
Normal file
7
tests/subworkflows/nf-core/annotation_snpeff/test.yml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- name: snpeff annotation_snpeff
|
||||
command: nextflow run ./tests/subworkflows/nf-core/annotation_snpeff -entry annotation_snpeff -c ./tests/config/nextflow.config -c ./tests/subworkflows/nf-core/annotation_snpeff/nextflow.config
|
||||
tags:
|
||||
- annotation_snpeff
|
||||
files:
|
||||
- path: output/annotation/test_snpEff.ann.vcf.gz
|
||||
- path: output/annotation/test_snpEff.ann.vcf.gz.tbi
|
Loading…
Reference in a new issue