Skip to content
Snippets Groups Projects
Commit affb3aef authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

Do not assume that canonical_transcript() returns a useful value.

Thanks Bronwen for the heads up.
parent cdacc4ef
No related branches found
No related tags found
No related merge requests found
......@@ -1101,8 +1101,12 @@ sub store {
my $original = $gene;
my $original_transcripts = $gene->get_all_Transcripts();
my $old_canonical_transcript_id =
$gene->canonical_transcript()->dbID();
my $old_canonical_transcript_id;
if ( defined( $gene->canonical_transcript() ) ) {
$old_canonical_transcript_id =
$gene->canonical_transcript()->dbID();
}
my $seq_region_id;
......@@ -1206,6 +1210,7 @@ sub store {
$transcript_adaptor->store( $new, $gene_dbID, $analysis_id );
if ( !defined($new_canonical_transcript_id)
&& defined($old_canonical_transcript_id)
&& defined( $old->dbID() )
&& $old->dbID() == $old_canonical_transcript_id )
{
......
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