mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-11-14 13:43:09 +00:00
cad9133c71
* feat added haplogrep classify * feat made module * fix added correct container * feat removed md5sum * fix trying to fix issue with version.yml * fix some small things * fix version * fix on meta.yml * fix stub run * fix Apply suggestions from code review Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> * fix Apply suggestions from code review2 Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com> Co-authored-by: Taniguti <ltaniguti@gmail.com> Co-authored-by: Ramprasad Neethiraj <20065894+ramprasadn@users.noreply.github.com>
49 lines
1.3 KiB
Text
49 lines
1.3 KiB
Text
process HAPLOGREP2_CLASSIFY {
|
|
tag "$meta.id"
|
|
label 'process_low'
|
|
|
|
conda (params.enable_conda ? "bioconda::haplogrep=2.4.0" : null)
|
|
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
|
|
'https://depot.galaxyproject.org/singularity/haplogrep:2.4.0--hdfd78af_0':
|
|
'quay.io/biocontainers/haplogrep:2.4.0--hdfd78af_0' }"
|
|
|
|
input:
|
|
tuple val(meta), path(inputfile)
|
|
val(format)
|
|
|
|
output:
|
|
tuple val(meta), path("*.txt"), emit: txt
|
|
path "versions.yml" , emit: versions
|
|
|
|
when:
|
|
task.ext.when == null || task.ext.when
|
|
|
|
script:
|
|
def args = task.ext.args ?: ''
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
haplogrep \\
|
|
classify \\
|
|
$args \\
|
|
--in $inputfile \\
|
|
--out ${prefix}.txt \\
|
|
--format $format
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
haplogrep2: \$(echo \$(haplogrep --version 2>&1) | (sed 's/htt.*//') | (sed 's/.*v//'))
|
|
END_VERSIONS
|
|
"""
|
|
|
|
stub:
|
|
def prefix = task.ext.prefix ?: "${meta.id}"
|
|
"""
|
|
touch ${prefix}.txt
|
|
|
|
cat <<-END_VERSIONS > versions.yml
|
|
"${task.process}":
|
|
haplogrep2: \$(echo \$(haplogrep --version 2>&1) | (sed 's/htt.*//') | (sed 's/.*v//'))
|
|
END_VERSIONS
|
|
"""
|
|
|
|
}
|