[Biopython-dev] Proposal: Parse and read in SeqIO and NCBIXML

Peter biopython at maubp.freeserve.co.uk
Wed Apr 15 21:30:55 UTC 2009


On Wed, Apr 15, 2009 at 8:19 PM, Sebastian Bassi
<sbassi at clubdelarazon.org> wrote:
> In SeqIO there is parse and read. Parse return an iterable with all
> the record found in the file, while read return only a record and it
> is used when we know that the file has only one record. This is OK.
> But in NCBIXML, there is only parse. If the the ncbiblast output has
> only one record (because it was made from 1 query), now we have to
> write:
> NCBIXML.parse(x).next() or iterate over a "list" of one member. I
> think it would be nice to add a read method to NCBIXML, such as the
> one in SeqIO.

That seems sensible to me, we could probably squeeze that in for
Biopython 1.50 too.  Could you file an enhancement bug in case I
forget about this?

Peter



More information about the Biopython-dev mailing list