[Biopython-dev] SeqIO Abi Parser

Peter Cock p.j.a.cock at googlemail.com
Tue Aug 2 16:47:20 UTC 2011

On Sat, Jul 30, 2011 at 8:42 AM, Wibowo Arindrarto
<w.arindrarto at gmail.com> wrote:
> Hi Peter,
> I've done some more improvements to the code:
> - I've written the check and unittest for the file handle mode. I've set it
> so that abi file has to be opened in 'rb' mode, otherwise it'll return an
> error. While it's ok to open in 'r' mode in python 2 in Linux, it has to be
> specified as 'rb' in Windows and/or Python 3 for the file to be read
> correctly. So I decided forcing it to 'rb' is the best. Because of this, I
> changed 'test_SeqIO.py:503' to include the mode argument when opening.

OK, good.

> - I've also checked against test_Emboss.py for seqret output, after
> including the abi format in it. My EMBOSS version is 6.4.0. There was a
> slight problem with this testing, since for some reason the ID returned by
> seqret is always "EMBOSS_001". Something might be wrong with my EMBOSS
> installation, since when I previously tested it against 6.1.0, the ID was
> correct (although the qual values not, so I had to upgrade). As expected, if
> I comment out the code that tests for sequence id ('test_Emboss.py:168-172')
> the tests pass. Maybe you could try testing it as well and see if EMBOSS
> also returns the default id instead of the sample name?

EMBOSS 6.3.1 is fine, so I think we should report this as a bug in EMBOSS 6.4.0

> - Finally, I did some small cosmetic changes to the code (typos, etc).
> All changes have been pushed to my github fork. Now I still have time for
> the weekend to improve whatever needs to be improved :).
> Regards,

There appears to be another Python 3 problem, consider this at the
python prompt:

from Bio import SeqIO
record = SeqIO.read("Tests/Abi/310.ab1", "abi")

I expect as list of integers, e.g. [0, 0, 0, ..., 0] not ['\x00',
'\x00', '\x00', ..., '\x00']


More information about the Biopython-dev mailing list