diff --git a/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Transcript.pm b/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Transcript.pm index fb7430ad9..e04debcfc 100755 --- a/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Transcript.pm +++ b/modules/Bio/EnsEMBL/VEP/AnnotationSource/Database/Transcript.pm @@ -542,7 +542,7 @@ sub prefetch_gene_ids { { my $xref_obj = $tr->{_gene}->display_xref; $tr->get_Gene()->stable_id($entries[0]->{primary_id}); - $tr->{_gene_symbol} = $xref_obj ? $xref_obj->display_id : $entries[0]->{primary_id}; + $tr->{_gene_symbol} = $xref_obj ? $xref_obj->display_id : $entries[0]->{display_id}; $tr->{_gene_symbol_source} = $entries[0]->{dbname}; $tr->{_gene_symbol_id} = $entries[0]->{primary_id}; $tr->{_gene_hgnc_id} = $entries[0]->{primary_id} if $entries[0]->{dbname} eq 'HGNC'; diff --git a/modules/Bio/EnsEMBL/VEP/AnnotationType/Transcript.pm b/modules/Bio/EnsEMBL/VEP/AnnotationType/Transcript.pm index e8ecc43d8..d843b7d76 100644 --- a/modules/Bio/EnsEMBL/VEP/AnnotationType/Transcript.pm +++ b/modules/Bio/EnsEMBL/VEP/AnnotationType/Transcript.pm @@ -211,14 +211,18 @@ sub filter_transcript { # or 4540 for MT transcripts ( $self->{source_type} eq 'refseq' && - ($t->stable_id || '') !~ /^[A-Z]{2}\_\d+|^\d{4}$/ - ) || + !(($t->stable_id || '') =~ /^[A-Z]{2}\_\d+|^\d{4}$/ || + (defined($t->display_xref) && ($t->display_xref->{display_id} || '') =~ /^[A-Z]{2}\_\d+|^\d{4}$/)) + ) + + || # and the same from the merged cache ( $self->{source_type} eq 'merged' && ($t->{_source_cache} || '') eq 'RefSeq' && - ($t->stable_id || '') !~ /^[A-Z]{2}\_\d+|^\d{4}$/ + !(($t->stable_id || '') =~ /^[A-Z]{2}\_\d+|^\d{4}$/ || + (defined($t->display_xref) && ($t->display_xref->{display_id} || '') =~ /^[A-Z]{2}\_\d+|^\d{4}$/)) ) ) ) {