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

Windows linebreaks lead to crash #21

Closed philippbayer closed 11 years ago

philippbayer commented 11 years ago

Hello,

When a FASTQ quality line ends with \r\n instead of \n SNAP crashes with the error-message:

Syntax error in FASTQ file at offset 71. Quality string is of the wrong length.

This Python line generates a read that leads to the above error-message:

open('broken_read.fq','w').write(''.join(['@SEQ_ID\n', 'GATTTGGGGTTCAAAGCAGTATCGATCAAATAGTAAATCCATTTGTTCAACTCACAGTTT\n', '+\n', "!''*((((***+))%%%++)(%%%%).1***-+*''))**55CCF>>>>>>CCCCCCC65\r\n"]))

Not that hard to circumvent but a bit hard to catch in the first place...

mateiz commented 11 years ago

Good catch! Somewhat ironic since quite a few of the developers are on Windows, but we'll fix it.

rnpandya commented 11 years ago

Fixed with commit d127a4ab