Skip to content
Snippets Groups Projects
Commit 4d797659 authored by Graham McVicker's avatar Graham McVicker
Browse files

fixed bug: cdna_end of exons was not being correctly set after frameshift intron creation

parent 834f0b0a
No related branches found
No related tags found
No related merge requests found
......@@ -310,6 +310,7 @@ sub process_cds_delete {
# start next exon after new intron
$exon->start($exon->start() + $first_len + $intron_len);
$exon->cdna_end($exon->cdna_end - $intron_len);
} else {
if($first_len) {
my $first_exon = InterimExon->new();
......@@ -326,6 +327,7 @@ sub process_cds_delete {
# start next exon after new intron
$exon->end($exon->end() - ($first_len + $intron_len));
$exon->cdna_end($exon->cdna_end - $intron_len);
}
}
}
......
......@@ -52,8 +52,8 @@ sub process_insert {
$$cdna_ins_pos_ref < $transcript->cdna_coding_end()) {
info("insertion in cds ($insert_len)");
# print "BEFORE CDS INSERT:\n";
# print_exon($exon);
#print "BEFORE CDS INSERT:\n";
#print_exon($exon, $transcript);
$code |= StatMsg::CDS;
......@@ -84,6 +84,7 @@ sub process_insert {
# which in cdna coords is immediately after last exon
$first_exon->cdna_end($first_exon->cdna_start + $first_len - 1);
$exon->cdna_start($first_exon->cdna_end + 1);
$exon->cdna_end($exon->cdna_end - $frameshift);
# decrease the length of the CDS by the length of new intron
$transcript->move_cdna_coding_end(-$frameshift);
......@@ -109,8 +110,8 @@ sub process_insert {
}
}
# print "AFTER CDS INSERT:\n";
# print_exon($exon);
#print "AFTER CDS INSERT:\n";
#print_exon($exon, $transcript);
}
......@@ -151,23 +152,29 @@ sub process_insert {
return;
}
#sub print_exon {
#my $exon = shift;
#if(!$exon) {
#throw("Exon undefined");
#}
#print "EXON:\n";
#print "cdna_start = ". $exon->cdna_start() . "\n";
#print "cdna_end = ". $exon->cdna_end() . "\n";
#print "start = ". $exon->start() . "\n";
#print "end = ". $exon->end() . "\n";
#print "strand = ". $exon->strand() . "\n\n";
#return;
#}
sub print_exon {
my $exon = shift;
my $tr = shift;
if (!$exon) {
throw("Exon undefined");
}
print STDERR "EXON:\n";
print STDERR " cdna_start = ". $exon->cdna_start() . "\n";
print STDERR " cdna_end = ". $exon->cdna_end() . "\n";
print STDERR " start = ". $exon->start() . "\n";
print STDERR " end = ". $exon->end() . "\n";
print STDERR " strand = ". $exon->strand() . "\n\n";
if($tr) {
print STDERR "TRANSCRIPT:\n";
print STDERR " cdna_coding_start = ". $tr->cdna_coding_start() . "\n";
print STDERR " cdna_coding_end = ". $tr->cdna_coding_end(). "\n";
}
return;
}
1;
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