[Biopython-dev] Accessing ExPASy through Bio.SwissProt / Bio.SeqIO

Peter biopython-dev at maubp.freeserve.co.uk
Tue Dec 4 10:26:52 UTC 2007


> For consistency with Bio.SeqIO, it would make sense if ExPASyDictionary would
> returns handles instead of parsed objects.

I agree that it would in general be simpler if our online APIs
returned handles by default.  This also applies to the Bio.GenBank
methods.  Of course, we should preserve existing functionality if
possible.

Another alternative is to return SeqRecords by default (via Bio.SeqIO)
but this wouldn't generalise to non-sequence files like ProSite etc.

One idea I had been thinking about was adding a new function
Bio.SeqIO.fetch(...) or Bio.SeqIO.online_fetch(...) which would act as
a proxy to all our supported online sequence databases, and either
return a handle to the requested record(s), or perhaps return
SeqRecord(s).

One API model would be that outlined for the (possibly defunct?) Open
Biological Database Access (OBDA) scheme, which covers both BioSQL
access and online fetching (biofetch):

http://cvs.open-bio.org/cgi-bin/viewcvs/viewcvs.cgi/obda-specs/biofetch/biofetch.txt?cvsroot=obf-common

But first I should probably finish working on BioSQL ;)

> *If* we decide that ExPASyDictionary should return handles, *then* actually
> we don't really need an ExPASyDictionary, as its behavior is then largely the
> same as Bio.WWW.ExPASy.get_sprot_raw. So in short, in my opinion
> Bio.SwissProt.SProt.ExPASyDictionary does not add much beyond what
> Bio.WWW.ExPASy.get_sprot_raw already offers.

Can ExPASyDictionary return anything that get_sprot_raw can't?
Otherwise from the user's point of view its just a coding style issue
(dictionary versus function).

Peter



More information about the Biopython-dev mailing list