mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 02:58:17 +00:00
parent
6720d88f4e
commit
535975eb81
3 changed files with 14 additions and 3 deletions
|
@ -9,6 +9,7 @@ process BCFTOOLS_STATS {
|
||||||
|
|
||||||
input:
|
input:
|
||||||
tuple val(meta), path(vcf)
|
tuple val(meta), path(vcf)
|
||||||
|
path(target_bed)
|
||||||
|
|
||||||
output:
|
output:
|
||||||
tuple val(meta), path("*stats.txt"), emit: stats
|
tuple val(meta), path("*stats.txt"), emit: stats
|
||||||
|
@ -20,8 +21,13 @@ process BCFTOOLS_STATS {
|
||||||
script:
|
script:
|
||||||
def args = task.ext.args ?: ''
|
def args = task.ext.args ?: ''
|
||||||
def prefix = task.ext.prefix ?: "${meta.id}"
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
||||||
|
def target = target_bed ? "--regions-file ${target_bed}" : ""
|
||||||
"""
|
"""
|
||||||
bcftools stats $args $vcf > ${prefix}.bcftools_stats.txt
|
bcftools stats \\
|
||||||
|
$args \\
|
||||||
|
$target \\
|
||||||
|
$vcf > ${prefix}.bcftools_stats.txt
|
||||||
|
|
||||||
cat <<-END_VERSIONS > versions.yml
|
cat <<-END_VERSIONS > versions.yml
|
||||||
"${task.process}":
|
"${task.process}":
|
||||||
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
|
bcftools: \$(bcftools --version 2>&1 | head -n1 | sed 's/^.*bcftools //; s/ .*\$//')
|
||||||
|
|
|
@ -19,6 +19,10 @@ input:
|
||||||
description: |
|
description: |
|
||||||
Groovy Map containing sample information
|
Groovy Map containing sample information
|
||||||
e.g. [ id:'test', single_end:false ]
|
e.g. [ id:'test', single_end:false ]
|
||||||
|
- target_bed:
|
||||||
|
type: file
|
||||||
|
description: target bed file
|
||||||
|
pattern: "*.{bed}"
|
||||||
- vcf:
|
- vcf:
|
||||||
type: file
|
type: file
|
||||||
description: VCF input file
|
description: VCF input file
|
||||||
|
@ -40,3 +44,4 @@ output:
|
||||||
authors:
|
authors:
|
||||||
- "@joseespinosa"
|
- "@joseespinosa"
|
||||||
- "@drpatelh"
|
- "@drpatelh"
|
||||||
|
- "@SusiJo"
|
||||||
|
|
|
@ -6,8 +6,8 @@ include { BCFTOOLS_STATS } from '../../../../modules/bcftools/stats/main.nf'
|
||||||
|
|
||||||
workflow test_bcftools_stats {
|
workflow test_bcftools_stats {
|
||||||
input = [ [ id:'test' ], // meta map
|
input = [ [ id:'test' ], // meta map
|
||||||
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ]
|
[ file(params.test_data['sarscov2']['illumina']['test_vcf'], checkIfExists: true) ],
|
||||||
]
|
]
|
||||||
|
|
||||||
BCFTOOLS_STATS ( input )
|
BCFTOOLS_STATS ( input, [] )
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue