[BioPython] Bio.EUtils
Michiel de Hoon
mjldehoon at yahoo.com
Sat Jan 26 05:38:01 UTC 2008
Dear Rohini,
Thank you for your example. It was very helpful.
Just a few questions about it:
> dbinfo = EUtils.databases['pubmed']
Is this statement needed? The variable dbinfo is not used in your example, and the example words fine without this statement.
> Then parse the xml or text lines.
Do you parse the xml or text output yourself, or do you use any Biopython tools for that?
The following does almost the same with Bio.WWW.NCBI instead of Bio.EUtils:
>>> from Bio.WWW import NCBI
>>> lines = NCBI.efetch(db='pubmed', id=listids, retmode='xml' ).readlines()
# or retmode='text'
I am saying "almost" the same, because currently Bio.WWW.NCBI.efetch does not handle multiple listids (so it accepts listids = '18211820' but not listids = ['18211820', '18211718', '18178374']). However, this can be fixed very easily in Biopython.
My last question is: Is this sufficient for your needs? Or do you see some advantage to using Bio.EUtils over Bio.WWW.NCBI?
Thanks again,
--Michiel.
Rohini Damle <rohini.damle at gmail.com> wrote: Hi,
Here is how I use Bio.Eutils:
from Bio import EUtils
from Bio.EUtils import DBIdsClient
dbinfo = EUtils.databases['pubmed']
#listids is a list of pubmed ids
record = DBIdsClient.from_dbids(EUtils.DBIds("pubmed",listids))
rec2= record.efetch(retmode="xml",rettype=None).readlines()
# or rec2= record.efetch(retmode="text", rettype="abstract").readlines() if you want to parse the abstract in text format
Then parse the xml or text lines.
Thanks
-Rohini.
On Jan 25, 2008 5:04 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
Hello everybody,
I am looking at the various ways Biopython interacts with NCBI's Entrez search engine, and if possible to organize and document this a bit more. Currently there are several modules that interact with Entrez. The most extensive one is Bio.EUtils, but there are also simpler modules such as Bio.WWW.NCBI. I was wondering:
1) Is anybody using Bio.EUtils?
2) If so, could you give an example script that uses Bio.EUtils?
So we can get an idea of the amount of overlap between Bio.EUtils and Bio.WWW.NCBI and others.
Thanks!
--Michiel.
---------------------------------
Never miss a thing. Make Yahoo your homepage.
_______________________________________________
BioPython mailing list - BioPython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython
Rohini Damle <rohini.damle at gmail.com> wrote: Hi,
Here is how I use Bio.Eutils:
from Bio import EUtils
from Bio.EUtils import DBIdsClient
dbinfo = EUtils.databases['pubmed']
#listids is a list of pubmed ids
record = DBIdsClient.from_dbids(EUtils.DBIds("pubmed",listids))
rec2= record.efetch(retmode="xml",rettype=None).readlines()
# or rec2= record.efetch(retmode="text", rettype="abstract").readlines() if you want to parse the abstract in text format
Then parse the xml or text lines.
Thanks
-Rohini.
On Jan 25, 2008 5:04 AM, Michiel de Hoon <mjldehoon at yahoo.com> wrote:
Hello everybody,
I am looking at the various ways Biopython interacts with NCBI's Entrez search engine, and if possible to organize and document this a bit more. Currently there are several modules that interact with Entrez. The most extensive one is Bio.EUtils, but there are also simpler modules such as Bio.WWW.NCBI. I was wondering:
1) Is anybody using Bio.EUtils?
2) If so, could you give an example script that uses Bio.EUtils?
So we can get an idea of the amount of overlap between Bio.EUtils and Bio.WWW.NCBI and others.
Thanks!
--Michiel.
---------------------------------
Never miss a thing. Make Yahoo your homepage.
_______________________________________________
BioPython mailing list - BioPython at lists.open-bio.org
http://lists.open-bio.org/mailman/listinfo/biopython
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
More information about the Biopython
mailing list