[Bioperl-l] Bio::Biblio question

Sean Davis sdavis2 at mail.nih.gov
Fri Sep 3 11:38:39 EDT 2004


Thanks for the reply.  The problem isn't getting the IDs.  It is that 
the get_all_ids method returns a list that is prohibitively long for 
the SOAP service, so an exception is thrown.  I can easily check to see 
how big the list might be before issuing get_all_ids, but I am still 
stuck with trying to get some of the ids back.  Looking at the 
protocol, it appears that there is no such functionality as 
get_more_ids(200).  Am I correct on this?  The specification suggests 
that there might be a "format" argument for limiting what is returned 
by get_next, but I don't see anything except pubmed vs. medline as 
formats.

Thanks for any more guidance.

Sean

On Sep 2, 2004, at 11:15 PM, Baranidharan P wrote:

>   Dear Mr. Davis
>
> u  can try
>  my @ids= @{ new Bio::Biblio->find ("$gene")->get_all_ids } ;
>
>  foreach my $ids (@ids)
> {
> print $ids;
> }
>
>
> On Fri, 03 Sep 2004 Sean Davis wrote :
>> Dear all,
>>
>> I have the following code (below) which works in most cases.  However,
> sometimes, I get.  The failure is due to a very large result set and
> fails at the get_all_ids stage.  I only want the ids and I only want
> the first 200 or so.  Is there a way to QUICKLY (ie., without
> retrieving the entire XML for each) get only the first 200 ids?
>>
>>
>> my $biblio = Bio::Biblio->new();
>>     my $new_biblio=$biblio->find([$gene,$mod]);
>>     my $results=$new_biblio->get_count;
>>     if ($results) {
>>       my @ids=map { $_=~ /([0-9]*$)/; $1; }
> @{$new_biblio->get_all_ids};
>>
>>
>> ------------- EXCEPTION  -------------
>> MSG: --- SOAP FAULT ---
>> SOAP-ENV:Server Exception from service object: Limit exceeded. Use
> iterator instead.
>> STACK
> Bio::DB::Biblio::soap::__ANON__[/Library/Perl/5.8.1/Bio/DB/Biblio/
> soap.pm:120] /Library/Perl/5.8.1/Bio/DB/Biblio/soap.pm:119
>> STACK SOAP::Lite::call /Library/Perl/SOAP/Lite.pm:2839
>> STACK SOAP::Lite::__ANON__[/Library/Perl/SOAP/Lite.pm:2806]
> /Library/Perl/SOAP/Lite.pm:2802
>> STACK Bio::DB::Biblio::soap::get_all_ids
> /Library/Perl/5.8.1/Bio/DB/Biblio/soap.pm:424
>> STACK toplevel pubsearch.pl:35
>>
>> --------------------------------------
>>         Bio::Root::Root::throw('Bio::DB::Biblio::soap','-text','---
> SOAP FAULT ---\x{a}SOAP-ENV:Server Exception from service obj...')
> called at /Library/Perl/5.8.1/Bio/DB/Biblio/soap.pm line 119
>>
> Bio::DB::Biblio::soap::__ANON__[/Library/Perl/5.8.1/Bio/DB/Biblio/
> soap.pm:120]('SOAP::Lite=HASH(0xb8ab08)','SOAP::SOM=HASH(0xd4616c)')
> called at /Library/Perl/SOAP/Lite.pm line 2839
>>
> SOAP::Lite::call('SOAP::Lite=HASH(0xb8ab08)','getAllIDs','SOAP::
> Data=HASH(0xd6af78)') called at /Library/Perl/SOAP/Lite.pm line 2802
>>          SOAP::Lite::__ANON__[/Library/Perl/SOAP/Lite.pm:2806]('SOAP::
> Lite=HASH(0xb8ab08)','SOAP::Data=HASH(0xd6af78)') called at
> /Library/Perl/5.8.1/Bio/DB/Biblio/soap.pm line 424
>>          Bio::DB::Biblio::soap::get_all_ids('Bio::DB::Biblio::
> soap=HASH(0xd800d8)') called at pubsearch.pl line 35
>> Debugged program terminated.  Use q to quit or R to restart,
>>   use O inhibit_exit to avoid stopping after program termination,
>>   h q, h R or h O to get additional info.
>>
>>
>>
>> my $biblio = Bio::Biblio->new();
>>     my $new_biblio=$biblio->find([$gene,$mod]);
>>     my $results=$new_biblio->get_count;
>>     if ($results) {
>>       my @ids=map { $_=~ /([0-9]*$)/; $1; }
> @{$new_biblio->get_all_ids};
>>
>> _______________________________________________
>> Bioperl-l mailing list
>> Bioperl-l at portal.open-bio.org
>> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>
>
> ===============================
>
> Baranidharan P
>
> Senior Project Assistant
>
> Bioinformatics Sub DIC
>
> Dept of Biotechnology
>
> Indian Institute of Technology
>
> Kharagpur - 721302
>
> West Bengal
>
> INDIA
>
> Ph.  +91 3222 281365
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l



More information about the Bioperl-l mailing list