mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
Merge branch 'master' into grst-patch-1
This commit is contained in:
commit
eefc3ceb2b
9 changed files with 140 additions and 14 deletions
|
@ -1,13 +1,11 @@
|
||||||
def VERSION = '0.1' // Version information not provided by tool on CLI
|
|
||||||
|
|
||||||
process CHROMAP_CHROMAP {
|
process CHROMAP_CHROMAP {
|
||||||
tag "$meta.id"
|
tag "$meta.id"
|
||||||
label 'process_medium'
|
label 'process_medium'
|
||||||
|
|
||||||
conda (params.enable_conda ? "bioconda::chromap=0.1 bioconda::samtools=1.13" : null)
|
conda (params.enable_conda ? "bioconda::chromap=0.1.5 bioconda::samtools=1.14" : null)
|
||||||
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
||||||
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' :
|
'https://depot.galaxyproject.org/singularity/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' :
|
||||||
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:2cad7c5aa775241887eff8714259714a39baf016-0' }"
|
'quay.io/biocontainers/mulled-v2-1f09f39f20b1c4ee36581dc81cc323c70e661633:724a1037d59f6a19c9d4e7bdba77b52b37de0dc3-0' }"
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(reads)
|
tuple val(meta), path(reads)
|
||||||
|
@ -45,7 +43,7 @@ process CHROMAP_CHROMAP {
|
||||||
args_list << "--pairs-natural-chr-order $pairs_chr_order"
|
args_list << "--pairs-natural-chr-order $pairs_chr_order"
|
||||||
}
|
}
|
||||||
def final_args = args_list.join(' ')
|
def final_args = args_list.join(' ')
|
||||||
def compression_cmds = "gzip ${prefix}.${file_extension}"
|
def compression_cmds = "gzip -n ${prefix}.${file_extension}"
|
||||||
if (args.contains("--SAM")) {
|
if (args.contains("--SAM")) {
|
||||||
compression_cmds = """
|
compression_cmds = """
|
||||||
samtools view $args2 -@ $task.cpus -bh \\
|
samtools view $args2 -@ $task.cpus -bh \\
|
||||||
|
@ -67,7 +65,8 @@ process CHROMAP_CHROMAP {
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
chromap: $VERSION
|
chromap: \$(echo \$(chromap --version 2>&1))
|
||||||
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
} else {
|
} else {
|
||||||
|
@ -85,7 +84,8 @@ process CHROMAP_CHROMAP {
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
chromap: $VERSION
|
chromap: \$(echo \$(chromap --version 2>&1))
|
||||||
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
||||||
END_VERSIONS
|
END_VERSIONS
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
|
|
34
modules/vcfanno/main.nf
Normal file
34
modules/vcfanno/main.nf
Normal 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
56
modules/vcfanno/meta.yml
Normal 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"
|
|
@ -1493,6 +1493,10 @@ variantbam:
|
||||||
- modules/variantbam/**
|
- modules/variantbam/**
|
||||||
- tests/modules/variantbam/**
|
- tests/modules/variantbam/**
|
||||||
|
|
||||||
|
vcfanno:
|
||||||
|
- modules/vcfanno/**
|
||||||
|
- tests/modules/vcfanno/**
|
||||||
|
|
||||||
vcflib/vcfuniq:
|
vcflib/vcfuniq:
|
||||||
- modules/vcflib/vcfuniq/**
|
- modules/vcflib/vcfuniq/**
|
||||||
- tests/modules/vcflib/vcfuniq/**
|
- tests/modules/vcflib/vcfuniq/**
|
||||||
|
|
|
@ -5,9 +5,8 @@
|
||||||
- chromap
|
- chromap
|
||||||
files:
|
files:
|
||||||
- path: output/chromap/genome.index
|
- path: output/chromap/genome.index
|
||||||
md5sum: f889d5f61d80823766af33277d27d386
|
|
||||||
- path: output/chromap/test.bed.gz
|
- path: output/chromap/test.bed.gz
|
||||||
md5sum: 7029066c27ac6f5ef18d660d5741979a
|
md5sum: 25e40bde24c7b447292cd68573728694
|
||||||
|
|
||||||
- name: chromap chromap test_chromap_chromap_paired_end
|
- name: chromap chromap test_chromap_chromap_paired_end
|
||||||
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
|
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_end -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
|
||||||
|
@ -16,9 +15,8 @@
|
||||||
- chromap
|
- chromap
|
||||||
files:
|
files:
|
||||||
- path: output/chromap/genome.index
|
- path: output/chromap/genome.index
|
||||||
md5sum: f889d5f61d80823766af33277d27d386
|
|
||||||
- path: output/chromap/test.bed.gz
|
- path: output/chromap/test.bed.gz
|
||||||
md5sum: cafd8fb21977f5ae69e9008b220ab169
|
md5sum: 7cdc8448882b75811e0c784f5f20aef2
|
||||||
|
|
||||||
- name: chromap chromap test_chromap_chromap_paired_bam
|
- name: chromap chromap test_chromap_chromap_paired_bam
|
||||||
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_bam -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
|
command: nextflow run ./tests/modules/chromap/chromap -entry test_chromap_chromap_paired_bam -c ./tests/config/nextflow.config -c ./tests/modules/chromap/chromap/nextflow.config
|
||||||
|
@ -27,6 +25,5 @@
|
||||||
- chromap
|
- chromap
|
||||||
files:
|
files:
|
||||||
- path: output/chromap/genome.index
|
- path: output/chromap/genome.index
|
||||||
md5sum: f889d5f61d80823766af33277d27d386
|
|
||||||
- path: output/chromap/test.bam
|
- path: output/chromap/test.bam
|
||||||
md5sum: bd1e3fe0f3abd1430ae191754f16a3ed
|
md5sum: 73e2c76007e3c61df625668e01b3f42f
|
||||||
|
|
|
@ -5,3 +5,5 @@
|
||||||
- chromap
|
- chromap
|
||||||
files:
|
files:
|
||||||
- path: output/chromap/genome.index
|
- path: output/chromap/genome.index
|
||||||
|
|
||||||
|
|
||||||
|
|
19
tests/modules/vcfanno/main.nf
Normal file
19
tests/modules/vcfanno/main.nf
Normal 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 )
|
||||||
|
}
|
5
tests/modules/vcfanno/nextflow.config
Normal file
5
tests/modules/vcfanno/nextflow.config
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
process {
|
||||||
|
|
||||||
|
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }
|
||||||
|
|
||||||
|
}
|
9
tests/modules/vcfanno/test.yml
Normal file
9
tests/modules/vcfanno/test.yml
Normal 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
|
Loading…
Reference in a new issue