Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils
ExonExtended
Toolbar
Summary
Bio::EnsEMBL::Analysis:Tools::GeneBuildUtils::ExonExtended;
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
No synopsis!
Description
This module extends a Bio::EnsEMBL::Transcript with smoe other
methods. You have to re-bless your Bio::EnsEMBL::Transcript objects
to use it.
Methods
Methods description
Name : biotype Arg : String Func : getter/setter for the biotype to which this Exon belongs to Returntype : String describing biotype |
Name : cluster Arg : Bio::EnsEMBL::Transcript Func : getter/setter for the Bio::EnsEMBL::Transcript the Exon belongs to Returntype : Bio::EnsEMBL::Transcript |
Name : ev_set Arg : String Func : getter/setter for the evidence-set Returntype : String describing ev_set (defined in GeneBuild/TrancriptCoalescer.pm) |
Example : $self->get_percentage_exon_conversation_in_exon_cluster Arg : none Function : returns the precentage of other Exons in the same cluster which share the same Exon-boundaries. Returntype : float |
Name : is_3prim_exon Arg : none Func : returns 1 if exon is at 3prim end of transcript Returntype : int (0 || 1) |
Name : is_5prim_exon Arg : none Func : returns 1 if exon is at 5prim end of transcript Returntype : int (0 || 1) |
Name : is_terminal_exon Arg : none Func : returns 1 if exon is terminal and 0 othewise Returntype : int (0 || 1) |
Name : next_exon Arg : Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended; Func : points to next exon (3'prim) Returntype : Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended; |
Name : prev_exon Arg : Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended; Func : points to previous exon (5'prim) Returntype : Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended; |
Name : transcript Arg : Bio::EnsEMBL::Transcript Func : getter/setter for the Bio::EnsEMBL::Transcript the Exon belongs to Returntype : Bio::EnsEMBL::Transcript |
Function : marks if exon has been visited in recursion procedure or not Arg : integer (true / false ) Returntype : integer (true || false ) Caller : recursion procedure in Condense_EST.pm |
Methods code
sub biotype
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'type'} = $value;
}
return $self->{'type'}; } |
sub cluster
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'cluster'} = $value;
}
return $self->{'cluster'}; } |
sub ev_set
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'set'} = $value;
}
return $self->{'set'}; } |
sub get_percentage_exon_conversation_in_exon_cluster
{ my ( $self ) = @_ ;
my @ex_clust = @{ $self->cluster->get_all_Exons_in_ExonCluster } ;
my %uniq_exons ;
for (@ex_clust) {
unless ($_->is_terminal_exon) {
$uniq_exons { $_->hashkey }++ ;
}
}
my @tmp = reverse sort (values %uniq_exons ) ;
my $max_cons = -1;
if (scalar(@tmp) > 0) {
$max_cons = shift @tmp ;
}
my $percentage_exon_conservation = 0 ;
if ($max_cons > 0 ) {
if ($uniq_exons{$self->hashkey} ){
$percentage_exon_conservation = $uniq_exons{$self->hashkey} / $max_cons ; }
} else {
$percentage_exon_conservation = 0 ;
}
return $percentage_exon_conservation ; } |
sub is_3prim_exon
{ my ($self) = @_;
return 1 if ($self->prev_exon && !$self->next_exon) ;
return 0 ; } |
sub is_5prim_exon
{ my ($self) = @_;
return 1 if ($self->next_exon && !$self->prev_exon) ;
return 0 ; } |
sub is_terminal_exon
{ my ($self) = @_;
if ($self->next_exon && $self->prev_exon) {
return 0 ;
}
return 1 ; } |
sub new
{ my($class) = shift;
if( ref $class ) {
$class = ref $class;
}
my $self = $class->SUPER::new(@_);
return $self ; } |
sub next_exon
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'next_exon'} = $value;
}
return $self->{'next_exon'}; } |
sub number_exons
{ my ($self) = @_ ;
if (defined($self->transcript)){
return scalar( @{ $self->transcript->get_all_Exons} ) ;
}else {
warning("Exon has no Bio::EnsEMBL::Transript-object attached - can't get number of exons\n" ) ;
}
return undef ; } |
sub prev_exon
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'prev_exon'} = $value;
}
return $self->{'prev_exon'}; } |
sub transcript
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'transcript'} = $value;
}
return $self->{'transcript'}; } |
sub visited
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'visited'} = $value;
}
return $self->{'visited'}; } |
General documentation
Creation by re-blessing:
for my $t ( @transcripts ) {
bless $t,"Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended";
$t->ev_set('est') ;
}
Creation without re-blessing :
my $tran = new Bio::EnsEMBL::Transcript(-EXONS => \@exons);
Creation by re-blessing:
for my $t ( @transcripts ) {
bless $t,"Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::ExonExtended";
$t->ev_set('est') ;
}
Creation without re-blessing :
my $exon= new Bio::EnsEMBL::Exon(
-START => 100 ,
-END => 300,
-STRAND => '-1',
-SLICE => $slice,
-ANALYSIS => $analysis,
);
Name : number_exons
Arg : int
Func : getter/setter number of exons in Transcript
Returntype : int