mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-15 06:03:10 +00:00
d473a247d2
* Replace remaining task.ext.suffix with task.ext.prefix
34 lines
921 B
Text
34 lines
921 B
Text
process BEDTOOLS_GETFASTA {
|
|
tag "$bed"
|
|
label 'process_medium'
|
|
|
|
conda (params.enable_conda ? "bioconda::bedtools=2.30.0" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/bedtools:2.30.0--hc088bd4_0' :
|
|
'quay.io/biocontainers/bedtools:2.30.0--hc088bd4_0' }"
|
|
|
|
input:
|
|
path bed
|
|
path fasta
|
|
|
|
output:
|
|
path "*.fa" , emit: fasta
|
|
path "versions.yml" , emit: versions
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${bed.baseName}"
|
|
"""
|
|
bedtools \\
|
|
getfasta \\
|
|
$args \\
|
|
-fi $fasta \\
|
|
-bed $bed \\
|
|
-fo ${prefix}.fa
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
bedtools: \$(bedtools --version | sed -e "s/bedtools v//g")
|
|
END_VERSIONS
|
|
"""
|
|
}
|