[Bioperl-l] strange behavior of Bio::Tools::Run::Alignment::StandAloneFasta

Dimitar Kenanov dimitark at bii.a-star.edu.sg
Tue Apr 13 23:02:20 EDT 2010


Hello guys,
i found some strange behavior of the the module 
"Bio::Tools::Run::Alignment::StandAloneFasta". I am trying to run 
"ssearch36" or "fasta36" locally and parse the report. I want to get the 
hits name, e-values, and sequences out of the report and print them to 
another file which i can process further.

Below is the code where - $fh_dbs=file with a list of fasta libraries; 
$line=my current fasta library; $seq=my query.

my @arg=(
     'E' => '0.01',
     'd' => '0', #problem here
     'H' => '',
     'w' => '100',
     'O' => "$output",
     'program' => 'ssearch36',
     );

my $line;
while($line=<$fh_dbs>){
     chomp($line);
     print "DB:$line:\n";


     my $factory=Bio::Tools::Run::Alignment::StandAloneFasta->new(@arg);
     $factory->library($line);
     my @fastreport=$factory->run($seq);

     foreach  (@fastreport) {
     print "Parsed fasta report:\n";
     my $result = $_->next_result;

         while( my $hit = $result->next_hit()) {
             print "\thit name: ", $hit->name();
             while( my $hsp = $hit->next_hsp()) {
                 my $e_val=$hsp->evalue;
                 my $qseq=$hsp->query_string;
                 my $hseq=$hsp->hit_string;
                 print "E:$e_val:\n",
                 print "Q-SEQ:$qseq:\n";
                 print "HIT-SEQ:$hseq:\n";


             }
         }
     }
}

Now the weird thing is that if i mark the line 'd' => '0' then i can get 
the HIT and QUERY sequences but not the E-value and if its unmarked as i 
want it then i can get the E-value but not the sequences.
Its strange and i dont know how to solve that problem.
If someone has any idea how i can go around that i would be very thankful.


Thanks
Dimitar

PS: Another problem i found is the "q" option. Even if i pass it through 
the @arg, its not working. I still see the output on my terminal.

-- 
Dimitar Kenanov
Postdoctoral research fellow
Protein Sequence Analysis Group
Bioinformatics Institute
A*STAR, Singapore
email: dimitark at bii.a-star.edu.sg
tel: +65 6478 8514



More information about the Bioperl-l mailing list