Skip to content

Commit

Permalink
Adding link-out to Missense3D-DB.
Browse files Browse the repository at this point in the history
Fixes #83
  • Loading branch information
holtgrewe committed Apr 1, 2021
1 parent 8d3f1e7 commit 4e99226
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions variants/queries.py
Expand Up @@ -224,6 +224,7 @@ def __init__(self, *args, **kwargs):
func.max(Hgnc.sa.pubmed_id).label("pubmed_id"),
func.max(Hgnc.sa.ucsc_id_novers).label("ucsc_id_novers"),
func.max(Hgnc.sa.hgnc_id).label("hgnc_id"),
func.max(Hgnc.sa.uniprot_ids).label("uniprot_ids"),
]
)
.select_from(Hgnc.sa)
Expand All @@ -244,6 +245,7 @@ def extend_fields(self, _query_parts):
func.coalesce(self.subquery_hgnc.c.gene_family, "").label("gene_family"),
func.coalesce(self.subquery_hgnc.c.pubmed_id, "").label("pubmed_id"),
func.coalesce(self.subquery_hgnc.c.hgnc_id, "").label("hgnc_id"),
func.coalesce(self.subquery_hgnc.c.uniprot_ids, "").label("uniprot_ids"),
]


Expand Down
9 changes: 9 additions & 0 deletions variants/templates/variants/filter_result/row.html
Expand Up @@ -331,6 +331,15 @@
Gene @GenCC
</span>
{% endif %}
{% if entry.uniprot_ids %}
<a class="dropdown-item" href="http://missense3d.bc.ic.ac.uk:8080/search_direct?uniprot={{ entry.uniprot_ids }}" target="_blank">
Gene @Missense3D-DB
</a>
{% else %}
<span class="dropdown-item disabled">
Gene @Missense3D-DB
</span>
{% endif %}
{% if hpoterms %}
<a class="dropdown-item" href="https://www.ncbi.nlm.nih.gov/pubmed/?term={{ entry|get_pubmed_linkout:hpoterms }}" target="_blank">
Gene+Phenotypes @PubMed
Expand Down

0 comments on commit 4e99226

Please sign in to comment.