Skip to content

Commit

Permalink
Add emmtyper module
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjameskennedy committed Sep 19, 2024
1 parent 160964e commit 40a1454
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions nextflow-modules/modules/emmtyper/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
process emmtyper {
tag "${sampleID}"
scratch params.scratch

input:
tuple val(sampleID), path(fasta)

output:
tuple val(sampleID), path(output), emit: txt
path "*versions.yml" , emit: versions

script:
def args = task.ext.args ?: ''
output = "${sampleID}_emmtyper.txt"
"""
emmtyper ${args} --outout ${output} ${fasta}
cat <<-END_VERSIONS > ${sampleID}_${task.process}_versions.yml
${task.process}:
emmtyper:
version: \$(echo \$(emmtyper --version 2>&1) | sed -r 's/^.*emmtyper // ; s/ .*//')
container: ${task.container}
END_VERSIONS
"""

stub:
output = "${sampleID}_emmtyper.txt"
"""
touch $output
cat <<-END_VERSIONS > ${sampleID}_${task.process}_versions.yml
${task.process}:
emmtyper:
version: \$(echo \$(emmtyper --version 2>&1) | sed -r 's/^.*emmtyper // ; s/ .*//')
container: ${task.container}
END_VERSIONS
"""
}

0 comments on commit 40a1454

Please sign in to comment.