Python: fasta parser: fixed a bug stopping the program when the last
line contained a single nucleotide
This commit is contained in:
@ -104,6 +104,7 @@ def fastaNucIterator(lineiterator,
|
|||||||
cdef bytes sequence
|
cdef bytes sequence
|
||||||
cdef int skipped, ionly, read
|
cdef int skipped, ionly, read
|
||||||
cdef Nuc_Seq seq
|
cdef Nuc_Seq seq
|
||||||
|
cdef bint stop
|
||||||
|
|
||||||
if only is None:
|
if only is None:
|
||||||
ionly = -1
|
ionly = -1
|
||||||
@ -130,7 +131,8 @@ def fastaNucIterator(lineiterator,
|
|||||||
else:
|
else:
|
||||||
line = firstline
|
line = firstline
|
||||||
|
|
||||||
while True:
|
stop=False
|
||||||
|
while not stop:
|
||||||
|
|
||||||
if ionly >= 0 and read >= ionly:
|
if ionly >= 0 and read >= ionly:
|
||||||
break
|
break
|
||||||
@ -153,7 +155,7 @@ def fastaNucIterator(lineiterator,
|
|||||||
s.append(line[0:-1])
|
s.append(line[0:-1])
|
||||||
line = next(iterator)
|
line = next(iterator)
|
||||||
except StopIteration:
|
except StopIteration:
|
||||||
pass
|
stop=True
|
||||||
|
|
||||||
sequence = b"".join(s)
|
sequence = b"".join(s)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
major = 3
|
major = 3
|
||||||
minor = 0
|
minor = 0
|
||||||
serial= '0-beta16'
|
serial= '0-beta17'
|
||||||
|
|
||||||
version ="%d.%02d.%s" % (major,minor,serial)
|
version ="%d.%02d.%s" % (major,minor,serial)
|
||||||
|
Reference in New Issue
Block a user