[Bioperl-l] Blast returns result, but does not return hits

Chris Fields cjfields at uiuc.edu
Thu Feb 23 21:11:38 UTC 2006


I think you want $hit->expect (for hits) or $hsp->evalue (for HSPs).
$hit->significance (for NCBI blast) gives the values from the descriptions
(the score and expect) for each hit.

If you want to see what methods are available for any given object (in this
case Bio::Search::Hit::BlastHit ot Bio::Search::HSP::BlastHSP), use the
below script from the bioperl FAQ (use PPM to install Class::Inspector
first) and pass the object module name on the command line.  Be careful as
many of these are get/sets (so don't pass any args).
----------------------------------
#!perl
use Class::Inspector;
$class = shift || die "Usage: methods perl_class_name\n";
eval "require $class";
print join ("\n", sort @{Class::Inspector-methods($class,'full','public')}),
"\n";
----------------------------------
You should get something like this:

C:\Perl\Scripts>methods.pl Bio::Search::Hit::BlastHit
Bio::Root::Root::DESTROY
Bio::Root::Root::confess
Bio::Root::Root::debug
Bio::Root::Root::throw
Bio::Root::Root::verbose
Bio::Root::RootI::carp
Bio::Root::RootI::deprecated
Bio::Root::RootI::stack_trace
Bio::Root::RootI::stack_trace_dump
Bio::Root::RootI::throw_not_implemented
Bio::Root::RootI::warn
Bio::Root::RootI::warn_not_implemented
Bio::Search::Hit::BlastHit::expect
Bio::Search::Hit::BlastHit::found_again
Bio::Search::Hit::BlastHit::iteration
Bio::Search::Hit::BlastHit::new
Bio::Search::Hit::GenericHit::accession
Bio::Search::Hit::GenericHit::add_hsp
Bio::Search::Hit::GenericHit::algorithm
Bio::Search::Hit::GenericHit::ambiguous_aln
Bio::Search::Hit::GenericHit::bits
Bio::Search::Hit::GenericHit::description
Bio::Search::Hit::GenericHit::each_accession_number
Bio::Search::Hit::GenericHit::end
Bio::Search::Hit::GenericHit::frac_aligned_hit
Bio::Search::Hit::GenericHit::frac_aligned_query
Bio::Search::Hit::GenericHit::frac_conserved
Bio::Search::Hit::GenericHit::frac_identical
Bio::Search::Hit::GenericHit::frame
Bio::Search::Hit::GenericHit::gaps
Bio::Search::Hit::GenericHit::hsp
Bio::Search::Hit::GenericHit::hsps
Bio::Search::Hit::GenericHit::length
Bio::Search::Hit::GenericHit::length_aln
Bio::Search::Hit::GenericHit::locus
Bio::Search::Hit::GenericHit::logical_length
Bio::Search::Hit::GenericHit::matches
Bio::Search::Hit::GenericHit::n
Bio::Search::Hit::GenericHit::name
Bio::Search::Hit::GenericHit::next_hsp
Bio::Search::Hit::GenericHit::num_hsps
Bio::Search::Hit::GenericHit::num_unaligned_hit
Bio::Search::Hit::GenericHit::num_unaligned_query
Bio::Search::Hit::GenericHit::num_unaligned_sbjct
Bio::Search::Hit::GenericHit::overlap
Bio::Search::Hit::GenericHit::p
Bio::Search::Hit::GenericHit::query_length
Bio::Search::Hit::GenericHit::range
Bio::Search::Hit::GenericHit::rank
Bio::Search::Hit::GenericHit::raw_score
Bio::Search::Hit::GenericHit::rewind
Bio::Search::Hit::GenericHit::score
Bio::Search::Hit::GenericHit::seq_inds
Bio::Search::Hit::GenericHit::significance
Bio::Search::Hit::GenericHit::start
Bio::Search::Hit::GenericHit::strand
Bio::Search::Hit::GenericHit::tiled_hsps
Bio::Search::Hit::HitI::hit_description
Bio::Search::Hit::HitI::hit_length

Nice, huh?

Christopher Fields
Postdoctoral Researcher - Switzer Lab
Dept. of Biochemistry
University of Illinois Urbana-Champaign 

> -----Original Message-----
> From: Raghunath Verabelli [mailto:iamvela at yahoo.com]
> Sent: Thursday, February 23, 2006 1:34 PM
> To: Chris Fields; 'Jason Stajich'
> Cc: bioperl-l at lists.open-bio.org
> Subject: RE: [Bioperl-l] Blast returns result, but does not return hits
> 
> Chris, you are right. I am using NCBI BLAST.
> 
> Here is my http query:
> 
> my $urltext =
> "http://www.ncbi.nlm.nih.gov/blast/Blast.cgi?CMD=Put&QUERY=$seq&DATABASE=n
> r&PROGRAM=blastp";
> 
> This is my code for populating p-value:
> 
> my $pValue = $bioPerlHit->significance;
> 
> 
> I looked at the text output, could not find any p
> value column, the only 'value' column in the output is
> 'E value'. I will try that.
> 
> Thanks,
> Raghu
> 
> --- Chris Fields <cjfields at uiuc.edu> wrote:
> 
> > I think Raghu's running NCBI BLAST, though.  Am I
> > right?
> >
> > Christopher Fields
> > Postdoctoral Researcher - Switzer Lab
> > Dept. of Biochemistry
> > University of Illinois Urbana-Champaign
> >
> >
> > > -----Original Message-----
> > > From: Jason Stajich
> > [mailto:jason.stajich at duke.edu]
> > > Sent: Thursday, February 23, 2006 12:30 PM
> > > To: Chris Fields
> > > Cc: 'Raghunath Verabelli';
> > bioperl-l at lists.open-bio.org
> > > Subject: Re: [Bioperl-l] Blast returns result, but
> > does not return hits
> > >
> > > p-values do show up in WU-BLAST reports so that is
> > why we have a p-
> > > value function.
> > >
> > >
> > > On Feb 23, 2006, at 1:06 PM, Chris Fields wrote:
> > >
> > > > Hold up a second.  Do you mean e-value, or
> > p-value?  A run-of-the-
> > > > mill NCBI
> > > > blast report these days gives e-values
> > (expectation value), NOT p-
> > > > values.  I
> > > > think they changed over to using only e-values
> > with BLAST v2.  Make
> > > > sure you
> > > > didn't mix these up; look out the text output to
> > make sure that P
> > > > values are
> > > > present.  That would explain why you're getting
> > 0, since they don't
> > > > exist.
> > > >
> > > >> From the BLAST tutorial:
> > > >
> > > > The BLAST programs report E-value rather than
> > P-values because it
> > > > is easier
> > > > to understand the difference between, for
> > example, E-value of 5 and
> > > > 10 than
> > > > P-values of 0.993 and 0.99995. However, when E <
> > 0.01, P-values and
> > > > E-value
> > > > are nearly identical.
> > > >
> > > > Christopher Fields
> > > > Postdoctoral Researcher - Switzer Lab
> > > > Dept. of Biochemistry
> > > > University of Illinois Urbana-Champaign
> > > >
> > > >
> > > >> -----Original Message-----
> > > >> From: bioperl-l-bounces at lists.open-bio.org
> > [mailto:bioperl-l-
> > > >> bounces at lists.open-bio.org] On Behalf Of Chris
> > Fields
> > > >> Sent: Thursday, February 23, 2006 11:41 AM
> > > >> To: 'Raghunath Verabelli';
> > bioperl-l at lists.open-bio.org
> > > >> Subject: Re: [Bioperl-l] Blast returns result,
> > but does not return
> > > >> hits
> > > >>
> > > >> Yes that's a potential issue.  I'll try to
> > replicate that here;
> > > >> please
> > > >> send
> > > >> a code example so I can see how you're calling
> > for the p-value.
> > > >>
> > > >> Christopher Fields
> > > >> Postdoctoral Researcher - Switzer Lab
> > > >> Dept. of Biochemistry
> > > >> University of Illinois Urbana-Champaign
> > > >>
> > > >>> -----Original Message-----
> > > >>> From: bioperl-l-bounces at lists.open-bio.org
> > [mailto:bioperl-l-
> > > >>> bounces at lists.open-bio.org] On Behalf Of
> > Raghunath Verabelli
> > > >>> Sent: Thursday, February 23, 2006 10:24 AM
> > > >>> To: Chris Fields; bioperl-l at lists.open-bio.org
> > > >>> Subject: Re: [Bioperl-l] Blast returns result,
> > but does not
> > > >>> return hits
> > > >>>
> > > >>> Thanks Chris for all your help.
> > > >>>
> > > >>> The patch for blast.pm worked. I was able to
> > parse the
> > > >>> hits from the raw file. I uninstalled previous
> > > >>> versions of bioperl using ppm and then I
> > installed
> > > >>> bioperl 1.4.x using nmake, and applied your
> > fix. I am
> > > >>> getting hits the way I wanted.
> > > >>>
> > > >>> However, I noticed that the p-value for each
> > hit
> > > >>> doesn't seem to be parsed
> > > >>> correctly. It sets it to 0 for all hits. Not
> > sure if
> > > >>> this is a known issue. Any
> > suggestions/comments,
> > > >>> please let me know.
> > > >>>
> > > >>> Thanks,
> > > >>> Raghu
> > > >>>
> > > >>> --- Chris Fields <cjfields at uiuc.edu> wrote:
> > > >>>
> > > >>>>> -----Original Message-----
> > > >>>>> From: bioperl-l-bounces at lists.open-bio.org
> > > >>>> [mailto:bioperl-l-
> > > >>>>> bounces at lists.open-bio.org] On Behalf Of
> > Raghunath
> > > >>>> Verabelli
> > > >>>>> Sent: Wednesday, February 22, 2006 8:25 PM
> > > >>>>> To: Chris Fields;
> > bioperl-l at lists.open-bio.org
> > > >>>>> Subject: Re: [Bioperl-l] Blast returns
> > result, but
> > > >>>> does not return hits
> > > >>>>>
> > > >>>>>
> > > >>>>> Thanks very much Chris for your time.
> > > >>>>> Please see below output that you requested
> > (the
> > > >>>> only
> > > >>>>> difference i saw between your output and
> > mine is
> > > >>>> @INC
> > > >>>>> value. I have only 2 directories
> > c:\mod_perl\perl
> > > >>>>> where i installed activeperl. I see two
> > additional
> > > >>>>> directories in your @INC path).
> > > >>>>>
> > > >>>>>>
> > > >>>>>> When you type 'perl -V' what do you see
> > (make
> > > >>>> sure
> > > >>>>>> it is a capital 'V', not
> > > >>>>>> lower case).
> > > >>>>>
> > > >>>>> C:\Documents and Settings\Administrator>perl
> >  -V
> > > >>>>> Summary of my perl5 (revision 5 version 8
> > > >>>> subversion
> > > >>>>> 7) configuration:
> > > >>>>>   Platform:
> > > >>>>>     osname=MSWin32, osvers=5.0,
> > > >>>>> archname=MSWin32-x86-multi-thread
> > > >>>>
> > > >>>> [....]
> > > >>>>
> > > >>>>> if.pm
> > > >>>>>   Built under MSWin32
> > > >>>>>   Compiled at Nov  2 2005 08:44:52
> > > >>>>>   %ENV:
> > > >>>>>     PERL5LIB="c:\bioperl-live"
> > > >>>>>   @INC:
> > > >>>>>     c:\bioperl-live
> > > >>>>>     C:/mod_perl/Perl/lib
> > > >>>>>     C:/mod_perl/Perl/site/lib
> > > >>>>>     .
> > > >>>>
> > > >>>> Personally I wouldn't place the the
> > bioperl-live
> > > >>>> folder in the root
> > > >>>> directory; this shouldn't make a difference,
> > but you
> > > >>>> can try moving it to
> > > >>>> the perl directory in a separate folder to
> > see if
> > > >>>> that helps.  Can't see why
> > > >>>> it would make a difference, but it is
> > Windows...
> > > >>>> Main reason I'll switching
> > > >>>> over to Mac OS X!
> > > >>>>
> > > >>>> Make sure that the Bio directory is in the
> > > >>>> bioperl-live directory,
> > > >>>> regardless (i.e. if PERL5LIB is set to
> > > >>>> C:\mod_perl\Perl\bioperl\bioperl-live, then
> > there
> > > >>>> should be a directory like
> > > >>>> C:\Perl\bioperl\bioperl-live\Bio).  Otherwise
> > it
> > > >>>> won't work.
> > > >>>>
> >
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com




More information about the Bioperl-l mailing list