[Bioperl-l] PubMed records (was: MeSH terms)
Chris Fields
cjfields at illinois.edu
Sun Oct 25 11:08:22 EDT 2009
On Oct 25, 2009, at 9:16 AM, Chris Fields wrote:
> On Oct 25, 2009, at 6:12 AM, Peter wrote:
>
>> On Sat, Oct 24, 2009 at 6:45 PM, Robert Bradbury
>> <robert.bradbury at gmail.com> wrote:
>>> <alsaplayer-devel at lists.tartarus.org>
>>> I'm not sure if this is related to the MeSH question question or
>>> not, but
>>> I've googled the documentation several times and never managed to
>>> find
>>> "robust" examples for how to manipulate PubMed records.
>>>
>>> It would seem that there ought to be code lying around which does:
>>> Given Genbank ID,
>>> Fetch all Pubmed records from that ID
>>> Fetch all related records (via NCBI's "related" record IDs)
>>
>> Isn't this exactly what the NCBI's ELink is for?
>>
>> http://eutils.ncbi.nlm.nih.gov/corehtml/query/static/elink_help.html
>> http://eutils.ncbi.nlm.nih.gov/corehtml/query/static/entrezlinks.html
>>
>> You'd need to work out which of the Entrez databases you are
>> starting from (probably protein or genome), and then the relevant
>> ELink command (maybe genome_pubmed, or protein_pubmed,
>> protein_pubmed or protein_pubmed_weighted look possible).
>> Then for related pubmed articles, the ELink command is just
>> pubmed_pubmed.
>>
>> Peter
>
> Agreed. This should be possible through BioPerl's
> Bio::DB::EUtilities. I'll try to post an example up.
>
> chris
As promised...
chris
PS. I've been thinking about a couple of small additions:
1) normalizing how one indicates whether or not to use eutil cookies/
history (indicating such currently requires one to be more explicit),
2) adding a pipeline-like utility where one could pass in a series of
hashrefs with databases and it will link them all together using eutil
history/cookies.
If there is a need for this I can start working on it over the next
few weeks, after I finally get the next set of alphas out.
--------------------------------------
#!/usr/bin/perl -w
use strict;
use warnings;
use Bio::DB::EUtilities;
my $term = 'Notch3 AND "Mus musculus"[ORGN]';
my $eutil = Bio::DB::EUtilities->new(-eutil => 'esearch',
-db => 'protein',
-term => $term,
-usehistory => 'y');
my $hist = $eutil->next_History || die "No queue history returned";
# can stipulate the actual linkname as well using -linkname
$eutil->reset_parameters(-eutil => 'elink',
-db => 'pubmed',
-dbfrom => 'protein',
-history => $hist,
-cmd => 'neighbor_history');
$hist = $eutil->next_History || die "No queue history returned";
# adjust -retstart/-retmax to get more results
$eutil->reset_parameters(-eutil => 'esummary',
-db => 'protein',
-history => $hist);
$eutil->print_all;
More information about the Bioperl-l
mailing list