Skip to content

Commit

Permalink
Merge pull request #331 from aparton/feature/filterchange95
Browse files Browse the repository at this point in the history
Updated xref dumping code
  • Loading branch information
ima23 committed Nov 27, 2018
2 parents 2f676c0 + e570f5c commit cb09ac7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Expand Up @@ -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';
Expand Down
10 changes: 7 additions & 3 deletions modules/Bio/EnsEMBL/VEP/AnnotationType/Transcript.pm
Expand Up @@ -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}$/))
)
)
) {
Expand Down

0 comments on commit cb09ac7

Please sign in to comment.