sub hmmstate_string
{ my ($self,$val) = @_;
if( defined $val ) {
$self->{'_hmmstate_string'} = $val;
}
return $self->{'_hmmstate_string'}; } |
sub new
{ my($class,@args) = @_;
my ($len,$qs,$hs) = Bio::Root::RootI->_rearrange([qw(HSP_LENGTH
QUERY_SEQ
HIT_SEQ)],@args);
if( $len != length($qs) ) {
Bio::Root::RootI->warn("HSP_LENGTH must equal length of query_seq string, using value from QUERY_SEQ\n");
$len = length($qs);
}
my( $homol_seq,$gapct,$identical) = ('',0,0);
for(my $i=0;$i<$len;$i++) {
my $q = substr($qs,$i,1);
my $h = substr($hs,$i,1);
if( $q eq '-' || $h eq '-' ) {
$homol_seq .= ' ';
$gapct ++;
} elsif( $q eq $h ) {
$homol_seq .= '|';
$identical++;
} else {
$homol_seq .= ' ';
}
}
my $self = $class->SUPER::new('-conserved' => $identical,
'-identical' => $identical,
'-gaps' => $gapct,
'-homology_seq' => $homol_seq,
@args);
my ($hmmst) = $self->_rearrange([qw(HMMSTATE_SEQ)],@args);
defined $hmmst && $self->hmmstate_string($hmmst);
$self->add_tag_value('Target' , join(" ","Sequence:".$self->hit->seq_id,
$self->hit->start, $self->hit->end));
return $self; } |
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to
the Bioperl mailing list. Your participation is much appreciated.
bioperl-l@bioperl.org - General discussion
http://bioperl.org/MailList.shtml - About the mailing lists
Report bugs to the Bioperl bug tracking system to help us keep track
of the bugs and their resolution. Bug reports can be submitted via
email or the web:
bioperl-bugs@bioperl.org
http://bugzilla.bioperl.org/
The rest of the documentation details each of the object methods.
Internal methods are usually preceded with a _