[Biopython-dev] sff reader

Peter biopython at maubp.freeserve.co.uk
Tue Sep 1 13:38:07 UTC 2009


On Fri, Aug 14, 2009 at 1:00 PM, Peter<biopython at maubp.freeserve.co.uk> wrote:
>>> Jose's code uses seek/tell which means it has to have a handle
>>> to an actual file. He also used binary read mode - I'm not sure if
>>> this was essential or not.
>>
>> Binary mode was not essential - opening an SFF file in default
>> mode also seemed to work fine with Jose's code.
>
> Having worked on this more, default mode or binary mode are fine.
> However, as you might expect, you can't use Python's universal
> read lines mode when parsing SFF files.

Just to clarify this for the record - on Unix you can parse an SFF file
opened in default mode ("r") or binary mode ("rb") but not universal
read line mode ("rU"). However, on Windows only binary mode works.

I've updated my SFF code on github to catch this (as otherwise the
error messages are rather cryptic).

Peter



More information about the Biopython-dev mailing list