[Biopython-dev] SeqIO Abi Parser
w.arindrarto at gmail.com
Thu Aug 4 07:30:44 EDT 2011
Ah yes, I didn't know there could be handles without .seek() and .tell(),
and I thought those two are the proper way of traversing files, so I used
them. I also didn't realize you could use SeqIO with network handles, too.
This is really neat :).
In any case, sure, I'd love to make some changes to the current AbiIO code
so it works without .seek() and .tell(). Is there any other input types that
does not use .seek() and .tell() other than network handles? Here's my new
branch from the current master:
https://github.com/bow/biopython/tree/seqio-abi_handlefix, nothing different
for now but I'll push my updates soon.
Wibowo Arindrarto (bow)
On Thu, Aug 4, 2011 at 13:03, Peter Cock <p.j.a.cock at googlemail.com> wrote:
> On Wed, Aug 3, 2011 at 4:11 PM, Wibowo Arindrarto
> <w.arindrarto at gmail.com> wrote:
> > On Wed, Aug 3, 2011 at 16:04, Peter Cock <p.j.a.cock at googlemail.com>
> >> ...
> >> Congratulations, your code will be in the next Biopython release.
> >> ...
> > This really made my day :)! You're welcome and thank you reviewing my
> > too!
> I found something else to work on (sorry!). You're using seek and tell,
> may not exist. Network handles are a good example of this situation. Try:
> from urllib import urlopen
> from Bio import SeqIO
> handle = urlopen("http://biopython.org/SRC/biopython/Tests/Abi/310.ab1")
> record = SeqIO.read(handle, "abi")
> I've added some code to test_SeqIO.py to simulate this, which revealed that
> the SFF parser was also using the tell method. In that case we must track
> offset explicitly (it is needed for handling SFF index blocks). You can see
> I did this here - note I avoid the overhead of tracking the offset in
> I've tried the same trick in the ABI parser, but this reveals your code
> likes to
> seek backwards. Try the attached patch against this revision to confirm
> Having looked over your code, I don't believe you need to use seek and tell
> at all. This isn't critical to fix right now, but I would like us to
> solve it. Would
> you like to try? Make a new branch from the current master for this please.
More information about the Biopython-dev