~ubuntu-branches/ubuntu/oneiric/bioperl/oneiric

« back to all changes in this revision

Viewing changes to examples/biblio/biblio-eutils-example.pl

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2007-09-21 22:52:22 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20070921225222-tt20m2yy6ycuy2d8
Tags: 1.5.2.102-1
* Developer release.
* Upgraded source package to debhelper 5 and standards-version 3.7.2.
* Added libmodule-build-perl and libtest-harness-perl to
  build-depends-indep.
* Disabled automatic CRAN download.
* Using quilt instead of .diff.gz to manage modifications.
* Updated Recommends list for the binary package.
* Moved the "production-quality" scripts to /usr/bin/.
* New maintainer: Debian-Med packaging team mailing list.
* New uploaders: Charles Plessy and Steffen Moeller.
* Updated Depends, Recommends and Suggests.
* Imported in Debian-Med's SVN repository on Alioth.
* Executing the regression tests during package building.
* Moved the Homepage: field out from the package's description.
* Updated watch file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
# $Id: biblio-eutils-example.pl,v 1.1 2005/09/24 01:05:28 bosborne Exp $
 
3
=head1 NAME
 
4
 
 
5
biblio-eutils-example.pl
 
6
 
 
7
=head1 SYNOPSIS
 
8
 
 
9
Script that uses Bio::Biblio, accessing 'eutils' at PubMed.
 
10
 
 
11
As of Bioperl version 1.4 there are 3 bibliographic repositories,
 
12
stipulated by the -access argument: soap, eutils, and biofetch.
 
13
The default is 'soap'. Not all of these repositories support all
 
14
the Biblio methods nor are the contents of these repositories
 
15
necessarily the same. Choose wisely!
 
16
 
 
17
=head2 PubMed Queries
 
18
 
 
19
The syntax of the queries is the same as at PubMed, see
 
20
http://www.ncbi.nlm.nih.gov/entrez/query/Pmc/pmchelp.html#SearchFieldDescriptionsandTags
 
21
for more information on how to construct queries.
 
22
 
 
23
=head2 Parsing Results
 
24
 
 
25
Bio::Biblio will give you XML when querying eutils so you have
 
26
choose a method to parse XML. A fairly simple approach uses
 
27
XML::Twig, shown here. This example shows how query by title and
 
28
how to retrieve the titles of the abstracts found.
 
29
 
 
30
=cut
 
31
 
 
32
use strict;
 
33
use Bio::Biblio;
 
34
use XML::Twig;
 
35
 
 
36
# one-liner to get the number of abstracts found
 
37
my $num = new Bio::Biblio(-access => "eutils")->find("Osborne","authors")->
 
38
  get_count;
 
39
 
 
40
my $biblio = Bio::Biblio->new(-access => "eutils");
 
41
 
 
42
my $result = $biblio->find("brain [TI] AND MDM2 [TI]");
 
43
 
 
44
my $pmids = $result->get_all_ids;
 
45
 
 
46
my $parser = XML::Twig->new(twig_roots => {"ArticleTitle" => \&print_title} );
 
47
 
 
48
for my $pmid (@$pmids) {
 
49
        my $xml = $biblio->get_by_id($pmid);
 
50
        eval {
 
51
                $parser->parse($xml);
 
52
        };
 
53
        if ($@) {
 
54
                warn "Problem parsing PubMed $pmid XML: $!\n";
 
55
        }
 
56
}
 
57
 
 
58
sub print_title {
 
59
        my ($twig, $elt) = @_;
 
60
        print $elt->text,"\n";
 
61
        $twig->purge;
 
62
}
 
63
 
 
64
=head1 PubMed XML Example
 
65
 
 
66
<?xml version="1.0"?>
 
67
<!DOCTYPE PubmedArticleSet PUBLIC "-//NLM//DTD PubMedArticle, 1st November 2004//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pubmed_041101.dtd">
 
68
<PubmedArticleSet>
 
