[Bioperl-l] EUtilities pubmed search with [Mesh Terms]
Chris Fields
cjfields at illinois.edu
Tue Jun 29 23:15:15 UTC 2010
Use uppercase with bools:
'anoxia[mh] AND neoplasms[mh]'
This gives me 2124 hits. Note the URL you provided does that as well
...db=pubmed&term=anoxia[mh]+AND+neoplasms[mh]
chris
On Jun 29, 2010, at 5:41 PM, Peng Yu wrote:
> Hi,
>
> http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=anoxia[mh]+AND+neoplasms[mh]
>
> The above search returns 2124 entries. I try to use the following
> bioperl code to do the search. I got an error (see below). Could
> anybody let me know how I should modify the bioperl search code to get
> the same results?
>
> #!/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]',
> -retmode => 'xml',
> -retmax => 1000000,
> );
>
> print $factory->get_retmax,"\n";
> print $factory->get_Response->content;
>
> ############################
>
> $ ./main.pl
>
> --------------------- WARNING ---------------------
> MSG: NCBI esearch Errors/Warnings:
> Error : PhraseNotFound [+and+neoplasms[mh]]Warnings : OutputMessage
> [No items found.]
> ---------------------------------------------------
> 0
> <?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>0</Count><RetMax>0</RetMax><RetStart>0</RetStart><IdList>
> </IdList><TranslationSet><Translation> <From>anoxia[mh]</From>
> <To>"anoxia"[MeSH Terms]</To>
> </Translation></TranslationSet><QueryTranslation/><ErrorList><PhraseNotFound>+and+neoplasms[mh]</PhraseNotFound></ErrorList><WarningList><OutputMessage>No
> items found.</OutputMessage></WarningList></eSearchResult>
>
> --
> Regards,
> Peng
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list