diff --git a/python/obitools3/parsers/fasta.pyx b/python/obitools3/parsers/fasta.pyx index 2a262bc..44be6b9 100644 --- a/python/obitools3/parsers/fasta.pyx +++ b/python/obitools3/parsers/fasta.pyx @@ -28,9 +28,14 @@ def fastaIterator(lineiterator, int buffersize=100000000): ident,tags,definition = parseHeader(line) s = [] line = next(i) - while line[0]!='>': - s.append(line[0:-1]) - line = next(i) + + try: + while line[0]!='>': + s.append(line[0:-1]) + line = next(i) + except StopIteration: + pass + sequence = "".join(s) quality = None @@ -42,5 +47,6 @@ def fastaIterator(lineiterator, int buffersize=100000000): "annotation" : {} } + \ No newline at end of file