Skip to content
Snippets Groups Projects
Commit 3b9a7d3c authored by Kieron Taylor's avatar Kieron Taylor :angry:
Browse files

Added support for situations where original canonical transcripts have disappeared from the data.

parent e1c423ed
No related branches found
No related tags found
No related merge requests found
......@@ -87,8 +87,10 @@ sub compare {
$blurt !~ /nmd/i #User suppressing this test
) {
$reason_key = 'havana_merge_nmd_over_e_coding';
}
else {
} elsif (! $old->[1] ) {
# The old canonical transcript was not found.
$reason_key = 'new';
} else {
$reason_key = 'other';
}
}
......
......@@ -144,7 +144,13 @@ foreach my $slice (@$slices) {
my $old_canonical = $gene->canonical_transcript;
if ($new_canonical->dbID != $old_canonical->dbID) {
if (! defined($old_canonical)) {
# Original canonical transcript is now absent, or never set.
if ($log_fh) {
print $log_fh "Old=[,,,,,,]\n";
printf $log_fh "New=[%s,%s,%s,%s,%s,%s,'%s']\n", @{ $transcript_selector->encode_transcript($new_canonical) };
}
} elsif ($new_canonical->dbID != $old_canonical->dbID) {
no warnings 'uninitialized';
printf "%s (%s) changed transcript from %s (%s) to %s (%s)\n",
$gene->stable_id,$gene->dbID,$old_canonical->stable_id,$old_canonical->dbID,
......@@ -166,6 +172,7 @@ foreach my $slice (@$slices) {
printf $log_fh "New=[%s,%s,%s,%s,%s,%s,'%s']\n", @{ $transcript_selector->encode_transcript($new_canonical) };
}
}
}
}
......
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