[Bioperl-l] No error message is given for a warning (EUtilities)

Chris Fields cjfields at illinois.edu
Sun Jul 11 15:14:54 UTC 2010


On Jul 10, 2010, at 8:40 PM, Peng Yu wrote:

> Hi,
> 
> I have the following warnings and perl program. I don't understand why
> there is a warning and what the error is. The ncbi's eutils url seems
> OK. If shrink $term (see the code), then the warning is gone. Could
> somebody let me know what the problem is with my bioperl code?
> 
> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=CLCA1[tiab]+OR+CACC[tiab]+OR+CACC1[tiab]+OR+CLCRG1[tiab]+OR+CaCC-1[tiab]+OR+FLJ95147[tiab]+OR+GOB5[tiab]+OR+hCLCA1[tiab]+OR+hCaCC-1[tiab]&retmax=1000
> 
> $ ./main.pl |head
> 
> --------------------- WARNING ---------------------
> MSG: NCBI esearch Errors/Warnings:
> Error :
> ---------------------------------------------------
> 241
> <?xml version="1.0" ?>
> <!DOCTYPE eSearchResult PUBLIC "-//NLM//DTD eSearchResult, 11 May
> 2002//EN" "http://www.ncbi.nlm.nih.gov/entrez/query/DTD/eSearch_020511.dtd">
> <eSearchResult><Count>241</Count><RetMax>241</RetMax><RetStart>0</RetStart><IdList>
> 		<Id>20616305</Id>
> 		<Id>20581223</Id>
> 		<Id>20572313</Id>
> 		<Id>20564721</Id>
> 		<Id>20554763</Id>
> 		<Id>20542744</Id>
> $ cat main.pl
> #!/usr/bin/env perl
> 
> use strict;
> use warnings;
> use Bio::DB::EUtilities;
> 
> my $factory = Bio::DB::EUtilities->new(
>  -eutil => 'esearch',
>  -db => 'pubmed',
>  -email => 'mymail at foo.bar',
>  #-term => 'anoxia[mh] AND neoplasms[mh]',
>  #-term => 'small ubiquitin-related modifier proteins[mh]',
>  -term => 'CLCA1[tiab] OR CACC[tiab] OR CACC1[tiab] OR CLCRG1[tiab]
> OR CaCC-1[tiab] OR FLJ95147[tiab] OR GOB5[tiab] OR hCLCA1[tiab] OR
> hCaCC-1[tiab]',
>  #-term => 'CLCA1[tiab] OR CACC[tiab] OR CACC1[tiab]', #if I shrink
> $term, then the warning is gone.
>  -retmode => 'xml',
>  -retmax => 1000000,
> );
> 
> print $factory->get_retmax,"\n";
> print $factory->get_Response->content;
> 
> 
> -- 
> Regards,
> Peng

The above XML output from that query isn't complete; you left out:

<ErrorList><PhraseNotFound>CLCRG1[tiab]</PhraseNotFound><PhraseNotFound>FLJ95147[tiab]</PhraseNotFound></ErrorList></eSearchResult>

It's possible NCBI has changed the tags of their XML for esearch so the BioPerl parser isn't catching the error for some reason when an error is detected.  I can take a look, but the error is pretty obvious from that output (can't find those phrases).

chris



More information about the Bioperl-l mailing list