snap icon indicating copy to clipboard operation
snap copied to clipboard

Error: snap-aligner output multiple alignments

Open yi1873 opened this issue 8 months ago • 4 comments

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

yi1873 avatar Apr 17 '25 01:04 yi1873

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?

bolosky avatar Apr 17 '25 05:04 bolosky

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?

yi1873 avatar Apr 18 '25 00:04 yi1873

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.

bolosky avatar Apr 22 '25 17:04 bolosky

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.

bolosky avatar May 06 '25 20:05 bolosky