[Bioperl-l] Bioperl Entrez Esearch

Smithies, Russell Russell.Smithies at agresearch.co.nz
Tue Jul 21 20:34:31 UTC 2009

Someone mentioned using try-catch a while ago for catching errors,  it might work in this case:

#!perl -w
use Error qw(:try);

try {
   $seqio = Bio::SeqIO->new(-file='my.fas');
catch Error with {
   my $e = shift;
   # $e->test will contain the message

Or you could redirect STDERR to a file:

         open(STDERR, ">", "$logfile") or die "Failed to re-direct STDERR to '$logfile': $!";

Or you could try using the "no warnings" pragma

Hopefully, one of these will work  :)


From: Rajasekar Karthik [mailto:karthik085 at gmail.com]
Sent: Wednesday, 22 July 2009 3:07 a.m.
To: Smithies, Russell
Cc: bioperl-l at lists.open-bio.org
Subject: Re: [Bioperl-l] Bioperl Entrez Esearch

Russell / Others,
The utilities keep printing out warnings and errors. Is there any way to
a) either not print at all
b) or send them to some other log file other than apache's error.log

On Wed, Jul 15, 2009 at 5:34 PM, Rajasekar Karthik <karthik085 at gmail.com<mailto:karthik085 at gmail.com>> wrote:
that helps - thanks!!!

On Tue, Jul 14, 2009 at 6:33 PM, Smithies, Russell <Russell.Smithies at agresearch.co.nz<mailto:Russell.Smithies at agresearch.co.nz>> wrote:
You sure can.
Take a look at http://www.bioperl.org/wiki/HOWTO:EUtilities_Cookbook


> -----Original Message-----
> From: bioperl-l-bounces at lists.open-bio.org<mailto:bioperl-l-bounces at lists.open-bio.org> [mailto:bioperl-l-<mailto:bioperl-l->
> bounces at lists.open-bio.org<mailto:bounces at lists.open-bio.org>] On Behalf Of Rajasekar Karthik
> Sent: Wednesday, 15 July 2009 10:23 a.m.
> To: bioperl-l at lists.open-bio.org<mailto:bioperl-l at lists.open-bio.org>
> Subject: [Bioperl-l] Bioperl Entrez Esearch
> Hi,
> I an new to Bioperl. How can I do an Entrez Esearch using Bioperl?
> For example, I want to do an exact title search in pubmed
> Title: Guidelines for quantitative rt-PCR
> Using HTTP Get, I would do something like this
> URL:
> http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&field=titl&te
> rm=Guidelines%20for%20quantitative%20rt-PCR
> to get the response XML.
> How can I use Bioperl to do the above action?
> Thanks.
> --
> Best Regards,
> Rajasekar Karthik
> karthik085 at gmail.com<mailto:karthik085 at gmail.com>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org<mailto:Bioperl-l at lists.open-bio.org>
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.

Best Regards,
Rajasekar Karthik
karthik085 at gmail.com<mailto:karthik085 at gmail.com>

Best Regards,
Rajasekar Karthik
karthik085 at gmail.com<mailto:karthik085 at gmail.com>

More information about the Bioperl-l mailing list