Skip to content

Error: snap-aligner output multiple alignments #170

Open

Description

@yi1873

When running snap-aligner paired -om 5 -omax 5 -D 10 to output multiple alignments, an error occurred.

Activity

  1. bolosky commented on Apr 17, 2025

    @bolosky
    Contributor

    Could you please provide more details? Did snap crash, or print an error, or do something else? Does it happen every time, or was it just once? If it happens repeatedly, would you be willing to share your index and input so I can try to figure out what's going on?

  2. yi1873 commented on Apr 18, 2025

    @yi1873
    Author

    command:
    snap-aligner paired hg19_index clean_1.fq.gz clean_2.fq.gz -o S12KW.snap.sam -om 2 -omax 2 -D 50 -t 24

    stdout: (Error)
    Welcome to SNAP version 2.0.3.

    Loading index from directory... 78s. 3,095,727,412 bases, seed size 24.
    Aligning.
    validateCigarString: couldn't look up genome data for location 3034192520
    SNAP exited with exit code 1 from line 2838 of file SNAPLib/SAM.cpp

    The input and index files are quite large. I'm wondering if any additional parameters are needed when building the index in SNAP to enable outputting multiple alignment results?

  3. bolosky commented on Apr 22, 2025

    @bolosky
    Contributor

    It looks like it's aligning a read off the end of a contig (or maybe producing a corrupt cigar string). I put in some fixes for indels causing contig crossings in version 2.0.4, which may or may not fix your problem. You're running an older version, 2.0.3, which doesn't have those fixes.

    Could you please to two things? First, update to the current version of SNAP, which is 2.0.5. You'll have to build from source I don't have access to the website to update binaries anymore. Run that and see if it fixes your problem.

    If not, I've pushed a new dev version that adds more information to the error message you're getting. Try running that. You'll need to do:

    git pull
    git checkout dev
    make clean
    make

    and you'll get a new snap-aligner binary. It should be version 2.0.6.dev.1. Run that. It will fail with the same error you saw before, but it will also include a read ID for which it failed. Post the output of the run to this issue, along with the read data for the read that caused the problem. Then, let me know the source of the FASTA you used to build your index and whatever parameters you used on index build and I'll try to reproduce the problem and get you a fix.

  4. bolosky commented on May 6, 2025

    @bolosky
    Contributor

    I did a GitHub release of 2.0.5, so you should be able to grab the snap-aligner binary from there rather than having to rebuild it.

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