Merge branch 'maxquant' of github.com:veitveit/modules into maxquant

This commit is contained in:
veitveit 2022-01-20 18:02:45 +01:00
commit 77d2d83131
6 changed files with 127 additions and 0 deletions

34
modules/vcfanno/main.nf Normal file
View file

@ -0,0 +1,34 @@
process VCFANNO {
tag "$meta.id"
label 'process_low'
conda (params.enable_conda ? "bioconda::vcfanno=0.3.3" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/vcfanno:0.3.3--h9ee0642_0':
'quay.io/biocontainers/vcfanno:0.3.3--h9ee0642_0' }"
input:
tuple val(meta), path(vcf), path(tbi)
path vcfanno_config
output:
tuple val(meta), path("*.vcf"), emit: vcf
path "versions.yml" , emit: versions
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
vcfanno \\
-p $task.cpus \\
$args \\
$vcfanno_config \\
$vcf \\
> ${prefix}_annotated.vcf
cat <<-END_VERSIONS > versions.yml
"${task.process}":
vcfanno: \$(echo \$(vcfanno 2>&1 | grep version | cut -f3 -d' ' ))
END_VERSIONS
"""
}

56
modules/vcfanno/meta.yml Normal file
View file

@ -0,0 +1,56 @@
name: vcfanno
description: quickly annotate your VCF with any number of INFO fields from any number of VCFs or BED files
keywords:
- vcf
- bed
- annotate
- variant
tools:
- vcfanno:
description: annotate a VCF with other VCFs/BEDs/tabixed files
homepage: None
documentation: https://github.com/brentp/vcfanno#vcfanno
tool_dev_url: https://github.com/brentp/vcfanno
doi: "10.1186/s13059-016-0973-5"
licence: ["MIT"]
input:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- vcf:
type: file
description: query VCF file
pattern: "*.{vcf.gz}"
- vcf.tbi:
type: file
description: query VCF file index
pattern: "*.{vcf.gz.tbi}"
- vcfanno_config:
type: file
description: |
A simple configuration file is used to specify both the source files
and the set of attributes (in the case of VCF)
or columns (in the case of BED or other tab-delimited formats)
that should be added to the query file.
pattern: "*.{toml}"
output:
- meta:
type: map
description: |
Groovy Map containing sample information
e.g. [ id:'test', single_end:false ]
- versions:
type: file
description: File containing software versions
pattern: "versions.yml"
- vcf:
type: file
description: Annotated VCF file
pattern: "*.{vcf}"
authors:
- "@projectoriented"

View file

@ -1497,6 +1497,10 @@ variantbam:
- modules/variantbam/**
- tests/modules/variantbam/**
vcfanno:
- modules/vcfanno/**
- tests/modules/vcfanno/**
vcflib/vcfuniq:
- modules/vcflib/vcfuniq/**
- tests/modules/vcflib/vcfuniq/**

View file

@ -0,0 +1,19 @@
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
include { VCFANNO } from '../../../modules/vcfanno/main.nf'
workflow test_vcfanno {
input = [
[ id:'test', single_end:false ], // meta map
file(params.test_data['sarscov2']['illumina']['test_vcf_gz'], checkIfExists: true),
file(params.test_data['sarscov2']['illumina']['test_vcf_gz_tbi'], checkIfExists: true)
]
toml = file("https://raw.githubusercontent.com/nf-core/test-datasets/8fbd9f99a2feb3f9e39cd3bcdc4a9176a5835673/data/delete_me/vcfanno.toml",
checkIfExists: true)
VCFANNO ( input, toml )
}

View file

@ -0,0 +1,5 @@
process {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
}

View file

@ -0,0 +1,9 @@
- name: vcfanno test_vcfanno
command: nextflow run tests/modules/vcfanno -entry test_vcfanno -c tests/config/nextflow.config
tags:
- vcfanno
files:
- path: output/vcfanno/test_annotated.vcf
md5sum: 34259cf6b0a4698a2917ad3554b50c0f
- path: output/vcfanno/versions.yml
md5sum: 62d13540503b22f04a2280c91942cb03