Bio-SearchIO-hmmer
view release on metacpan or search on metacpan
lib/Bio/Search/HSP/HMMERHSP.pm view on Meta::CPAN
this may be greater than either hit or query )
Returns : integer
Args : arg 1: 'query' = length of query seq (without gaps)
'hit' = length of hit seq (without gaps)
'total' = length of alignment (with gaps)
default = 'total'
arg 2: [optional] integer length value to set for specific type
=cut
=head2 percent_identity
Title : percent_identity
Usage : my $percentid = $hsp->percent_identity()
Function: Returns the calculated percent identity for an HSP
Returns : floating point between 0 and 100
Args : none
=cut
=head2 frame
Title : frame
lib/Bio/Tools/Hmmpfam.pm view on Meta::CPAN
);
my $featurepair = Bio::SeqFeature::FeaturePair->new;
$featurepair->feature1 ($feature1);
$featurepair->feature2 ($feature2);
$featurepair->add_tag_value('evalue',$feat->{p_value});
$featurepair->add_tag_value('percent_id','NULL');
$featurepair->add_tag_value("hid",$feat->{primary});
return $featurepair;
}
=head2 seqname
Title : seqname
Usage : obj->seqname($seqname)
Function: Internal(not to be used directly)
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 55 );
is( $hsp->num_identical, 22 );
is( sprintf( "%.2f", $hsp->percent_identity ), 28.21 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), '0.310' );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.286 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.282 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.775 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.714 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.705 );
is( $hsp->query_string,
'LFIGGLDYRTTDENLKAHFEKWGNIVDVVVMKD-----PRTKRSRGFGFITYSHSSMIDEAQK--SRpHKIDGRVVEP',
'Check for query string'
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 56 );
is( $hsp->num_identical, 33 );
is( sprintf( "%.2f", $hsp->percent_identity ), 42.86 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.471 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.429 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.429 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), '0.800' );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.727 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.727);
is( $hsp->query_string,
'LFVGALKDDHDEQSIRDYFQHFGNIVDINIVID-----KETGKKRGFAFVEFDDYDPVDKVVL--KQHQLNGKMVDV',
'Check for query string'
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 133 );
is( $hsp->num_identical, 48 );
is( sprintf( "%.2f", $hsp->percent_identity ), 17.14 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.238 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.172 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.171 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.658 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.477 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.475 );
is (length($hsp->homology_string), length($hsp->query_string));
is( $hsp->hit_string,
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 204 );
is( $hsp->num_identical, 131 );
is( sprintf( "%.2f", $hsp->percent_identity ), 38.87 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.389 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.598 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.389 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.605 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.932 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.605 );
is (length($hsp->homology_string), length($hsp->query_string));
is( $hsp->hit_string,
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 140 );
is( $hsp->num_identical, 50 );
is( sprintf( "%.2f", $hsp->percent_identity ), 27.78 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.291 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.281 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.278 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.814 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.787 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.778 );
is (length($hsp->homology_string), length($hsp->query_string));
is( $hsp->query_string,
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 6 );
is( $hsp->num_identical, 4 );
is( sprintf( "%.2f", $hsp->percent_identity ), 57.14 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.571 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.571 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.571 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.857 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.857 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.857 );
is (length($hsp->homology_string), length($hsp->query_string));
is( $hsp->consensus_string,
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 690 );
is( $hsp->num_identical, 262 );
is( sprintf( "%.2f", $hsp->percent_identity ), 26.12 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.275 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.265 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.261 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.726 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), 0.697 );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.688 );
is (length($hsp->homology_string), length($hsp->query_string));
is( $hsp->consensus_string,
t/SearchIO.t view on Meta::CPAN
($hit->length == 0) ?
is( $hsp->{HIT_LENGTH}, $hsp->hit->length, 'Check hit length consistency' )
: is( $hsp->{HIT_LENGTH}, $hit->length, 'Check hit length consistency' );
($result->query_length == 0) ?
is( $hsp->{QUERY_LENGTH}, $hsp->query->length, 'Check query length consistency' )
: is( $hsp->{QUERY_LENGTH}, $result->query_length, 'Check query length consistency' );
is( $hsp->num_conserved, 151 );
is( $hsp->num_identical, 146 );
is( sprintf( "%.2f", $hsp->percent_identity ), 94.81 );
is( sprintf( "%.3f", $hsp->frac_identical('query') ), 0.948 );
is( sprintf( "%.3f", $hsp->frac_identical('hit') ), 0.967 );
is( sprintf( "%.3f", $hsp->frac_identical('total') ), 0.948 );
is( sprintf( "%.3f", $hsp->frac_conserved('query') ), 0.981 );
is( sprintf( "%.3f", $hsp->frac_conserved('hit') ), '1.000' );
is( sprintf( "%.3f", $hsp->frac_conserved('total') ), 0.981 );
is( $hsp->consensus_string,
'',
'Check for consensus structure string'
( run in 0.377 second using v1.01-cache-2.11-cpan-709fd43a63f )