2021-02-17 15:46:34 +00:00
|
|
|
process SAMTOOLS_FAIDX {
|
|
|
|
tag "$fasta"
|
2022-09-07 08:33:05 +00:00
|
|
|
label 'process_single'
|
2021-02-17 15:46:34 +00:00
|
|
|
|
2022-04-11 12:26:28 +00:00
|
|
|
conda (params.enable_conda ? "bioconda::samtools=1.15.1" : null)
|
2021-11-26 07:58:40 +00:00
|
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
2022-04-11 12:26:28 +00:00
|
|
|
'https://depot.galaxyproject.org/singularity/samtools:1.15.1--h1170115_0' :
|
|
|
|
'quay.io/biocontainers/samtools:1.15.1--h1170115_0' }"
|
2021-02-17 15:46:34 +00:00
|
|
|
|
|
|
|
input:
|
2021-12-06 10:37:04 +00:00
|
|
|
tuple val(meta), path(fasta)
|
2021-02-17 15:46:34 +00:00
|
|
|
|
|
|
|
output:
|
2022-01-07 17:52:39 +00:00
|
|
|
tuple val(meta), path ("*.fai"), emit: fai
|
|
|
|
path "versions.yml" , emit: versions
|
2021-02-17 15:46:34 +00:00
|
|
|
|
2022-02-04 08:53:32 +00:00
|
|
|
when:
|
|
|
|
task.ext.when == null || task.ext.when
|
|
|
|
|
2021-02-17 15:46:34 +00:00
|
|
|
script:
|
2021-11-26 07:58:40 +00:00
|
|
|
def args = task.ext.args ?: ''
|
2021-02-17 15:46:34 +00:00
|
|
|
"""
|
2022-01-07 17:52:39 +00:00
|
|
|
samtools \\
|
|
|
|
faidx \\
|
2022-07-26 20:51:47 +00:00
|
|
|
$args \\
|
2022-01-07 17:52:39 +00:00
|
|
|
$fasta
|
|
|
|
|
2021-09-27 08:41:24 +00:00
|
|
|
cat <<-END_VERSIONS > versions.yml
|
2021-11-26 07:58:40 +00:00
|
|
|
"${task.process}":
|
|
|
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
2021-09-27 08:41:24 +00:00
|
|
|
END_VERSIONS
|
2021-02-17 15:46:34 +00:00
|
|
|
"""
|
2022-03-28 15:48:39 +00:00
|
|
|
|
|
|
|
stub:
|
|
|
|
"""
|
|
|
|
touch ${fasta}.fai
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
|
|
|
|
|
|
"${task.process}":
|
|
|
|
samtools: \$(echo \$(samtools --version 2>&1) | sed 's/^.*samtools //; s/Using.*\$//')
|
|
|
|
END_VERSIONS
|
|
|
|
"""
|
2021-02-17 15:46:34 +00:00
|
|
|
}
|