69
<PubmedArticle>
 
70
    <MedlineCitation Owner="NLM" Status="MEDLINE">
 
71
        <PMID>15815077</PMID>
 
72
        <DateCreated>
 
73
            <Year>2005</Year>
 
74
            <Month>04</Month>
 
75
            <Day>07</Day>
 
76
        </DateCreated>
 
77
        <DateCompleted>
 
78
            <Year>2005</Year>
 
79
            <Month>08</Month>
 
80
            <Day>29</Day>
 
81
        </DateCompleted>
 
82
        <Article PubModel="Print">
 
83
            <Journal>
 
84
                <ISSN>0231-5882</ISSN>
 
85
                <JournalIssue>
 
86
                    <Volume>23</Volume>
 
87
                    <Issue>4</Issue>
 
88
                    <PubDate>
 
89
                        <Year>2004</Year>
 
90
                        <Month>Dec</Month>
 
91
                    </PubDate>
 
92
                </JournalIssue>
 
93
            </Journal>
 
94
            <ArticleTitle>Rabbit liver microsomal system: study of interaction with two model N-nitrosamines and their metabolism.</ArticleTitle>
 
95
            <Pagination>
 
96
                <MedlinePgn>423-33</MedlinePgn>
 
97
            </Pagination>
 
98
            <Abstract>
 
99
                <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>
 
100
            </Abstract>
 
101
            <Affiliation>Department of Biochemistry, Faculty of Science, Charles University, Hlavova 2030, 128 43 Prague 2, Czech Republic. mis@natur.cuni.cz</Affiliation>
 
102
            <AuthorList CompleteYN="Y">
 
103
                <Author ValidYN="Y">
 
104
                    <LastName>Sulc</LastName>
 
105
                    <ForeName>B</ForeName>
 
106
                    <Initials>B</Initials>
 
107
                </Author>
 
108
                <Author ValidYN="Y">
 
109
                    <LastName>Kub�ckov�</LastName>
 
110
                    <ForeName>B</ForeName>
 
111
                    <Initials>B</Initials>
 
112
                </Author>
 
113
                <Author ValidYN="Y">
 
114
                    <LastName>M�slov�</LastName>
 
115
                    <ForeName>F</ForeName>
 
116
                    <Initials>B</Initials>
 
117
                </Author>
 
118
                <Author ValidYN="Y">
 
119
                    <LastName>Hodek</LastName>
 
120
                    <ForeName>C</ForeName>
 
121
                    <Initials>B</Initials>
 
122
                </Author>
 
123
            </AuthorList>
 
124
            <Language>eng</Language>
 
125
            <PublicationTypeList>
 
126
                <PublicationType>Journal Article</PublicationType>
 
127
            </PublicationTypeList>
 
128
        </Article>
 
129
        <MedlineJournalInfo>
 
130
            <Country>Slovakia</Country>
 
131
            <MedlineTA>Gen Physiol Biophys</MedlineTA>
 
132
            <NlmUniqueID>8400604</NlmUniqueID>
 
133
        </MedlineJournalInfo>
 
134
        <ChemicalList>
 
135
            <Chemical>
 
136
                <RegistryNumber>0</RegistryNumber>
 
137
                <NameOfSubstance>N-nitrosodimethylamine</NameOfSubstance>
 
138
            </Chemical>
 
139
            <Chemical>
 
140
                <RegistryNumber>0</RegistryNumber>
 
141
                <NameOfSubstance>Nitrosamines</NameOfSubstance>
 
142
            </Chemical>
 
143
            <Chemical>
 
144
                <RegistryNumber>50-06-6</RegistryNumber>
 
145
                <NameOfSubstance>Phenobarbital</NameOfSubstance>
 
146
            </Chemical>
 
147
            <Chemical>
 
148
                <RegistryNumber>614-00-6</RegistryNumber>
 
149
                <NameOfSubstance>N-methyl-N-nitrosoaniline</NameOfSubstance>
 
150
            </Chemical>
 
