mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-10 20:23:10 +00:00
Merge branch 'master' into motus_downloaddb
This commit is contained in:
commit
566c11dacc
23 changed files with 156 additions and 129 deletions
|
@ -8,13 +8,14 @@ LABEL \
|
|||
COPY environment.yml /
|
||||
RUN conda env create -f /environment.yml && conda clean -a
|
||||
|
||||
# Add conda installation dir to PATH (instead of doing 'conda activate')
|
||||
ENV PATH /opt/conda/envs/nf-core-vep-104.3/bin:$PATH
|
||||
|
||||
# Setup default ARG variables
|
||||
ARG GENOME=GRCh38
|
||||
ARG SPECIES=homo_sapiens
|
||||
ARG VEP_VERSION=99
|
||||
ARG VEP_VERSION=104
|
||||
ARG VEP_TAG=104.3
|
||||
|
||||
# Add conda installation dir to PATH (instead of doing 'conda activate')
|
||||
ENV PATH /opt/conda/envs/nf-core-vep-${VEP_TAG}/bin:$PATH
|
||||
|
||||
# Download Genome
|
||||
RUN vep_install \
|
||||
|
@ -27,4 +28,4 @@ RUN vep_install \
|
|||
--NO_BIOPERL --NO_HTSLIB --NO_TEST --NO_UPDATE
|
||||
|
||||
# Dump the details of the installed packages to a file for posterity
|
||||
RUN conda env export --name nf-core-vep-104.3 > nf-core-vep-104.3.yml
|
||||
RUN conda env export --name nf-core-vep-${VEP_TAG} > nf-core-vep-${VEP_TAG}.yml
|
||||
|
|
|
@ -10,11 +10,12 @@ build_push() {
|
|||
VEP_TAG=$4
|
||||
|
||||
docker build \
|
||||
. \
|
||||
-t nfcore/vep:${VEP_TAG}.${GENOME} \
|
||||
software/vep/. \
|
||||
--build-arg GENOME=${GENOME} \
|
||||
--build-arg SPECIES=${SPECIES} \
|
||||
--build-arg VEP_VERSION=${VEP_VERSION}
|
||||
--build-arg VEP_VERSION=${VEP_VERSION} \
|
||||
--build-arg VEP_TAG=${VEP_TAG}
|
||||
|
||||
docker push nfcore/vep:${VEP_TAG}.${GENOME}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ process ENSEMBLVEP {
|
|||
val species
|
||||
val cache_version
|
||||
path cache
|
||||
path extra_files
|
||||
|
||||
output:
|
||||
tuple val(meta), path("*.ann.vcf"), emit: vcf
|
||||
|
|
|
@ -10,17 +10,6 @@ tools:
|
|||
homepage: https://www.ensembl.org/info/docs/tools/vep/index.html
|
||||
documentation: https://www.ensembl.org/info/docs/tools/vep/script/index.html
|
||||
licence: ["Apache-2.0"]
|
||||
params:
|
||||
- use_cache:
|
||||
type: boolean
|
||||
description: |
|
||||
Enable the usage of containers with cache
|
||||
Does not work with conda
|
||||
- vep_tag:
|
||||
type: value
|
||||
description: |
|
||||
Specify the tag for the container
|
||||
https://hub.docker.com/r/nfcore/vep/tags
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
|
@ -47,6 +36,10 @@ input:
|
|||
type: file
|
||||
description: |
|
||||
path to VEP cache (optional)
|
||||
- extra_files:
|
||||
type: tuple
|
||||
description: |
|
||||
path to file(s) needed for plugins (optional)
|
||||
output:
|
||||
- vcf:
|
||||
type: file
|
||||
|
|
|
@ -45,7 +45,7 @@ process SAMTOOLS_BAM2FQ {
|
|||
bam2fq \\
|
||||
$args \\
|
||||
-@ $task.cpus \\
|
||||
$inputbam >${prefix}_interleaved.fq.gz
|
||||
$inputbam | gzip --no-name > ${prefix}_interleaved.fq.gz
|
||||
|
||||
cat <<-END_VERSIONS > versions.yml
|
||||
"${task.process}":
|
||||
|
|
|
@ -8,15 +8,16 @@ LABEL \
|
|||
COPY environment.yml /
|
||||
RUN conda env create -f /environment.yml && conda clean -a
|
||||
|
||||
# Add conda installation dir to PATH (instead of doing 'conda activate')
|
||||
ENV PATH /opt/conda/envs/nf-core-snpeff-5.0/bin:$PATH
|
||||
|
||||
# Setup default ARG variables
|
||||
ARG GENOME=GRCh38
|
||||
ARG SNPEFF_CACHE_VERSION=99
|
||||
ARG SNPEFF_TAG=99
|
||||
|
||||
# Add conda installation dir to PATH (instead of doing 'conda activate')
|
||||
ENV PATH /opt/conda/envs/nf-core-snpeff-${SNPEFF_TAG}/bin:$PATH
|
||||
|
||||
# Download Genome
|
||||
RUN snpEff download -v ${GENOME}.${SNPEFF_CACHE_VERSION}
|
||||
|
||||
# Dump the details of the installed packages to a file for posterity
|
||||
RUN conda env export --name nf-core-snpeff-5.0 > nf-core-snpeff-5.0.yml
|
||||
RUN conda env export --name nf-core-snpeff-${SNPEFF_TAG} > nf-core-snpeff-${SNPEFF_TAG}.yml
|
||||
|
|
5
modules/snpeff/build.sh
Executable file → Normal file
5
modules/snpeff/build.sh
Executable file → Normal file
|
@ -9,10 +9,11 @@ build_push() {
|
|||
SNPEFF_TAG=$3
|
||||
|
||||
docker build \
|
||||
. \
|
||||
-t nfcore/snpeff:${SNPEFF_TAG}.${GENOME} \
|
||||
software/snpeff/. \
|
||||
--build-arg GENOME=${GENOME} \
|
||||
--build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION}
|
||||
--build-arg SNPEFF_CACHE_VERSION=${SNPEFF_CACHE_VERSION} \
|
||||
--build-arg SNPEFF_TAG=${SNPEFF_TAG}
|
||||
|
||||
docker push nfcore/snpeff:${SNPEFF_TAG}.${GENOME}
|
||||
}
|
||||
|
|
|
@ -10,18 +10,6 @@ tools:
|
|||
homepage: https://pcingola.github.io/SnpEff/
|
||||
documentation: https://pcingola.github.io/SnpEff/se_introduction/
|
||||
licence: ["MIT"]
|
||||
params:
|
||||
- use_cache:
|
||||
type: boolean
|
||||
description: |
|
||||
boolean to enable the usage of containers with cache
|
||||
Enable the usage of containers with cache
|
||||
Does not work with conda
|
||||
- snpeff_tag:
|
||||
type: value
|
||||
description: |
|
||||
Specify the tag for the container
|
||||
https://hub.docker.com/r/nfcore/snpeff/tags
|
||||
input:
|
||||
- meta:
|
||||
type: map
|
||||
|
|
31
subworkflows/nf-core/annotation/ensemblvep/main.nf
Normal file
31
subworkflows/nf-core/annotation/ensemblvep/main.nf
Normal file
|
@ -0,0 +1,31 @@
|
|||
//
|
||||
// Run VEP to annotate VCF files
|
||||
//
|
||||
|
||||
include { ENSEMBLVEP } from '../../../../modules/ensemblvep/main'
|
||||
include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main'
|
||||
|
||||
workflow ANNOTATION_ENSEMBLVEP {
|
||||
take:
|
||||
vcf // channel: [ val(meta), vcf ]
|
||||
vep_genome // value: genome to use
|
||||
vep_species // value: species to use
|
||||
vep_cache_version // value: cache version to use
|
||||
vep_cache // path: /path/to/vep/cache (optionnal)
|
||||
vep_extra_files // channel: [ file1, file2...] (optionnal)
|
||||
|
||||
main:
|
||||
ch_versions = Channel.empty()
|
||||
|
||||
ENSEMBLVEP(vcf, vep_genome, vep_species, vep_cache_version, vep_cache, vep_extra_files)
|
||||
TABIX_BGZIPTABIX(ENSEMBLVEP.out.vcf)
|
||||
|
||||
// Gather versions of all tools used
|
||||
ch_versions = ch_versions.mix(ENSEMBLVEP.out.versions.first())
|
||||
ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first())
|
||||
|
||||
emit:
|
||||
vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ]
|
||||
reports = ENSEMBLVEP.out.report // path: *.html
|
||||
versions = ch_versions // path: versions.yml
|
||||
}
|
49
subworkflows/nf-core/annotation/ensemblvep/meta.yml
Normal file
49
subworkflows/nf-core/annotation/ensemblvep/meta.yml
Normal file
|
@ -0,0 +1,49 @@
|
|||
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', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: |
|
||||
vcf to annotate
|
||||
- genome:
|
||||
type: value
|
||||
description: |
|
||||
which genome to annotate with
|
||||
- species:
|
||||
type: value
|
||||
description: |
|
||||
which species to annotate with
|
||||
- cache_version:
|
||||
type: value
|
||||
description: |
|
||||
which version of the cache to annotate with
|
||||
- cache:
|
||||
type: file
|
||||
description: |
|
||||
path to VEP cache (optional)
|
||||
- extra_files:
|
||||
type: tuple
|
||||
description: |
|
||||
path to file(s) needed for plugins (optional)
|
||||
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"
|
28
subworkflows/nf-core/annotation/snpeff/main.nf
Normal file
28
subworkflows/nf-core/annotation/snpeff/main.nf
Normal file
|
@ -0,0 +1,28 @@
|
|||
//
|
||||
// Run SNPEFF to annotate VCF files
|
||||
//
|
||||
|
||||
include { SNPEFF } from '../../../../modules/snpeff/main'
|
||||
include { TABIX_BGZIPTABIX } from '../../../../modules/tabix/bgziptabix/main'
|
||||
|
||||
workflow ANNOTATION_SNPEFF {
|
||||
take:
|
||||
vcf // channel: [ val(meta), vcf ]
|
||||
snpeff_db // value: db version to use
|
||||
snpeff_cache // path: /path/to/snpeff/cache (optionnal)
|
||||
|
||||
main:
|
||||
ch_versions = Channel.empty()
|
||||
|
||||
SNPEFF(vcf, snpeff_db, snpeff_cache)
|
||||
TABIX_BGZIPTABIX(SNPEFF.out.vcf)
|
||||
|
||||
// Gather versions of all tools used
|
||||
ch_versions = ch_versions.mix(SNPEFF.out.versions.first())
|
||||
ch_versions = ch_versions.mix(TABIX_BGZIPTABIX.out.versions.first())
|
||||
|
||||
emit:
|
||||
vcf_tbi = TABIX_BGZIPTABIX.out.gz_tbi // channel: [ val(meta), vcf.gz, vcf.gz.tbi ]
|
||||
reports = SNPEFF.out.report // path: *.html
|
||||
versions = ch_versions // path: versions.yml
|
||||
}
|
|
@ -11,11 +11,19 @@ input:
|
|||
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} ]"
|
||||
e.g. [ id:'test', single_end:false ]
|
||||
- vcf:
|
||||
type: file
|
||||
description: |
|
||||
vcf to annotate
|
||||
- db:
|
||||
type: value
|
||||
description: |
|
||||
which db to annotate with
|
||||
- cache:
|
||||
type: file
|
||||
description: |
|
||||
path to snpEff cache (optional)
|
||||
output:
|
||||
- versions:
|
||||
type: file
|
|
@ -1,26 +0,0 @@
|
|||
//
|
||||
// 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
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
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"
|
|
@ -1,23 +0,0 @@
|
|||
//
|
||||
// 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
|
||||
}
|
|
@ -10,5 +10,5 @@ workflow test_ensemblvep {
|
|||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] )
|
||||
ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] )
|
||||
}
|
||||
|
|
|
@ -1,14 +1,15 @@
|
|||
- name: samtools bam2fq test_samtools_bam2fq_nosplit
|
||||
command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config
|
||||
command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_nosplit -c tests/config/nextflow.config
|
||||
tags:
|
||||
- samtools/bam2fq
|
||||
- samtools
|
||||
files:
|
||||
- path: output/samtools/test_interleaved.fq.gz
|
||||
md5sum: d733e66d29a4b366bf9df8c42f845256
|
||||
- path: output/samtools/versions.yml
|
||||
md5sum: 4973eac1b6a8f090d5fcd4456d65a894
|
||||
|
||||
- name: samtools bam2fq test_samtools_bam2fq_withsplit
|
||||
command: nextflow run ./tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c ./tests/config/nextflow.config -c ./tests/modules/samtools/bam2fq/nextflow.config
|
||||
command: nextflow run tests/modules/samtools/bam2fq -entry test_samtools_bam2fq_withsplit -c tests/config/nextflow.config
|
||||
tags:
|
||||
- samtools/bam2fq
|
||||
- samtools
|
||||
|
@ -21,3 +22,5 @@
|
|||
md5sum: 709872fc2910431b1e8b7074bfe38c67
|
||||
- path: output/samtools/test_singleton.fq.gz
|
||||
md5sum: 709872fc2910431b1e8b7074bfe38c67
|
||||
- path: output/samtools/versions.yml
|
||||
md5sum: e92d21bbcda2fed7cb438d95c51edff0
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { ANNOTATION_ENSEMBLVEP } from '../../../../subworkflows/nf-core/annotation_ensemblvep/main'
|
||||
include { ANNOTATION_ENSEMBLVEP } from '../../../../../subworkflows/nf-core/annotation/ensemblvep/main'
|
||||
|
||||
workflow annotation_ensemblvep {
|
||||
input = [
|
||||
|
@ -10,5 +10,5 @@ workflow annotation_ensemblvep {
|
|||
file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true)
|
||||
]
|
||||
|
||||
ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [] )
|
||||
ANNOTATION_ENSEMBLVEP ( input, "WBcel235", "caenorhabditis_elegans", "104", [], [] )
|
||||
}
|
|
@ -7,7 +7,7 @@ process {
|
|||
publishDir = [ enabled: false ]
|
||||
}
|
||||
|
||||
withName: ANNOTATION_BGZIPTABIX {
|
||||
withName: TABIX_BGZIPTABIX {
|
||||
ext.prefix = { "${meta.id}_VEP.ann.vcf" }
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
nextflow.enable.dsl = 2
|
||||
|
||||
include { ANNOTATION_SNPEFF } from '../../../../subworkflows/nf-core/annotation_snpeff/main'
|
||||
include { ANNOTATION_SNPEFF } from '../../../../../subworkflows/nf-core/annotation_snpeff/main'
|
||||
|
||||
workflow annotation_snpeff {
|
||||
input = [
|
|
@ -7,7 +7,7 @@ process {
|
|||
publishDir = [ enabled: false ]
|
||||
}
|
||||
|
||||
withName: ANNOTATION_BGZIPTABIX {
|
||||
withName: TABIX_BGZIPTABIX {
|
||||
ext.prefix = { "${meta.id}_snpEff.ann.vcf" }
|
||||
}
|
||||
|
Loading…
Reference in a new issue