Skip to content

Commit

Permalink
Update Shigapass main.nf
Browse files Browse the repository at this point in the history
Change shigapass module output delimiter to tab from semicolon
  • Loading branch information
maxlcummins authored Oct 31, 2024
1 parent a623172 commit 826c3bd
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions modules/nf-core/shigapass/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ process SHIGAPASS {
tuple val(meta), path(fasta)

output:
tuple val(meta), path("*_ShigaPass_summary.csv"), emit: report
tuple val(meta), path("*_ShigaPass_Flex_summary.csv"), optional: true, emit: flex_csv
tuple val(meta), path("${prefix}.tsv"), emit: report
tuple val(meta), path("*_ShigaPass_Flex_summary.tsv"), optional: true, emit: flex_tsv
path "versions.yml" , emit: versions

when:
Expand Down Expand Up @@ -43,13 +43,11 @@ process SHIGAPASS {
# Remove the temporary file from above
rm ${fasta_name}_tmp.txt
# Delete the directory generated by ShigaPass
mv ${prefix}/ShigaPass_summary.csv ${prefix}_ShigaPass_summary.csv
# Convert to tab delimited and move to the pwd
sed 's/;/\t/g' ${prefix}/ShigaPass_summary.csv > ${prefix}.tsv
# Delete the directory generated by ShigaPass
[ ! -f ${prefix}/ShigaPass_Flex_summary.csv ] || mv ${prefix}/ShigaPass_Flex_summary.csv ${prefix}_ShigaPass_Flex_summary.csv
rmdir ${prefix}
# Convert to tab delimited and move to the pwd
[ ! -f ${prefix}/ShigaPass_Flex_summary.csv ] || sed 's/;/\t/g' ${prefix}/ShigaPass_Flex_summary.csv > ${prefix}_Flex_summary.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand All @@ -61,7 +59,7 @@ process SHIGAPASS {
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"
"""
touch ${prefix}.csv
touch ${prefix}.tsv
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 826c3bd

Please sign in to comment.