-
Notifications
You must be signed in to change notification settings - Fork 2
/
medical-view.html
141 lines (138 loc) · 6.42 KB
/
medical-view.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<link rel="import" href="protein-overview.html">
<link rel="import" href="isoform-selector.html">
<link rel="import" href="triple-viewer.html">
<link rel="import" href="generic-annotation-section.html">
<link rel="import" href="keywords-section.html">
<link rel="import" href="xrefs-section.html">
<link rel="import" href="nextprot-elements-shared-styles.html">
<!--
`medical-view`
View listing medical annotations.
#### Example
<medical-view nx-config='{"entry": "P52701"}'></medical-view>
@demo demo/medical-view-demo.html
-->
<dom-module id="medical-view">
<template>
<style include="nextprot-elements-shared-styles">
:host {
display: block;
background:#f8f8f8;
overflow-y: auto;
}
</style>
<div class="row">
<div id="nxOverview" class="col-md-12">
<protein-overview nx-config="[[nxConfig]]" nx-entry-data="[[nxEntryData]]" lazy-loading="[[lazyLoading]]"></protein-overview>
</div>
</div>
<div id="noDataWarning" class='alert alert-warning noData' hidden>There is no medical information available in neXtProt for [[nxConfig.entry]].
Suggestions for updates are welcome! Please <a href='mailto:[email protected]'>contact us</a>.
</div>
<div id="nxPositionalAnnotations" class="row nxSection">
<isoform-selector nx-config="{{nxConfig}}" iso-name={{isoName}} nx-entry-data="[[nxEntryData]]"
lazy-loading="[[lazyLoading]]"
feature-viewer-ready="{{featureViewerReady}}">
</isoform-selector>
<triple-viewer nx-config="{{nxConfig}}" iso-name=[[isoName]] gold-only="[[nxConfig.goldOnly]]" feature-list='[
{
"APIRef": "sequence",
"metadata": {"name": "Sequence"}
},
{
"APIRef": "variant-medical",
"metadata": {
"name": "Variant",
"className": "variant",
"color": "rgba(0,255,154,0.3)",
"type": "unique",
"filter": "Variant"
}
},
{
"APIRef": "isoform-mapping",
"metadata": {}
}
]' count="{{positionalAnnotationsCount}}" hide-sequence-viewer nx-entry-data="[[nxEntryData]]"
lazy-loading="[[lazyLoading]]"
feature-viewer-ready="{{featureViewerReady}}">
</triple-viewer>
</div>
<div class="row">
<div id="nxAnnotations" class="col-md-12">
<generic-annotation-section id="annotationElement" section="medical" gold-only="[[nxConfig.goldOnly]]"
categories='["DISEASE", "VARIANT-INFO", "PHARMACEUTICAL", "SMALL-MOLECULE-INTERACTION", "ALLERGEN", "MISCELLANEOUS"]'
category-titles='{"VARIANT_INFO": "POLYMORPHISM", "SMALL_MOLECULE_INTERACTION": "PROTEIN-DRUG INTERACTION", "MISCELLANEOUS": "NOTE"}'
count="{{annotationsCount}}" nx-config="[[nxConfig]]">
</generic-annotation-section>
</div>
</div>
<div class="row">
<div id="nxKeywords" class="col-md-12">
<keywords-section categories='["Disease", "Technical term"]'
category-accessions='{"Technical term": ["KW-0582"]}'
nx-config="[[nxConfig]]" count="{{keywordsCount}}"
nx-entry-data="[[nxEntryData]]" lazy-loading="[[lazyLoading]]">
</keywords-section>
</div>
</div>
<div class="row">
<div id="nxXrefs" class="col-md-12">
<xrefs-section categories='["DrugCentral", "GeneReviews", "CTD", "MIM", "PharmGKB", "Allergome", "DMDM", "BioMuta", "MalaCards", "DisGeNET", "NIAGADS", "OpenTargets", "DECIPHER"]'
nx-config="[[nxConfig]]" view="medical" count="{{xrefsCount}}">
</xrefs-section>
</div>
</div>
<div id="disclaimer" class='alert alert-warning noData'>
Any medical or genetic information present in this entry is provided for research, educational and informational purposes only. It is not in any way intended to be used as a substitute for professional medical advice, diagnosis, treatment or care.
</div>
</template>
<script>
Polymer({
is: 'medical-view',
properties: {
nxConfig: {
type: Object,
value: {}
},
annotationsCount: {
type: Number,
value: -1,
observer: "_checkAnnotations"
},
positionalAnnotationsCount: {
type: Number,
value: -1,
observer: "_checkAnnotations"
},
keywordsCount: {
type: Number,
observer: "_checkKeywords"
},
xrefsCount: {
type: Number,
observer: "_checkXrefs"
},
featureViewerReady: {
type: Boolean,
value: false,
notify: true
}
},
_checkAnnotations: function(){
if(!this.annotationsCount) this.$.nxAnnotations.hidden=true;
else this.$.nxAnnotations.hidden=false;
if(!this.positionalAnnotationsCount) this.$.nxPositionalAnnotations.hidden=true;
else this.$.nxPositionalAnnotations.hidden=false;
if(this.annotationsCount===0 && this.positionalAnnotationsCount===0) { this.$.noDataWarning.hidden=false; this.$.disclaimer.hidden=true; }
else { this.$.noDataWarning.hidden=true; this.$.disclaimer.hidden=false; }
},
_checkKeywords: function(){
this.keywordsCount===0 ? this.$.nxKeywords.hidden=true : this.$.nxKeywords.hidden=false;
},
_checkXrefs: function(){
this.xrefsCount===0 ? this.$.nxXrefs.hidden=true : this.$.nxXrefs.hidden=false;
}
});
</script>
</dom-module>