Skip to content

Commit

Permalink
Merge pull request #11 from phac-nml/metadata-irida-output
Browse files Browse the repository at this point in the history
Metadata irida output
  • Loading branch information
sgsutcliffe authored Jun 12, 2024
2 parents b353f27 + 7d107b7 commit d338bd1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 8 deletions.
24 changes: 17 additions & 7 deletions conf/iridanext.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,23 @@ iridanext {
global = [
]
samples = [
"**/**/detailed_summary.tsv",
"**/**/mlst.tsv",
"**/**/plasmidfinder.tsv",
"**/**/resfinder.tsv",
"**/**/results.xlsx",
"**/**/settings.txt",
"**/**/summary.tsv"]
"**/detailed_summary.tsv",
"**/mlst.tsv",
"**/plasmidfinder.tsv",
"**/resfinder.tsv",
"**/results.xlsx",
"**/settings.txt",
"**/summary.tsv"]
}
metadata {
samples {
csv {
path = "**/summary.tsv"
sep = "\t"
idcol = "Isolate ID"
}
}
}
}
}

6 changes: 5 additions & 1 deletion modules/local/staramr/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +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 allow irida-next output of metadata
mv $genome_uncompressed_name $genome_filename
staramr \\
search \\
$args \\
--nprocs $task.cpus \\
-o ${prefix}_results \\
$genome_uncompressed_name
$genome_filename
cat <<-END_VERSIONS > versions.yml
"${task.process}":
Expand Down

0 comments on commit d338bd1

Please sign in to comment.