nf-core_modules/modules/happy/prepy/main.nf

41 lines
1.3 KiB
Text
Raw Normal View History

2022-05-04 13:29:48 +00:00
process HAPPY_PREPY {
tag "$meta.id"
label 'process_medium'
2022-06-27 08:35:41 +00:00
// WARN: Version information not provided by tool on CLI. Please update version string below when bumping container versions.
conda (params.enable_conda ? "bioconda::hap.py=0.3.14" : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/hap.py:0.3.14--py27h5c5a3ab_0':
'quay.io/biocontainers/hap.py:0.3.14--py27h5c5a3ab_0' }"
input:
2022-05-04 13:29:48 +00:00
tuple val(meta), path(vcf), path(bed)
tuple path(fasta), path(fasta_fai)
output:
2022-05-04 13:29:48 +00:00
tuple val(meta), path('*.vcf.gz') , emit: preprocessed_vcf
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
2022-06-27 08:35:41 +00:00
def VERSION = '0.3.14' // WARN: Version information not provided by tool on CLI. Please update this string when bumping container versions.
"""
pre.py \\
$args \\
-R $bed \\
--reference $fasta \\
--threads $task.cpus \\
2022-05-04 13:29:48 +00:00
$vcf \\
${prefix}.vcf.gz
cat <<-END_VERSIONS > versions.yml
"${task.process}":
2022-05-04 13:29:48 +00:00
pre.py: $VERSION
END_VERSIONS
"""
}