Skip to content

Commit

Permalink
The tmRNA website is down, so we are not showing any links in the Ann…
Browse files Browse the repository at this point in the history
…otations table
  • Loading branch information
carlosribas committed Mar 14, 2024
1 parent ee90d88 commit 7a1e6ff
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions rnacentral/portal/models/xref.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _fetch_all(self):
refseq_mirna_precursors = self.get_refseq_mirna_precursor(taxid)
refseq_splice_variants = self.get_refseq_splice_variants(taxid)
ensembl_splice_variants = self.get_ensembl_splice_variants(taxid)
tmrna_mates = self.get_tmrna_mate(taxid)
# tmrna_mates = self.get_tmrna_mate(taxid)

# "annotate" xrefs queryset with additional attributes, retrieved by raw SQL queries
for xref in self:
Expand Down Expand Up @@ -119,10 +119,10 @@ def _fetch_all(self):
splice_variant.upi.upi
for splice_variant in ensembl_splice_variants[xref.id]
]
if xref.id in tmrna_mates:
xref.tmrna_mates = [
tmrna_mate.upi.upi for tmrna_mate in tmrna_mates[xref.id]
]
# if xref.id in tmrna_mates:
# xref.tmrna_mates = [
# tmrna_mate.upi.upi for tmrna_mate in tmrna_mates[xref.id]
# ]

def _xrefs_raw_queryset_to_dict(self, raw_queryset):
"""
Expand Down Expand Up @@ -380,6 +380,8 @@ def get_ensembl_splice_variants(self, taxid=None):
return self._xrefs_raw_queryset_to_dict(raw_queryset)

def get_tmrna_mate(self, taxid=None):
# This query is taking too long to run, and it is not being used
# at the moment, as the tmRNA website is down
taxid_filter = "AND xref.taxid = %s" % taxid if taxid else ""

# _fetch_all() has already been called by now
Expand Down

0 comments on commit 7a1e6ff

Please sign in to comment.