[Bioperl-l] Problem When searching PubMed

analia at deb.uminho.pt analia at deb.uminho.pt
Wed Dec 17 14:44:00 UTC 2008


> Hi all,
>
> I am using your BioPerl eutils search modules. Probably it is my 
> fault, but when I try to run a query for which PubMed returns a large 
> number of documents, the get_count never meets the overall figures! 
> When retrieving the results, the program fails eventually.
>
> Any idea of what I am doing wrong? I am sending to examples...
>
> Cheers,
> Anália
>
> Here are two examples:
>
>
> my $biblio = new Bio::Biblio (-access => 'eutils');
> print $biblio->find ("Escherichia coli")->get_count . "\n";
>
>
> Output : 100000 whereas PubMed says 258953!
>
> my %docs=();
> my $biblio = new Bio::Biblio (-access => 'eutils');
> my $collection = $biblio = $biblio->find("Escherichia coli");
>
> while ( $collection->has_next) {
>      my $reader = Bio::Biblio::IO->new ('-data' => 
> $collection->get_next ,
>                                    '-format' => 'medlinexml');
>      if(my $citation = $reader->next_bibref()){
>              $docs{$citation->{'_pmid'}}{title}=$citation->{'_title'};
>        $docs{$citation->{'_pmid'}}{type}=$citation->{'_type'};
>        $docs{$citation->{'_pmid'}}{date}=$citation->{'_date'}||"null";
>    }
> }
> print scalar(keys %docs);
>
> Output: never get output, crashes the perl interpreter!!!



More information about the Bioperl-l mailing list