[Bioperl-l] print alignment from blast results file
Brian Osborne
bosborne11 at verizon.net
Wed Nov 16 08:19:33 EST 2011
Nisa,
See:
http://www.bioperl.org/wiki/HOWTO:SearchIO
Brian O.
On Nov 15, 2011, at 7:49 PM, nisa.dar wrote:
>
> 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.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at lists.open-bio.org
> http://lists.open-bio.org/mailman/listinfo/bioperl-l
More information about the Bioperl-l
mailing list