[Bioperl-l] seq_inds with the conserved argument prints all residues
Anders Stegmann
anst at kvl.dk
Mon Dec 26 04:19:03 EST 2005
Bioperl,
I am trying to print out the positions of the residues that are conserved between the two proteins I am blasting against each other.
This subrutine prints out all residue positions in the query seq that are conserved and identical?? between the compared seq's:
sub query_seq_alignment_conserved_residues {
my ($hsp_obj) = @_;
my @query_string = split "", $$hsp_obj->query_string;
print "protein conserved positions in query sequence are:","\n";
foreach ($$hsp_obj->seq_inds('query', 'conserved')) {
print $_, "\n";
#push my @conserved, $query_string[$_ -1];
}
}
According to Bio::Search HOWTO, it should only print out i.e. a S->A substitution position.
As the following subrutine works, it should not be the subrutine code that is wrong:
sub query_seq_alignment_nomatch_residues {
my ($hsp_obj) = @_;
my @query_string = split "", $$hsp_obj->query_string;
print "protein mismatch positions i query seq are:","\n";
foreach ($$hsp_obj->seq_inds('query', 'nomatch')) {
print $_, "\n";
#push my @nomatch, $query_string[$_ -1];
}
}
It prints out the one nomatch position I have made in the seq. As you can see, the query_seq_alignment_conserved_residues subrutine is a copy of the query_seq_alignment_nomatch_residues with a few modifications.
What's wrong?
Regards Anders.
More information about the Bioperl-l
mailing list