Subject: | bug in Bio::Tools::Run::Alignment::StandAloneFasta |
Date: | Wed, 14 Apr 2010 11:41:34 +0800 |
To: | bug-bioperl-run [...] rt.cpan.org |
From: | Dimitar Kenanov <dimitark [...] bii.a-star.edu.sg> |
Hello guys,
i found some strange behavior of the the module
"Bio::Tools::Run::Alignment::StandAloneFasta" and i was told to report
it as a bug. So here it is.
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 problem 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.
Dimitar
--
Dimitar Kenanov
Postdoctoral research fellow
Protein Sequence Analysis Group
Bioinformatics Institute
A*STAR, Singapore
email: dimitark@bii.a-star.edu.sg
tel: +65 6478 8514