[Bioperl-l] Sort blast file result according to evalues

Chris Fields cjfields at uiuc.edu
Fri Oct 6 14:58:09 UTC 2006

The evalue for the hit is retrieved by the BlastHit::signifiance()  
method, if I remember correctly.  So if $hit is a  
Bio::Search::Hit::BlastHit object, you use $hit->significance.  If  
you want individual HSP evalues, you would use $hsp->evalue for the  
individual HSP objects.

The output is normally sorted by the order they appear in the  
alignments and table, which is typically by increasing evalue or  
decreasing bits (score).  So they are already sorted.  If you wanted  
to run a sort yourself you could use a sort block using '{$a- 
 >significance() <=> $b->significance()} @hits', but as pointed out  
on the wiki it may be safer to run a Schwartzian transform instead:



On Oct 6, 2006, at 8:22 AM, deepak shingan wrote:

> Hi ,
>   Is  there any way to parse the blast file according to evalue for  
> each hit. I want the output sorted according to hit evalue. I am  
> using SearchIO algorithm and already tried sorting the hits  
> according to bits, gaps, but I am not able to sort the hits by evalue.
>   As evalues are mainly associated with hsp and each hit may have  
> multiple hsps.
>   waiting for help.
>   Thanks,
>   Dun Dansi
> ---------------------------------
> How low will we go? Check out Yahoo! Messenger’s low  PC-to-Phone  
> call rates.
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l

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

More information about the Bioperl-l mailing list