[Bioperl-l] Bio::DB::EUtilities esearch PhraseNotFound error
Scott Cain
scott at scottcain.net
Wed Nov 3 14:59:12 UTC 2010
Hi Gabriel,
It looks to me like you've got a few things going wrong. First, you
are using single quotes for the right hand side of the -term value.
In perl, single quotes are non-interpolating, which means variables
won't be substituted in. However, if you switch to double quotes,
you'll still have a problem, because this:
$genename[SYMB]
looks like you are trying to access an element of an array called
genename with a constant called SYMB, which of course you aren't, so
the perl interpreter will die with that. You can rewrite that section
like this:
$genename . '[SYMB] AND homo_sapiens[ORGN]'
so that the variable interpolation is moved out of the single quotes.
Scott
On Wed, Nov 3, 2010 at 7:53 AM, gabriel teku <gabbyteku at gmail.com> wrote:
> I can't get my esearch to work. It's as follows:
>
> my $eut_obj = Bio::DB::EUtilities->new( -eutil => 'esearch',
> -email => '
> myemail at gmail.com',
> -term =>
> '$genename[SYMB] AND homo_sapiens[ORGN]',
> -db => 'geo',
> -usehistory => 'y'
> );
>
> When I run this using a gene symbol, it works fine.
> But then when I run it as it is with a gene's symbol changed to
> $genename(stores the gene's symbol/name), it fails.
> How can this be fixed?
>
> Thanks
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
>
--
------------------------------------------------------------------------
Scott Cain, Ph. D. scott at scottcain dot net
GMOD Coordinator (http://gmod.org/) 216-392-3087
Ontario Institute for Cancer Research
More information about the Bioperl-l
mailing list