[Bioperl-l] length of hit->description

Antony03 antony.vincent.1 at ulaval.ca
Thu Jul 24 19:04:51 UTC 2014


Here is a part of the code:
#fasta parameters
my $fh;  
my $query = 'MyORF.tfa';
my $library = "$library";                 
my $fasta   = 'fasta35'; 


# The fasta parsing part
my $command = "$fasta -b 1 $query $library";

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') > $length*0.85) {
       if ( $hsp->frac_conserved >= 0.65) {

	
	print $hit->description(500), "\n";
	


				}
           }
		}
	}  
}

The correct result should be :
repB	putative plasmid replication protein RepB

And I get:
repB	putative plasmid replication protein R



--
View this message in context: http://bioperl.996286.n3.nabble.com/length-of-hit-description-tp17596p17600.html
Sent from the Bioperl-L mailing list archive at Nabble.com.


More information about the Bioperl-l mailing list