The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

GenOO::Spliceable - Role for a region that can be spliced

SYNOPSIS

    # This role provides regions with the splicing attributes and methods
    

DESCRIPTION

    An object that consumes this role gets splicing attributes and methods such as exons and
    introns. The key attributes of this class are "splice_starts" and "splice_stops"
    which are sorted arrays of coordinates that define the intervals for exons.
    
    -------------EXON_1-----------            ------------EXON_2------------
    SPLICE_START_1...SPLICE_STOP_1...INTRON...SPLICE_START_2...SPLICE_STOP_2...INTRON...

EXAMPLES

    # Get the location information on the reference sequence
    $obj_with_role->exons;
    $obj_with_role->introns;
    
    # Check if a position is within an exon or an intron
    $obj_with_role->is_position_within_exon(120);    # 1/0
    $obj_with_role->is_position_within_intron(120);  # 0/1
    
    # Get the length of the exonic region
    $obj_with_role->exonic_length;