Patch a bug about the reading of the last sequence

This commit is contained in:
2016-05-21 10:28:03 +02:00
parent e681ca646d
commit 0b9a41d952

View File

@ -28,9 +28,14 @@ def fastaIterator(lineiterator, int buffersize=100000000):
ident,tags,definition = parseHeader(line) ident,tags,definition = parseHeader(line)
s = [] s = []
line = next(i) line = next(i)
try:
while line[0]!='>': while line[0]!='>':
s.append(line[0:-1]) s.append(line[0:-1])
line = next(i) line = next(i)
except StopIteration:
pass
sequence = "".join(s) sequence = "".join(s)
quality = None quality = None
@ -44,3 +49,4 @@ def fastaIterator(lineiterator, int buffersize=100000000):