amplab / snap

Scalable Nucleotide Alignment Program -- a fast and accurate read aligner for high-throughput sequencing data
https://www.microsoft.com/en-us/research/project/snap/
Apache License 2.0
288 stars 66 forks source link

Generate an error rather than failing when -d value is too large #20

Closed bolosky closed 9 years ago

bolosky commented 11 years ago

-d higher than 50 is actually not supported by default in the codebase (though I guess it doesn't warn about it). However, you can fix it by editing SNAPLib/LandauVishkin.h and changing the const int MAX_K = 31 at the top to 60. Likewise change the MAX_DISTANCE at the top of SNAPLib/BoundedStringDistance.h to 60. Then if you recompile (do make clean and then make), it should work. If it doesn't, please give us one read and a reference string where it doesn't work.

Matei

On Jan 1, 2013, at 10:46 PM, Taylor taylorsittler@gmail.com wrote:

This might be a problem computing the cigar string before printing out the reads. I'll contact you to try and look at the files you are using to see if we can recreate the problem. On Tue, Jan 1, 2013 at 10:37 PM, Marco Cusumano-Towner mtowner@svbio.com wrote: Hi,

I used a maxDist of 50 and 25, (-d 50, -d 25) and in both cases, SNAP produces the following warning: "WARNING: computeEditDistance returned -1; this shouldn't happen" With the same FASTQ files, but the default maxDist, the warning doesn't appear.

After the warning, SNAP appears to finish. The alignment seems to be successful because SNAP reports good alignment statistics, but in the resulting SAM file some reads have an RNAME but an empty CIGAR string (*), and this produces warnings from samtools. e.g.: "Parse warning at line 138178: mapped sequence without CIGAR".

I suspect the SNAP warning and the SAM formatting issue are related, since neither shows up with the default -d setting.

Thanks,

Marco

bolosky commented 9 years ago

SNAP generates an error message if you give it an invalid -d (and has for more than a year, I think).