[Bioperl-l] print alignment from blast results file
nisa.dar
nisa.dar10 at gmail.com
Tue Nov 15 19:49:00 EST 2011
Hi,
I am parsing a blast results file. I have found bioperl modules to get query
string, homology string and hit string for each hit/hsp. I want to print
them in the form of an alignment instead of aligning them individually.
this is what I am doing, but it doesn't seem correct
while (my $hsp = $hit->next_hsp) {
my
$start_query_num=$hsp->start('query');
my $query_string=$hsp->query_string;
my $end_query_num=$hsp->end('query');
my $homology_string=$hsp->homology_string;
my $start_hit_num=$hsp->start('hit');
my $hit_string=$hsp->hit_string;
my $end_hit_num=$hsp->end('hit');
my $aln_o = $hsp->get_aln;
$query_string=~s/\n//g;#get rid of new line characters
$homology_string=~s/\n//g;
$hit_string=~s/\n//g;
print "<h3>Alignment:</h3><br />";
print "$start_query_num-$query_string-$end_query_num<br />";
print "
$homology_string<br />";
print "$start_hit_num-$hit_string-$end_hit_num<br /><br />";
}
Please let me know how can I print them in the form of an alignment as seen
in the blast results file.
Thanks
--
View this message in context: http://old.nabble.com/print-alignment-from-blast-results-file-tp32851673p32851673.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l
mailing list