Skip to content

segmentation fault with mashmap compare when empty file is passed to -r parameter #33

Description

@taylorreiter

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions