2021-02-12 07:00:02 -05:00
|
|
|
process BWAMEM2_INDEX {
|
|
|
|
tag "$fasta"
|
2022-09-19 05:54:47 -04:00
|
|
|
label 'process_single'
|
2021-02-12 07:00:02 -05:00
|
|
|
|
2021-03-25 05:24:21 -04:00
|
|
|
conda (params.enable_conda ? "bioconda::bwa-mem2=2.2.1" : null)
|
2021-11-26 02:58:40 -05: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 07:00:02 -05:00
|
|
|
|
|
|
|
input:
|
2022-07-26 16:48:47 -04:00
|
|
|
tuple val(meta), path(fasta)
|
2021-02-12 07:00:02 -05:00
|
|
|
|
|
|
|
output:
|
2022-07-26 16:48:47 -04:00
|
|
|
tuple val(meta), path("bwamem2"), emit: index
|
|
|
|
path "versions.yml" , emit: versions
|
2021-02-12 07:00:02 -05:00
|
|
|
|
2022-02-04 03:53:32 -05:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-12 07:00:02 -05:00
|
|
|
script:
|
2021-11-26 02:58:40 -05:00
|
|
|
def args = task.ext.args ?: ''
|
2021-02-12 07:00:02 -05:00
|
|
|
"""
|
2021-02-12 09:24:09 -05:00
|
|
|
mkdir bwamem2
|
2021-09-27 17:10:37 -04:00
|
|
|
bwa-mem2 \\
|
|
|
|
index \\
|
2021-11-26 02:58:40 -05:00
|
|
|
$args \\
|
2021-09-27 17:10:37 -04:00
|
|
|
$fasta -p bwamem2/${fasta}
|
|
|
|
|
2021-09-27 04:41:24 -04:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 02:58:40 -05:00
|
|
|
"${task.process}":
|
|
|
|
bwamem2: \$(echo \$(bwa-mem2 version 2>&1) | sed 's/.* //')
|
2021-09-27 04:41:24 -04:00
|
|
|
END_VERSIONS
|
2021-02-12 07:00:02 -05:00
|
|
|
"""
|
2022-03-28 11:48:39 -04: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 07:00:02 -05:00
|
|
|
}
|