[Biopython-dev] Accessing ExPASy through Bio.SwissProt /Bio.SeqIO
Michiel de Hoon
mdehoon at c2b2.columbia.edu
Sat Dec 8 03:18:09 UTC 2007
Peter wrote:
> I would add a note saying doing it this way gives
> Bio.SwissProt.SProt.Record objects,
> while you could alternatively get SeqRecord objects as described in
> the SeqIO chapter
> (use a reference).
OK I will add that.
>
> I'd suggested a Bio.SeqIO function, with a name like parse1() or
> parse_sole() etc which
> would return a single SeqRecord - and raise an error if the handle
> didn't contain one
> and only one record. We could call this function read() if you prefer.
>
I'd prefer read() instead of parse1(), parse_sole() etc. for the
following reasons:
1) Having two names that are clearly different emphasizes the fact that
they return different things (parse() returns an iterator, read() a record).
2) Some modules deal with data that always consist of one record (for
example, gene expression data in case of Bio.Cluster). Such modules can
have a read() function but not a parse(). It would feel strange if a
module has a parse1() function but not a parse().
--Michiel.
More information about the Biopython-dev
mailing list