Snippy 4.6.0 contig-mode job intermittently fails with samtools sort -m 0M

Hello Galaxy community,

I am running Snippy 4.6.0 in Galaxy using assembled bacterial genome contigs as input. I am using contig mode with one FASTA genome as the reference and another assembled FASTA genome as the query contig file.

The same reference/query pair and same visible Snippy settings behaved inconsistently across runs. One run completed successfully and produced the expected Snippy outputs, including the SNP table, SNP summary, log file, and Snippy-core directory. However, when I repeated the same run with the same reference, same query, and same visible parameters, the job failed.

command line:

ln -sf '/corral4/main/objects/d/1/4/dataset_d1459292-a650-4b4c-8825-98608e096946.dat' 'ref.fna' &&    snippy --outdir 'ERR13438533contigs_fasta' --cpus ${GALAXY_SLOTS:-1} --ram $((${GALAXY_MEMORY_MB:-4096}/1024))   --ref 'ref.fna'   --mapqual 60 --mincov 10 --minfrac 0.9 --minqual 100.0  --ctgs '/corral4/main/objects/f/b/e/dataset_fbe2e736-3276-485a-88a9-3deee49d42ca.dat'   && cp -r 'ERR13438533contigs_fasta' out && tar -czf out.tgz 'ERR13438533contigs_fasta'

Successful run:

  • Tool: Snippy 4.6.0

  • Input mode: contigs

  • Reference: ERR13438576contig.fasta

  • Query contigs: ERR13438533contigs.fasta

  • samtools sort memory in standard error: -m 12000M

  • Result: completed successfully

Failed run:

  • Tool: Snippy 4.6.0

  • Input mode: contigs

  • Reference: ERR13438576contig.fasta

  • Query contigs: ERR13438533contigs.fasta

  • samtools sort memory in standard error: -m 0M

  • Error message:
    [bam_sort] -m setting (0 bytes) is less than the minimum required (1M).

  • Result: failed before producing the final SNP outputs

The failed command appears to pass samtools sort -m 0M, whereas the successful command passed samtools sort -m 12000M. I do not see a visible option in the Snippy Galaxy GUI to manually set RAM, GALAXY_MEMORY_MB, job memory, or samtools sort memory.

Could this be a Galaxy resource allocation or wrapper issue? Is there a recommended way to request more memory, select a different job destination, or force Snippy/samtools to use an appropriate memory value for this tool? Would contacting the UseGalaxy admins be appropriate for increasing memory allocation for this job?

I can provide the full successful and failed standard error logs if helpful.

Thank you.

Welcome @dip

Yes, There is a known issue with Snippy at UseGalaxy.org right now. Moving your data over to UstGalaxy.eu for this tool is recommended. You might consider just putting those specific files in the history to transfer over.

Details: Configuration issue snippy 4.6.0+galaxy0 && 4.5.0 · Issue #1415 · galaxyproject/usegalaxy-tools · GitHub

We’ll be looking at this more next week, more soon! :slight_smile: