-
Notifications
You must be signed in to change notification settings - Fork 16
/
main.nf
32 lines (27 loc) · 931 Bytes
/
main.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
process EXTRACT_COMMUNITIES {
tag "$meta"
label 'process_single'
conda "bioconda::samtools=1.17"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/samtools:1.17--h00cdaf9_0' :
'biocontainers/samtools:1.17--h00cdaf9_0' }"
input:
tuple val(meta), path(fasta), path(community)
output:
tuple val(meta), path ("*.fa"), emit: community_fasta
path "versions.yml" , emit: versions
when:
task.ext.when == null || task.ext.when
script:
def args = task.ext.args ?: ''
"""
samtools \\
faidx \\
$fasta \\
\$(cat ${community}) > ${community}.fa
cat <<-END_VERSIONS > versions.yml
"${task.process}":
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
END_VERSIONS
"""
}