[Bioperl-l] [bioperl newbie] Retrieving link to protein from PubChem

saikari keitele saikari78 at gmail.com
Tue Nov 10 11:41:11 UTC 2009


Thanks again very much for your help and the script.
i've been trying it, however I fail to find any protein record linked to a
record in the pcsubstance database.
Do you think that its is because  no links have been defined between the 2
databases, or that I am just unlucky and that no link exists for the
particular records I'm testing?
Thanks again

saikari

On Mon, Nov 9, 2009 at 4:41 PM, saikari keitele <saikari78 at gmail.com> wrote:

> Fabulous!. Huge help.
> saikari
>
>   On Mon, Nov 9, 2009 at 4:27 PM, Chris Fields <cjfields at illinois.edu>wrote:
>
>>  On Nov 9, 2009, at 10:05 AM, saikari keitele wrote:
>>
>> Hi,
>>>
>>> I'm using Bioperl to retrieve records from PubChem.
>>> I'm trying to find a way-but have been unsuccessful- to retrieve from a
>>> compound record, the reference to the protein(s) that can synthesize the
>>> compound.
>>> Thanks very much.
>>>
>>> saikari
>>>
>>
>> The below bioperl script returns the GI for proteins that correspond to
>> the substance passed on the command line; invoke using 'perl
>> pc_substance.pl substance_requested'.  It probably needs more fiddling to
>> catch everything but it should get you started.
>>
>> For other bits and pieces (such as how to retrieve the raw sequence
>> files), please see the EUtilities HOWTO:
>>
>> http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook
>>
>> chris
>>
>> ----------------------------------------
>>
>> #!/usr/bin/perl -w
>>
>> use 5.010;
>> use strict;
>> use warnings;
>> use Bio::DB::EUtilities;
>>
>> my $substance = shift;
>>
>> my $eutil = Bio::DB::EUtilities->new(-eutil => 'esearch',
>>                                     -db => 'pcsubstance',
>>                                     -term => $substance,
>>                                     -usehistory => 'y');
>>
>> my $hist = $eutil->next_History || die;
>>
>> $eutil->reset_parameters(-eutil => 'elink',
>>                       -history => $hist,
>>                       -db      => 'protein',
>>                       -dbfrom  => 'pcsubstance',
>>                       -retmax  => 1000);
>>
>> say join(',',$eutil->get_ids);
>>
>
>



More information about the Bioperl-l mailing list