Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils
TranscriptExtended
Toolbar
Summary
Bio::EnsEMBL::Analysis:Tools::GeneBuildUtils::TranscriptExtended;
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
different_est_support | No description | Code |
ev_set | No description | Code |
exchange_exon | No description | Code |
extend_3prim_end | No description | Code |
extend_5prim_end | No description | Code |
has_3prim_support | No description | Code |
has_5prim_support | No description | Code |
new | No description | Code |
nr_exons_overlapped_by_est | No description | Code |
remove_Exon | No description | Code |
score | No description | Code |
similarity | No description | Code |
Methods description
None available.
Methods code
different_est_support | description | prev | next | Top |
sub different_est_support
{ my ($self,$new_tr) = @_;
my $overlap ;
if ($new_tr) {
for my $key ( keys %{ $self->{different_est_support} } ) {
my $stored_tr = $self->{different_est_support}{$key} ;
if ($stored_tr->seq_region_start <= $new_tr->seq_region_end &&
$new_tr->seq_region_start <= $stored_tr->seq_region_end ) {
my $new_tr_exons = scalar ( @{ $new_tr->get_all_Exons } ) ;
my $stored_tr_exons = scalar(@{$self->{different_est_support}{$stored_tr}->get_all_Exons });
if ($new_tr_exons > $stored_tr_exons ) {
delete $self->{different_est_support}{$stored_tr} ;
if (exists $self->{different_est_support}{$stored_tr}) {
throw(" key wasn't delted\n" ) ;
}else {
warn(" key is deleted\n" ) ;
}
$self->{different_est_support}{$new_tr} = $new_tr ;
}
}else {
${$self->{different_est_support}}{$new_tr}=$new_tr ;
}
}
}
return $self->{different_est_support} ; } |
sub ev_set
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'set'} = $value;
}
return $self->{'set'}; } |
sub exchange_exon
{ my ($self, $old_exon, $new_exon ) = @_ ;
my $biotype = $self->biotype ;
my @exons = @{ $self->get_all_Exons } ;
my $new_tr = Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::TranscriptExtended->new();
for my $e (@exons) {
if ($e eq $old_exon) {
$e = $new_exon ;
}
$new_tr->add_Exon($e) ;
}
$new_tr->biotype($biotype) ;
return $new_tr ; } |
sub extend_3prim_end
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'extend_3prim_end'} = $value;
}
return $self->{'extend_3prim_end'}; } |
sub extend_5prim_end
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'extend_5prim_end'} = $value;
}
return $self->{'extend_5prim_end'}; } |
sub has_3prim_support
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'has_3prim_sup'} = $value;
}
return $self->{'has_3prim_sup'}; } |
sub has_5prim_support
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'has_5prim_sup'} = $value;
}
return $self->{'has_5prim_sup'}; } |
sub new
{ my($class) = shift;
if( ref $class ) {
$class = ref $class;
}
my $self = $class->SUPER::new(@_);
return $self ;
$self->{different_est_support} = {} ; } |
sub nr_exons_overlapped_by_est
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'nr_exons_overlapped_est'}+= $value;
}
return $self->{'nr_exons_overlapped_est'}; } |
sub remove_Exon
{ my ($self,$ex_to_remove ) = @_;
unless ($ex_to_remove){
throw ("you have to supply an Bio::EnsEMBL::Exon object ".
"which will be removed from the transcript\n");
}
my $clone=[] ;
my $ea = $self->{'_trans_exon_array'};
my $nr_before = scalar(@$ea);
for my $e (@$ea) {
if ($e ne $ex_to_remove ) {
push @$clone, $e;
}
}
$self->{'_trans_exon_array'} = $clone;
if ($nr_before == scalar(@$clone) ) {
warning( "No matching exon found, exon could not be removed\n" );
}
return ; } |
sub score
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'score'} = $value;
}
return $self->{'score'}; } |
sub similarity
{ my ($self,$value) = @_;
if (defined($value)) {
$self->{'similarity'} = $value;
}
return $self->{'similarity'};
}
1; } |
General documentation
Creation by re-blessing:
for my $t ( @transcripts ) {
bless $t,"Bio::EnsEMBL::Analysis::Tools::GeneBuildUtils::TranscriptExtended";
$t->ev_set('est') ;
}
Creation without re-blessing :
my $tran = new Bio::EnsEMBL::Transcript(-EXONS => \@exons);