[Biopython-dev] [Biopython] SeqIO.index improvement suggestions

Eric Talevich eric.talevich at gmail.com
Sat Dec 19 22:42:23 UTC 2009


On Sat, Dec 19, 2009 at 1:57 AM, Peter <biopython at maubp.freeserve.co.uk>wrote:

> This is a vague idea (which I haven't tried yet), but maybe the
> Bio.SeqIO.index() function could take an optional argument
> (gzip=True, or something more general like archive=...) which
> would cause the file to be opened via the gzip module instead?
>

Or: open=open -- accept a function that opens the file; by default, the
built-in open function, but easily replaced by gzip.open, bz2.BZ2File, or a
user-defined function to open zip files (since that's less straightforward).

Otherwise, since the variety of archive formats supported by the Python
standard library is limited, archive='gzip'|'bz2'|'zip' sounds good.

-Eric



More information about the Biopython-dev mailing list