Skip to content

Commit

Permalink
Added genome_filename variable for genome used by staramr
Browse files Browse the repository at this point in the history
  • Loading branch information
sgsutcliffe committed Jun 12, 2024
1 parent d7417cb commit 7d107b7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions modules/local/staramr/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ process STARAMR_SEARCH {
def prefix = task.ext.prefix ?: "${meta.id}"
def is_gzipped = contigs.getName().endsWith(".gz") ? true : false
def genome_uncompressed_name = contigs.getName().replace(".gz", "")
def genome_filename = "${meta.id}.fasta"
"""
if [ "$is_gzipped" = "true" ]; then
gzip -c -d $contigs > $genome_uncompressed_name
fi
#Change name of input genome to sample name to allow irida-next output of metadata
mv $genome_uncompressed_name ${meta.id}
#Change name of input genome to allow irida-next output of metadata
mv $genome_uncompressed_name $genome_filename
staramr \\
search \\
$args \\
--nprocs $task.cpus \\
-o ${prefix}_results \\
$meta.id
$genome_filename
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit 7d107b7

Please sign in to comment.