diff --git a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm index b853bdd77b81292529400fdd37c740a46dbac3f7..ef39b4f46f50e5cd6c3be7356b70491f05cfd369 100644 --- a/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/ExonAdaptor.pm @@ -156,11 +156,8 @@ sub fetch_all_by_Transcript { throw("Transcript must have attached slice to retrieve exons."); } - if($transcript->start < 1 || $transcript->end > $tslice->length()) { - $slice = $self->db->get_SliceAdaptor->fetch_by_Feature($transcript); - } else { - $slice = $tslice; - } + # use a small slice the same size as the transcript + $slice = $self->db->get_SliceAdaptor->fetch_by_Feature($transcript); # override the tables definition to provide an additional join to # the exon_transcript table. For efficiency we cannot afford to have @@ -182,7 +179,7 @@ sub fetch_all_by_Transcript { $self->{'final_clause'} = undef; # remap exon coordinates if necessary - if($slice != $tslice) { + if($slice->name() ne $tslice->name()) { my @out; foreach my $ex (@$exons) { push @out, $ex->transfer($tslice);