BioPerl

 view release on metacpan or  search on metacpan

Bio/Search/Tiling/TilingI.pm  view on Meta::CPAN


#HSPI synonym
sub num_identical { shift->identities( @_ ) }

=head2 conserved

 Title   : conserved
 Alias   : num_conserved
 Usage   : $num_conserved = $tiling->conserved()
 Function: Return the estimated or exact number of conserved sites in the 
           tiling, accounting for overlapping HSPs
 Example : 
 Returns : number of conserved residue pairs
 Args    :

=cut

sub conserved{
    my ($self,@args) = @_;
    $self->throw_not_implemented;
}

#HSPI synonym
sub num_conserved { shift->conserved( @_ ) }

=head2 length

 Title   : length
 Usage   : $max_length = $tiling->length($type)
 Function: Return the total number of residues of the subject or query
           sequence covered by the tiling
 Returns : number of "logical" residues covered
 Args    : scalar $type, one of 'hit', 'subject', 'query'

=cut

sub length{
    my ($self, $type, @args) = @_;
    $self->throw_not_implemented;
}

=head2 frac_identical

 Title   : frac_identical
 Usage   : $tiling->frac_identical($type)
 Function: Return the fraction of sequence length consisting
           of identical pairs
 Returns : scalar float
 Args    : scalar $type, one of 'hit', 'subject', 'query'
 Note    : This method must take account of the $type coordinate
           system and the length reporting method (see STATISTICS
           METHODS above)

=cut

sub frac_identical {
    my ($self, $type, @args) = @_;
    $self->throw_not_implemented;
}

=head2 percent_identity

 Title   : percent_identity
 Usage   : $tiling->percent_identity($type)
 Function: Return the fraction of sequence length consisting
           of identical pairs as a percentage
 Returns : scalar float
 Args    : scalar $type, one of 'hit', 'subject', 'query'

=cut

sub percent_identity {
    my ($self, $type, @args) = @_;
    return $self->frac_identical($type, @args) * 100;
}

=head2 frac_conserved

 Title   : frac_conserved
 Usage   : $tiling->frac_conserved($type)
 Function: Return the fraction of sequence length consisting
           of conserved pairs
 Returns : scalar float
 Args    : scalar $type, one of 'hit', 'subject', 'query'
 Note    : This method must take account of the $type coordinate
           system and the length reporting method (see STATISTICS
           METHODS above)

=cut

sub frac_conserved{
    my ($self, $type, @args) = @_;
    $self->throw_not_implemented;
}

=head2 percent_conserved

 Title   : percent_conserved
 Usage   : $tiling->percent_conserved($type)
 Function: Return the fraction of sequence length consisting
           of conserved pairs as a percentage
 Returns : scalar float
 Args    : scalar $type, one of 'hit', 'subject', 'query'

=cut

sub percent_conserved {
    my ($self, $type, @args) = @_;
    return $self->frac_conserved($type, @args) * 100;
}

=head2 frac_aligned

 Title   : frac_aligned
 Usage   : $tiling->frac_aligned($type)
 Function: Return the fraction of B<input> sequence length consisting
           that was aligned by the algorithm
 Returns : scalar float
 Args    : scalar $type, one of 'hit', 'subject', 'query'
 Note    : This method must take account of the $type coordinate
           system and the length reporting method (see STATISTICS
           METHODS above)

=cut

sub frac_aligned{
    my ($self, $type, @args) = @_;
    $self->throw_not_implemented;
}

# aliases for back compat
sub frac_aligned_query { shift->frac_aligned('query', @_) }
sub frac_aligned_hit { shift->frac_aligned('hit', @_) }

=head2 range

 Title   : range
 Usage   : $tiling->range($type)
 Function: Returns the extent of the longest tiling
           as ($min_coord, $max_coord)
 Returns : array of two scalar integers
 Args    : scalar $type, one of 'hit', 'subject', 'query'

=cut

sub range {
    my ($self, $type, @args) = @_;
    $self->throw_not_implemented;
}

=head1 TILING ITERATORS

=head2 next_tiling

 Title   : next_tiling
 Usage   : @hsps = $self->next_tiling($type);
 Function: Obtain a tiling of HSPs over the $type ('hit', 'subject',
           'query') sequence
 Example :
 Returns : an array of HSPI objects
 Args    : scalar $type: one of 'hit', 'subject', 'query', with
           'subject' an alias for 'hit'

=cut

sub next_tiling{
    my ($self,$type,@args) = @_;



( run in 1.894 second using v1.01-cache-2.11-cpan-39bf76dae61 )