[Bioperl-l] frac_identical VS percent_identity

Antony03 antony.vincent.1 at ulaval.ca
Thu Mar 6 22:08:27 UTC 2014


Hi,

What is the difference between $hsp->frac_identical and
$hsp->percent_identity?

I have a second question with this code:
#!/usr/bin/perl

use strict;
use Bio::SearchIO;
use Bio::SeqIO;

my $library = 'lib.fas';
my $query = 'query.fas';
my $fh;                   
my $fasta   = "fasta36"; 

my $command = "$fasta $query $library -T 2";
 
open $fh,"$command |" || die("cannot run fasta cmd of $command: $!\n");
 
my $searchio  = Bio::SearchIO->new(-format => 'fasta', -fh => $fh);
while( my $result = $searchio->next_result ) {
  ## $result is a Bio::Search::Result::ResultI compliant object
  while( my $hit = $result->next_hit ) {
    ## $hit is a Bio::Search::Hit::HitI compliant object
    while( my $hsp = $hit->next_hsp ) {
      ## $hsp is a Bio::Search::HSP::HSPI compliant object
      if( $hsp->length('total') > ??? ) {
        if ( $hsp->percent_identity >= 95 ) {
          
print $result->query_name , "\n";
        }

      }

    }  

  }

}
Je veux avoir les résultats pour lesquels l'alignement possède une identité
sur 95% de la longueur totale du query. How do I find the length of the
query string (not the result query string). Is it clear?

Thank!



--
View this message in context: http://bioperl.996286.n3.nabble.com/frac-identical-VS-percent-identity-tp17348.html
Sent from the Bioperl-L mailing list archive at Nabble.com.




More information about the Bioperl-l mailing list