mikessh/migec

Spaces in segments file cause CdrBlast crash

fabio-t opened this issue · 0 comments

This line of code splits the segments file using a tab as separator, but sometimes there's no tab but a space.

I'm having a problem specifically with the file segments.all.txt and this line:

MusMusculus	TRB	Variable	TRBV7*01	289 TGAGGGCTCTAGCAGGCTCTGTCTTCTGACTTGTGGGACCTGTAAATTCCAGAGTCATGTAACCTGAAACCTCAAAGTCAAAGAATAGCTAGCAACTATGAAATAGTCCCTTCTCTCTGGACACCTCTCTGTGCTCTGGTACCAGAAGACCCTGGGCCCCAGTTCAATACTACAATAAAGAGGAGAAAGGAAGAGGAAATGTCCTTTATTCAATTTACAGCACACCAATTTGGTGACTAGCATCCTGAATTGAATCTGAGCTCTCTAGAGCCAAAGGACTCTGCACTGTTCTTCACAG

which has a whitespace between 289 and the sequence (the crash is in the parseInt at this line).

I haven't checked whether there are more lines with whitespace instead of tab. Instead of fixing all offending lines, it may be worth to change the splitEachLine pattern to include all space-like characters, eg by using \s.