Skip to content

Commit

Permalink
Fix formatting of module and version
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanjameskennedy committed Jan 21, 2025
1 parent 2cca11e commit 53dd6dc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions nextflow-modules/modules/sccmec/main.nf
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
process sccmec {
tag "${sampleID}"
tag "${sample_id}"
scratch params.scratch

input:
tuple val(sampleID), path(assembly)
tuple val(sample_id), path(assembly)

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

script:
def args = task.ext.args ?: ''
output = "${sampleID}_sccmec.tsv"
output = "${sample_id}_sccmec.tsv"
outputDir = "sccmec_outdir"
"""
sccmec --input $assembly --prefix ${sampleID}_sccmec -o $outputDir $args
cp $outputDir/${sampleID}_sccmec.tsv $output
sccmec --input ${assembly} --prefix ${sample_id}_sccmec -o ${outputDir} ${args}
cp ${outputDir}/${sample_id}_sccmec.tsv ${output}
cat <<-END_VERSIONS > ${sampleID}_${task.process}_versions.yml
cat <<-END_VERSIONS > ${sample_id}_${task.process}_versions.yml
${task.process}:
sccmec:
version: \$(echo \$(sccmec --version 2>&1) | tr '\n' ';')
version: \$(echo \$(sccmec --version 2>&1) | sed -n 's/.*sccmec_targets, version //p')
container: ${task.container}
END_VERSIONS
"""

stub:
output = "${sampleID}_sccmec.tsv"
output = "${sample_id}_sccmec.tsv"
"""
touch $output
touch ${output}
cat <<-END_VERSIONS > ${sampleID}_${task.process}_versions.yml
cat <<-END_VERSIONS > ${sample_id}_${task.process}_versions.yml
${task.process}:
sccmec:
version: \$(echo \$(sccmec --version 2>&1) | tr '\n' ';')
version: \$(echo \$(sccmec --version 2>&1) | sed -n 's/.*sccmec_targets, version //p')
container: ${task.container}
END_VERSIONS
"""
Expand Down

0 comments on commit 53dd6dc

Please sign in to comment.