Fixed issue where ambiguous taxa names got the same internal ID
[bioperl-live.git] / examples / biblio / biblio-eutils-example.pl
blob3873be0434f4ea8441da22fc549a7cf61c5ad7e3
1 #!/usr/bin/perl
3 =encoding utf-8
5 =head1 NAME
7 biblio-eutils-example.pl
9 =head1 SYNOPSIS
11 Script that uses Bio::Biblio, accessing 'eutils' at PubMed.
13 As of Bioperl version 1.4 there are 3 bibliographic repositories,
14 stipulated by the -access argument: soap, eutils, and biofetch.
15 The default is 'soap'. Not all of these repositories support all
16 the Biblio methods nor are the contents of these repositories
17 necessarily the same. Choose wisely!
19 =head2 PubMed Queries
21 The syntax of the queries is the same as at PubMed, see
22 http://www.ncbi.nlm.nih.gov/entrez/query/Pmc/pmchelp.html#SearchFieldDescriptionsandTags
23 for more information on how to construct queries.
25 =head2 Parsing Results
27 Bio::Biblio will give you XML when querying eutils so you have
28 choose a method to parse XML. A fairly simple approach uses
29 XML::Twig, shown here. This example shows how query by title and
30 how to retrieve the titles of the abstracts found.
32 =cut
34 use strict;
35 use Bio::Biblio;
36 use XML::Twig;
38 # one-liner to get the number of abstracts found
39 my $num = new Bio::Biblio(-access => "eutils")->find("Osborne","authors")->
40 get_count;
42 my $biblio = Bio::Biblio->new(-access => "eutils");
44 my $result = $biblio->find("brain [TI] AND MDM2 [TI]");
46 my $pmids = $result->get_all_ids;
48 my $parser = XML::Twig->new(twig_roots => {"ArticleTitle" => \&print_title} );
50 for my $pmid (@$pmids) {
51 my $xml = $biblio->get_by_id($pmid);
52 eval {
53 $parser->parse($xml);
55 if ($@) {
56 warn "Problem parsing PubMed $pmid XML: $!\n";
60 sub print_title {
61 my ($twig, $elt) = @_;
62 print $elt->text,"\n";
63 $twig->purge;
66 =head1 PubMed XML Example
68 <?xml version="1.0"?>
69 <!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st November 2004//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pubmed_041101.dtd">
70 <PubmedArticleSet>
71 <PubmedArticle>
72 <MedlineCitation Owner="NLM" Status="MEDLINE">
73 <PMID>15815077</PMID>
74 <DateCreated>
75 <Year>2005</Year>
76 <Month>04</Month>
77 <Day>07</Day>
78 </DateCreated>
79 <DateCompleted>
80 <Year>2005</Year>
81 <Month>08</Month>
82 <Day>29</Day>
83 </DateCompleted>
84 <Article PubModel="Print">
85 <Journal>
86 <ISSN>0231-5882</ISSN>
87 <JournalIssue>
88 <Volume>23</Volume>
89 <Issue>4</Issue>
90 <PubDate>
91 <Year>2004</Year>
92 <Month>Dec</Month>
93 </PubDate>
94 </JournalIssue>
95 </Journal>
96 <ArticleTitle>Rabbit liver microsomal system: study of interaction with two model N-nitrosamines and their metabolism.</ArticleTitle>
97 <Pagination>
98 <MedlinePgn>423-33</MedlinePgn>
99 </Pagination>
100 <Abstract>
101 <AbstractText>Rabbit liver microsomes of control (non-treated) or animals induced either by ethanol (EtOH) or phenobarbital (PB) were incubated with N-nitrosodimethylamine (NDMA) or N-nitrosomethylaniline (NMA). Difference spectroscopy showed that NMA is bound to the substrate-binding site of cytochrome P-450 (CYP) isoforms as heme ligand in control and EtOH pre-treated microsomes. On the other hand, PB-induced microsomes exhibit with NMA substrate type of spectra. NDMA does not provide any type of binding spectra with used microsomal systems. Oxidative bio-activation of N-nitrosamines by the microsomal CYP isoforms was measured as formaldehyde formation. Analysis of reaction kinetics in control microsomes revealed, for both substrates, two values of Michaelis-Menten constant (K(m)) for, K(m) values of 0.03 and 0.13 mmol/l for NDMA, and 0.30 and 0.82 mmol/l for NMA. Induction of animals with EtOH resulted in a decrease in the K(m) value for both substrates. In contrast, PB treatment caused an elevation of K(m) value for NDMA. Based on these data, we conclude that EtOH-inducible microsomal CYP isoforms (mainly CYP2E1) are responsible for binding and N-demethylation metabolism of both studied N-nitrosamines in rabbit liver microsomal system. The role of the other CYP isoforms involved in the metabolism of mentioned N-nitrosamines is discussed.</AbstractText>
102 </Abstract>
103 <Affiliation>Department of Biochemistry, Faculty of Science, Charles University, Hlavova 2030, 128 43 Prague 2, Czech Republic. mis@natur.cuni.cz</Affiliation>
104 <AuthorList CompleteYN="Y">
105 <Author ValidYN="Y">
106 <LastName>Sulc</LastName>
107 <ForeName>B</ForeName>
108 <Initials>B</Initials>
109 </Author>
110 <Author ValidYN="Y">
111 <LastName>KubE<237>ckovE<225></LastName>
112 <ForeName>B</ForeName>
113 <Initials>B</Initials>
114 </Author>
115 <Author ValidYN="Y">
116 <LastName>ME<225>slovE<225></LastName>
117 <ForeName>F</ForeName>
118 <Initials>B</Initials>
119 </Author>
120 <Author ValidYN="Y">
121 <LastName>Hodek</LastName>
122 <ForeName>C</ForeName>
123 <Initials>B</Initials>
124 </Author>
125 </AuthorList>
126 <Language>eng</Language>
127 <PublicationTypeList>
128 <PublicationType>Journal Article</PublicationType>
129 </PublicationTypeList>
130 </Article>
131 <MedlineJournalInfo>
132 <Country>Slovakia</Country>
133 <MedlineTA>Gen Physiol Biophys</MedlineTA>
134 <NlmUniqueID>8400604</NlmUniqueID>
135 </MedlineJournalInfo>
136 <ChemicalList>
137 <Chemical>
138 <RegistryNumber>0</RegistryNumber>
139 <NameOfSubstance>N-nitrosodimethylamine</NameOfSubstance>
140 </Chemical>
141 <Chemical>
142 <RegistryNumber>0</RegistryNumber>
143 <NameOfSubstance>Nitrosamines</NameOfSubstance>
144 </Chemical>
145 <Chemical>
146 <RegistryNumber>50-06-6</RegistryNumber>
147 <NameOfSubstance>Phenobarbital</NameOfSubstance>
148 </Chemical>
149 <Chemical>
150 <RegistryNumber>614-00-6</RegistryNumber>
151 <NameOfSubstance>N-methyl-N-nitrosoaniline</NameOfSubstance>
152 </Chemical>
153 <Chemical>
154 <RegistryNumber>64-17-5</RegistryNumber>
155 <NameOfSubstance>Ethanol</NameOfSubstance>
156 </Chemical>
157 <Chemical>
158 <RegistryNumber>9035-51-2</RegistryNumber>
159 <NameOfSubstance>Cytochrome P-450 Enzyme System</NameOfSubstance>
160 </Chemical>
161 </ChemicalList>
162 <CitationSubset>I</CitationSubset>
163 <MeshHeadingList>
164 <MeshHeading>
165 <DescriptorName MajorTopicYN="N">Animals</DescriptorName>
166 </MeshHeading>
167 <MeshHeading>
168 <DescriptorName MajorTopicYN="N">Cytochrome P-450 Enzyme System</DescriptorName>
169 <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
170 </MeshHeading>
171 <MeshHeading>
172 <DescriptorName MajorTopicYN="N">Ethanol</DescriptorName>
173 <QualifierName MajorTopicYN="Y">administration &amp; dosage</QualifierName>
174 </MeshHeading>
175 <MeshHeading>
176 <DescriptorName MajorTopicYN="N">Liver</DescriptorName>
177 <QualifierName MajorTopicYN="N">drug effects</QualifierName>
178 <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
179 </MeshHeading>
180 <MeshHeading>
181 <DescriptorName MajorTopicYN="N">Male</DescriptorName>
182 </MeshHeading>
183 <MeshHeading>
184 <DescriptorName MajorTopicYN="N">Microsomes, Liver</DescriptorName>
185 <QualifierName MajorTopicYN="N">drug effects</QualifierName>
186 <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
187 </MeshHeading>
188 <MeshHeading>
189 <DescriptorName MajorTopicYN="N">Nitrosamines</DescriptorName>
190 <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
191 </MeshHeading>
192 <MeshHeading>
193 <DescriptorName MajorTopicYN="N">Phenobarbital</DescriptorName>
194 <QualifierName MajorTopicYN="Y">administration &amp; dosage</QualifierName>
195 </MeshHeading>
196 <MeshHeading>
197 <DescriptorName MajorTopicYN="N">Rabbits</DescriptorName>
198 </MeshHeading>
199 <MeshHeading>
200 <DescriptorName MajorTopicYN="N">Research Support, Non-U.S. Govt</DescriptorName>
201 </MeshHeading>
202 </MeshHeadingList>
203 </MedlineCitation>
204 <PubmedData>
205 <History>
206 <PubMedPubDate PubStatus="pubmed">
207 <Year>2005</Year>
208 <Month>4</Month>
209 <Day>9</Day>
210 <Hour>9</Hour>
211 <Minute>0</Minute>
212 </PubMedPubDate>
213 <PubMedPubDate PubStatus="medline">
214 <Year>2005</Year>
215 <Month>8</Month>
216 <Day>30</Day>
217 <Hour>9</Hour>
218 <Minute>0</Minute>
219 </PubMedPubDate>
220 </History>
221 <PublicationStatus>ppublish</PublicationStatus>
222 <ArticleIdList>
223 <ArticleId IdType="pubmed">15815077</ArticleId>
224 </ArticleIdList>
225 </PubmedData>
226 </PubmedArticle>
227 </PubmedArticleSet>
229 =cut