151
            <Chemical>
 
152
                <RegistryNumber>64-17-5</RegistryNumber>
 
153
                <NameOfSubstance>Ethanol</NameOfSubstance>
 
154
            </Chemical>
 
155
            <Chemical>
 
156
                <RegistryNumber>9035-51-2</RegistryNumber>
 
157
                <NameOfSubstance>Cytochrome P-450 Enzyme System</NameOfSubstance>
 
158
            </Chemical>
 
159
        </ChemicalList>
 
160
        <CitationSubset>I</CitationSubset>
 
161
        <MeshHeadingList>
 
162
            <MeshHeading>
 
163
                <DescriptorName MajorTopicYN="N">Animals</DescriptorName>
 
164
            </MeshHeading>
 
165
            <MeshHeading>
 
166
                <DescriptorName MajorTopicYN="N">Cytochrome P-450 Enzyme System</DescriptorName>
 
167
                <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
 
168
            </MeshHeading>
 
169
            <MeshHeading>
 
170
                <DescriptorName MajorTopicYN="N">Ethanol</DescriptorName>
 
171
                <QualifierName MajorTopicYN="Y">administration &amp; dosage</QualifierName>
 
172
            </MeshHeading>
 
173
            <MeshHeading>
 
174
                <DescriptorName MajorTopicYN="N">Liver</DescriptorName>
 
175
                <QualifierName MajorTopicYN="N">drug effects</QualifierName>
 
176
                <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
 
177
            </MeshHeading>
 
178
            <MeshHeading>
 
179
                <DescriptorName MajorTopicYN="N">Male</DescriptorName>
 
180
            </MeshHeading>
 
181
            <MeshHeading>
 
182
                <DescriptorName MajorTopicYN="N">Microsomes, Liver</DescriptorName>
 
183
                <QualifierName MajorTopicYN="N">drug effects</QualifierName>
 
184
                <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
 
185
            </MeshHeading>
 
186
            <MeshHeading>
 
187
                <DescriptorName MajorTopicYN="N">Nitrosamines</DescriptorName>
 
188
                <QualifierName MajorTopicYN="Y">metabolism</QualifierName>
 
189
            </MeshHeading>
 
190
            <MeshHeading>
 
191
                <DescriptorName MajorTopicYN="N">Phenobarbital</DescriptorName>
 
192
                <QualifierName MajorTopicYN="Y">administration &amp; dosage</QualifierName>
 
193
            </MeshHeading>
 
194
            <MeshHeading>
 
195
                <DescriptorName MajorTopicYN="N">Rabbits</DescriptorName>
 
196
            </MeshHeading>
 
197
            <MeshHeading>
 
198
                <DescriptorName MajorTopicYN="N">Research Support, Non-U.S. Govt</DescriptorName>
 
199
            </MeshHeading>
 
200
        </MeshHeadingList>
 
201
    </MedlineCitation>
 
202
    <PubmedData>
 
203
        <History>
 
204
            <PubMedPubDate PubStatus="pubmed">
 
205
                <Year>2005</Year>
 
206
                <Month>4</Month>
 
207
                <Day>9</Day>
 
208
                <Hour>9</Hour>
 
209
                <Minute>0</Minute>
 
210
            </PubMedPubDate>
 
211
            <PubMedPubDate PubStatus="medline">
 
212
                <Year>2005</Year>
 
213
                <Month>8</Month>
 
214
                <Day>30</Day>
 
215
                <Hour>9</Hour>
 
216
                <Minute>0</Minute>
 
217
            </PubMedPubDate>
 
218
        </History>
 
219
        <PublicationStatus>ppublish</PublicationStatus>
 
220
        <ArticleIdList>
 
221
            <ArticleId IdType="pubmed">15815077</ArticleId>
 
222
        </ArticleIdList>
 
223
    </PubmedData>
 
224
  </PubmedArticle>
 
225
 </PubmedArticleSet>
 
226
 
 
227
=cut