segmentation fault with mashmap compare when empty file is passed to `-r` parameter
Opened this issue · 0 comments
taylorreiter commented
Hello! We are using mashmap in a snakemake workflow tool. Part of the workflow this tool orchestrates downloads a genome from genbank and maps it against a user-specified genome. Our tool accidentally created some empty genbank genome files but carried on running, leading us to a situation where mashmap compare
was run using an empty genome for the -r
parameter. When we did this, we got an ~instantaneous segmentation fault.
$ mashmap -q ref_genomes/GCA_900112995.1_genomic.fna.gz -r genbank_genomes/GCA_008680295.1_genomic.fna.gz -o output.genbank_genomes/stage2/GCA_900112995.1_genomic.fna.gz.x.GCA_008680295.1.mashmap.align --pi 95 > output.genbank_genomes/stage2/GCA_900112995.1_genomic.fna.gz.x.GCA_008680295.1.mashmap.out
Segmentation fault
$ ls -lh /home/tereiter/github/2020-ibd/genbank_genomes/GCA_900112995.1_genomic.fna.gz
-rw-r--r-- 1 tereiter tereiter 806K May 15 14:20 /home/tereiter/github/2020-ibd/genbank_genomes/GCA_900112995.1_genomic.fna.gz
$ ls -lh genbank_genomes/GCA_008680295.1_genomic.fna.gz
-rw-r--r-- 1 tereiter tereiter 0 May 27 09:32 genbank_genomes/GCA_008680295.1_genomic.fna.gz
We documented this behavior in an issue here. We just wanted to make the mashmap community aware of this as well!