ensembl
InterimExon
Toolbar
Package variables
Privates (from "my" definitions)
@FATAL = (StatMsg::DELETE | StatMsg::CDS | StatMsg::LONG, StatMsg::INSERT | StatMsg::CDS | StatMsg::LONG, StatMsg::DELETE | StatMsg::CDS | StatMsg::MEDIUM | StatMsg::FRAMESHIFT, StatMsg::INSERT | StatMsg::CDS | StatMsg::MEDIUM | StatMsg::FRAMESHIFT, StatMsg::STRAND_FLIP, StatMsg::INVERT, StatMsg::SCAFFOLD_SPAN, StatMsg::CONFUSED)
Included modules
Synopsis
No synopsis!
Description
No description!
Methods
| add_StatMsg | No description | Code |
| cdna_end | No description | Code |
| cdna_start | No description | Code |
| end | No description | Code |
| end_phase | No description | Code |
| fail | No description | Code |
| fix_phase | No description | Code |
| flush_StatMsgs | No description | Code |
| get_all_StatMsgs | No description | Code |
| is_fatal | No description | Code |
| last_StatMsg | No description | Code |
| length | No description | Code |
| new | No description | Code |
| seq_region | No description | Code |
| set_split_phases | No description | Code |
| slice | No description | Code |
| stable_id | No description | Code |
| start | No description | Code |
| start_phase | No description | Code |
| strand | No description | Code |
Methods description
None available.
Methods code
sub add_StatMsg
{ my $self = shift;
my $statMsg = shift;
push @{$self->{'StatMsgs'}}, $statMsg;} |
sub cdna_end
{ my $self = shift;
$self->{'cdna_end'} = shift if(@_);
return $self->{'cdna_end'};} |
sub cdna_start
{ my $self = shift;
$self->{'cdna_start'} = shift if(@_);
return $self->{'cdna_start'};} |
sub end
{ my $self = shift;
$self->{'end'} = shift if(@_);
return $self->{'end'};} |
sub end_phase
{ my $self = shift;
$self->{'end_phase'} = shift if(@_);
return $self->{'end_phase'};} |
sub fail
{ my $self = shift;
if(@_) {
my $fail = shift;
$self->{'fail'} = $fail;
}
return $self->{'fail'};
}
} |
sub fix_phase
{ my $exon = shift;
my $transcript = shift;
return if($exon->fail());
if(!defined($transcript->cdna_coding_start)) {
throw("cdna coding start not defined!");
}
if(!defined($transcript->cdna_coding_end)) {
throw("cdna coding end not defined.");
}
if(!defined($exon->cdna_end())) {
throw("exons cdna coding end not defined.");
}
if(!defined($exon->cdna_start())) {
throw("exons cdna coding start not defined.");
}
if($exon->start_phase() == -1) {
if($transcript->cdna_coding_start() == $exon->cdna_start()) {
$exon->start_phase(0);
}
} else {
if($transcript->cdna_coding_start() > $exon->cdna_start()) {
$exon->start_phase(-1);
}
}
if($exon->end_phase() == -1) {
if($transcript->cdna_coding_end() == $exon->cdna_end()) {
my $cds_len =
$transcript->cdna_coding_end - $transcript->cdna_coding_start + 1;
$exon->end_phase($cds_len % 3);
}
} else {
if($transcript->cdna_coding_end() < $exon->cdna_end) {
$exon->end_phase(-1);
}
}
}
} |
sub flush_StatMsgs
{ my $self = shift;
$self->{'StatMsgs'} = [];} |
sub get_all_StatMsgs
{ my $self = shift;
return $self->{'StatMsgs'};} |
sub is_fatal
{ my $self = shift;
foreach my $msg (@{$self->get_all_StatMsgs}) {
foreach my $code (@FATAL) {
if(($msg->code() & $code) == $code) {
return 1;
}
}
}
return 0;} |
sub last_StatMsg
{ my $self = shift;
my @msgs = @{$self->{'StatMsgs'}};
return undef if(!@msgs);
return $msgs[$#msgs];} |
sub length
{ my $self = shift;
return $self->end() - $self->start() + 1; } |
sub new
{ my $class = shift;
return bless {'StatMsgs' => [],
'fail' => 0}, $class;
}
} |
sub seq_region
{ my $self = shift;
$self->{'seq_region'} = shift if(@_);
return $self->{'seq_region'};} |
sub set_split_phases
{ my $first_exon = shift;
my $second_exon = shift;
my $transcript = shift;
if($first_exon->cdna_end > $transcript->cdna_coding_end()) {
$first_exon->end_phase(-1);
$second_exon->start_phase(-1);
return;
}
if($first_exon->cdna_end() < $transcript->cdna_coding_start()) {
$first_exon->end_phase(-1);
if($second_exon->cdna_start() == $transcript->cdna_coding_start()) {
$second_exon->start_phase(0);
} else {
$second_exon->start_phase(-1);
}
return;
}
my $phase;
if($first_exon->cdna_start() < $transcript->cdna_coding_start()) {
my $coding_len = $first_exon->cdna_end() - $transcript->cdna_coding_start();
$phase = $coding_len % 3;
} else {
my $sphase;
if($first_exon->start_phase() == -1) {
$sphase = 0;
} else {
$sphase = $first_exon->start_phase();
}
$phase = ($first_exon->length() + $sphase) % 3;
}
$first_exon->end_phase($phase);
$second_exon->start_phase($phase);
return;
}
1; } |
sub slice
{ my $self = shift;
$self->{'slice'} = shift if(@_);
return $self->{'slice'};} |
sub stable_id
{ my $self = shift;
$self->{'stable_id'} = shift if(@_);
return $self->{'stable_id'};} |
sub start
{ my $self = shift;
$self->{'start'} = shift if(@_);
return $self->{'start'};} |
sub start_phase
{ my $self = shift;
$self->{'start_phase'} = shift if(@_);
return $self->{'start_phase'};} |
sub strand
{ my $self = shift;
$self->{'strand'} = shift if(@_);
return $self->{'strand'};} |
General documentation
No general documentation available.