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

Stop fetch_all_Transcripts returning an empty list when there aren't any...

Stop fetch_all_Transcripts returning an empty list when there aren't any transcripts. The old behaviour was to return undef
parent 5afcc259
No related branches found
No related tags found
No related merge requests found
......@@ -1013,8 +1013,12 @@ sub get_all_Transcripts {
$self->{'_transcript_array'} = $transcripts;
}
}
my @array_copy = @{ $self->{'_transcript_array'} };
return \@array_copy;
my @array_copy;
if (defined $self->{'_transcript_array'}) {
@array_copy = @{ $self->{'_transcript_array'} } ;
return \@array_copy;
}
return;
}
......
......@@ -104,7 +104,7 @@ sub select_canonical_transcript_for_Gene {
@transcripts = @$transcript_array;
} else {
warning('No transcripts attached to gene '.$gene->stable_id);
return undef;
return;
}
my @encoded; # array of encoded transcripts
......
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