[Biopython-dev] Namespace for online resources?

Michiel de Hoon mjldehoon at yahoo.com
Fri Feb 1 13:54:46 UTC 2013


Hi Lenna,

> Regarding point (2), is your primary concern namespace clutter or
> importing efficiency? 

Regarding point (2), my primary concern is that a Bio.WWW module would group together modules that don't have much in common with each other. I agree to your point that the category of internet access is more fundamental than the category of parsers. But still, which modules should then go into a Bio.WWW module? Any module whose sole purpose is to use the internet (that would exclude Bio.Entrez)? Any module whose main purpose is to use the internet? This would be unclear; for example, Bio.Entrez may or may not fall in that category, depending on how you use the module. Any module whose functionality includes internet access? Then if one day we add access to the JASPAR database over the internet to Bio.Motif, it would have to move to Bio.WWW.

Currently most modules are organized by theme (Bio.Seq, Bio.Motif, Bio.Cluster, Bio.Phylo, Bio.Entrez, etc.). For each theme, we have one module, one chapter in the documentation, one test of unit tests, one set of doctests, which I think is a huge advantage both in terms of clarity and in terms of user experience.

Best,
-Michiel.

--- On Wed, 1/30/13, Lenna Peterson <arklenna at gmail.com> wrote:

From: Lenna Peterson <arklenna at gmail.com>
Subject: Re: [Biopython-dev] Namespace for online resources?
To: "Michiel de Hoon" <mjldehoon at yahoo.com>
Cc: "Biopython-Dev Mailing List" <biopython-dev at biopython.org>
Date: Wednesday,
 January 30, 2013, 12:10 PM

Michiel, 
You raise an excellent point that separating the modules in this way will complicate doctests. 
Regarding point (2), is your primary concern namespace clutter or importing efficiency? 


I still maintain that the category of internet access is more fundamental than the category of parsers. For point (1), if every database is accessed using a WWW submodule, a user will know to look there.

Obviously moving everything would be a lot of work...
Cheers, 
Lenna



On Tue, Jan 29, 2013 at 9:00 PM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:

Bio.WWW was one of those modules that seem a good idea at first, but then failed to gain general acceptance. There are three problems with Bio.WWW:



1) From the module name, it's not clear what you would find in it. For example, if you want to access the Entrez database, would you first look in Bio.Entrez or in Bio.WWW? Similarly for TAIR: Would you look for it in Bio.TAIR, or in Bio.WWW?




2) The modules in Bio.WWW don't have much to do with each other, except that they access the internet. But any given user probably is mainly interested in Entrez, or ExPASy, or some other database, not in all of them at the same time.




3) The flip side of this is that a user accessing e.g. ExPASy would have to import both Bio.WWW and Bio.ExPASy to be able to use ExPASy. Doctests get more complicated also, as they would span more than one module. Here is an example from Bio.Entrez that accesses the database, and then parses the results:


>>> from Bio import Entrez

>>> Entrez.email = "Your.Name.Here at example.org"

>>> handle = Entrez.einfo() # or esearch, efetch, ...

>>> record = Entrez.read(handle)

>>> handle.close()



The ultimate question is whether we organize the code in Biopython by their functionality from a user perspective, or by the kind of things they do? Almost all of Biopython is organized according to the former. For example, we don't have a Bio.Parsers module for all the parsers; similarly, we don't have Bio.WWW for internet access.




Best,

-Michiel.





--- On Tue, 1/29/13, Peter Cock <p.j.a.cock at googlemail.com> wrote:



> From: Peter Cock <p.j.a.cock at googlemail.com>

> Subject: Re: [Biopython-dev] Namespace for online resources?

> To: "Wibowo Arindrarto" <w.arindrarto at gmail.com>

> Cc: "Biopython-Dev Mailing List" <biopython-dev at biopython.org>

> Date: Tuesday, January 29, 2013, 4:11 PM

> On Tue, Jan 29, 2013 at 9:03 PM,

> Peter Cock <p.j.a.cock at googlemail.com>

> wrote:

> > On Tue, Jan 29, 2013 at 7:52 PM, Wibowo Arindrarto

> > <w.arindrarto at gmail.com>

> wrote:

> >> Hi everyone,

> >>

> >> Why was Bio.WWW deprecated in the first place?

> >>

> >

> > The flippant answer is everything under Bio.WWW was

> moved

> > or deprecated:

> > http://lists.open-bio.org/pipermail/biopython-dev/2008-July/004059.html

> >

> > I'm trying to identify the discussions prior to that

> covering the moves:

> >

> > Bio.WWW.ExPASy -> Bio.ExPASy

> > Bio.WWW.InterPro -> Bio.InterPro

> > Bio.WWW.NCBI -> Bio.Entrez

> > Bio.WWW.SCOP -> Bio.SCOP

>

> Probably this thread,

> http://lists.open-bio.org/pipermail/biopython-dev/2007-November/003241.html

>

> Also a bit more background on the NCBI Entrez side:

> http://lists.open-bio.org/pipermail/biopython-dev/2008-February/003423.html

>

> Peter

> _______________________________________________

> Biopython-dev mailing list

> Biopython-dev at lists.open-bio.org

> http://lists.open-bio.org/mailman/listinfo/biopython-dev

>

_______________________________________________

Biopython-dev mailing list

Biopython-dev at lists.open-bio.org

http://lists.open-bio.org/mailman/listinfo/biopython-dev








More information about the Biopython-dev mailing list