Skip to content
Snippets Groups Projects
Commit e82ec5c2 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Add simplistic length() method that does not throw for zero-length introns.

parent f6f51db4
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,27 @@ sub new {
return $self;
} ## end sub new
=head2 length
Args : none
Example : $length = $intron->length();
Description: Returns the length of this intron
Returntype : Integer
Exceptions : none
Caller : general
Status : Stable
=cut
sub length {
my ($self) = @_;
# TODO: Introns on circular slices, see Feature.pm but allow for
# zero-length introns.
return $self->{'end'} - $self->{'start'} + 1;
}
=head2 prev_Exon
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment