2021-02-12 12:00:02 +00:00
|
|
|
process BWAMEM2_INDEX {
|
|
|
|
tag "$fasta"
|
|
|
|
label 'process_high'
|
|
|
|
|
2021-03-25 09:24:21 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
|
|
'https://depot.galaxyproject.org/singularity/bwa-mem2:2.2.1--he513fc3_0' :
|
|
|
|
'quay.io/biocontainers/bwa-mem2:2.2.1--he513fc3_0' }"
|
2021-02-12 12:00:02 +00:00
|
|
|
|
|
|
|
input:
|
|
|
|
path fasta
|
|
|
|
|
|
|
|
output:
|
2021-02-12 14:24:09 +00:00
|
|
|
path "bwamem2" , emit: index
|
2021-10-01 13:04:56 +00:00
|
|
|
path "versions.yml" , emit: versions
|
2021-02-12 12:00:02 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-12 12:00:02 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-02-12 12:00:02 +00:00
|
|
|
"""
|
2021-02-12 14:24:09 +00:00
|
|
|
mkdir bwamem2
|
2021-09-27 21:10:37 +00:00
|
|
|
bwa-mem2 \\
|
|
|
|
index \\
|
2021-11-26 07:58:40 +00:00
|
|
|
$args \\
|
2021-09-27 21:10:37 +00:00
|
|
|
$fasta -p bwamem2/${fasta}
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-02-12 12:00:02 +00:00
|
|
|
"""
|
2022-03-28 15:48:39 +00:00
|
|
|
|
|
|
|
stub:
|
|
|
|
"""
|
|
|
|
mkdir bwamem2
|
|
|
|
touch bwamem2/${fasta}.0123
|
|
|
|
touch bwamem2/${fasta}.ann
|
|
|
|
touch bwamem2/${fasta}.pac
|
|
|
|
touch bwamem2/${fasta}.amb
|
|
|
|
touch bwamem2/${fasta}.bwt.2bit.64
|
|
|
|
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
"${task.process}":
|
|
|
|
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
2021-02-12 12:00:02 +00:00
|
|
|
}
|