scout-browser 4.92__py3-none-any.whl → 4.94__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- scout/adapter/mongo/base.py +3 -0
- scout/adapter/mongo/case.py +27 -2
- scout/adapter/mongo/ccv.py +131 -0
- scout/adapter/mongo/query.py +88 -53
- scout/adapter/mongo/variant.py +6 -5
- scout/adapter/mongo/variant_events.py +45 -1
- scout/build/ccv.py +59 -0
- scout/commands/export/export_command.py +0 -0
- scout/commands/load/base.py +0 -0
- scout/commands/load/user.py +0 -0
- scout/commands/serve.py +2 -1
- scout/commands/update/disease.py +0 -0
- scout/commands/update/genes.py +0 -0
- scout/commands/wipe_database.py +0 -0
- scout/constants/__init__.py +2 -0
- scout/constants/case_tags.py +2 -0
- scout/constants/ccv.py +244 -0
- scout/demo/643594.config.yaml +2 -2
- scout/demo/images/custom_images/1300x1000.jpg +0 -0
- scout/models/ccv_evaluation.py +26 -0
- scout/models/variant/variant.py +1 -0
- scout/parse/variant/compound.py +0 -0
- scout/parse/variant/gene.py +0 -0
- scout/parse/variant/genotype.py +0 -0
- scout/resources/custom_igv_tracks/mane.bb +0 -0
- scout/server/blueprints/cases/controllers.py +21 -0
- scout/server/blueprints/cases/templates/cases/case_report.html +53 -0
- scout/server/blueprints/cases/templates/cases/collapsible_actionbar.html +2 -2
- scout/server/blueprints/cases/templates/cases/index.html +0 -2
- scout/server/blueprints/clinvar/controllers.py +4 -5
- scout/server/blueprints/institutes/controllers.py +129 -67
- scout/server/blueprints/institutes/forms.py +5 -2
- scout/server/blueprints/institutes/templates/overview/cases.html +6 -0
- scout/server/blueprints/institutes/templates/overview/causatives.html +1 -1
- scout/server/blueprints/institutes/templates/overview/utils.html +18 -6
- scout/server/blueprints/institutes/templates/overview/verified.html +1 -1
- scout/server/blueprints/institutes/views.py +4 -0
- scout/server/blueprints/panels/controllers.py +5 -6
- scout/server/blueprints/panels/templates/panels/panel.html +5 -5
- scout/server/blueprints/variant/controllers.py +148 -1
- scout/server/blueprints/variant/templates/variant/cancer-variant.html +1 -1
- scout/server/blueprints/variant/templates/variant/ccv.html +183 -0
- scout/server/blueprints/variant/templates/variant/components.html +61 -3
- scout/server/blueprints/variant/templates/variant/tx_overview.html +3 -3
- scout/server/blueprints/variant/templates/variant/variant.html +1 -1
- scout/server/blueprints/variant/templates/variant/variant_details.html +29 -11
- scout/server/blueprints/variant/utils.py +21 -1
- scout/server/blueprints/variant/views.py +114 -3
- scout/server/blueprints/variants/controllers.py +31 -0
- scout/server/blueprints/variants/templates/variants/cancer-sv-variants.html +4 -18
- scout/server/blueprints/variants/templates/variants/cancer-variants.html +4 -13
- scout/server/blueprints/variants/templates/variants/components.html +77 -73
- scout/server/blueprints/variants/templates/variants/indicators.html +11 -0
- scout/server/blueprints/variants/templates/variants/sv-variants.html +2 -2
- scout/server/links.py +1 -1
- scout/server/static/custom_images.js +19 -2
- scout/utils/acmg.py +0 -1
- scout/utils/ccv.py +201 -0
- scout/utils/md5.py +0 -0
- {scout_browser-4.92.dist-info → scout_browser-4.94.dist-info}/METADATA +67 -45
- {scout_browser-4.92.dist-info → scout_browser-4.94.dist-info}/RECORD +54 -49
- {scout_browser-4.92.dist-info → scout_browser-4.94.dist-info}/WHEEL +1 -2
- scout/__version__.py +0 -1
- scout/demo/images/custom_images/640x480_two.jpg +0 -0
- scout_browser-4.92.dist-info/top_level.txt +0 -1
- {scout_browser-4.92.dist-info → scout_browser-4.94.dist-info}/entry_points.txt +0 -0
- {scout_browser-4.92.dist-info → scout_browser-4.94.dist-info/licenses}/LICENSE +0 -0
scout/constants/ccv.py
ADDED
@@ -0,0 +1,244 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
from collections import OrderedDict
|
3
|
+
|
4
|
+
# from worst to most certain benign
|
5
|
+
CCV_MAP = OrderedDict(
|
6
|
+
[
|
7
|
+
(4, "oncogenic"),
|
8
|
+
(3, "likely_oncogenic"),
|
9
|
+
(0, "uncertain_significance"),
|
10
|
+
(2, "likely_benign"),
|
11
|
+
(1, "benign"),
|
12
|
+
]
|
13
|
+
)
|
14
|
+
# <a href="https://cancerhotspots.org" target="_blank">cancerhotspots.org</a>
|
15
|
+
REV_CCV_MAP = OrderedDict([(value, key) for key, value in CCV_MAP.items()])
|
16
|
+
|
17
|
+
CCV_OPTIONS = [
|
18
|
+
{"code": "oncogenic", "short": "O", "label": "Oncogenic", "color": "danger"},
|
19
|
+
{
|
20
|
+
"code": "likely_oncogenic",
|
21
|
+
"short": "LO",
|
22
|
+
"label": "Likely Oncogenic",
|
23
|
+
"color": "warning",
|
24
|
+
},
|
25
|
+
{
|
26
|
+
"code": "uncertain_significance",
|
27
|
+
"short": "VUS",
|
28
|
+
"label": "Uncertain Significance",
|
29
|
+
"color": "primary",
|
30
|
+
},
|
31
|
+
{"code": "likely_benign", "short": "LB", "label": "Likely Benign", "color": "info"},
|
32
|
+
{"code": "benign", "short": "B", "label": "Benign", "color": "success"},
|
33
|
+
]
|
34
|
+
|
35
|
+
CCV_COMPLETE_MAP = OrderedDict([(option["code"], option) for option in CCV_OPTIONS])
|
36
|
+
|
37
|
+
CCV_CRITERIA = OrderedDict()
|
38
|
+
|
39
|
+
CCV_CRITERIA["oncogenicity"] = OrderedDict(
|
40
|
+
[
|
41
|
+
(
|
42
|
+
"Very Strong",
|
43
|
+
OrderedDict(
|
44
|
+
[
|
45
|
+
(
|
46
|
+
"OVS1",
|
47
|
+
{
|
48
|
+
"short": "Null variant in tumor supressor",
|
49
|
+
"description": "Null variant (nonsense, frameshift, canonical ±1 or 2 splice sites, initiation codon, single-exon or multiexon deletion) in a bona fide tumor suppressor gene.",
|
50
|
+
"documentation": 'Strength can be modified based on <a href="https://pubmed.ncbi.nlm.nih.gov/30192042/" target="blank">ClinGen’s recommendations for PVS1</a>',
|
51
|
+
},
|
52
|
+
)
|
53
|
+
]
|
54
|
+
),
|
55
|
+
),
|
56
|
+
(
|
57
|
+
"Strong",
|
58
|
+
OrderedDict(
|
59
|
+
[
|
60
|
+
(
|
61
|
+
"OS1",
|
62
|
+
{
|
63
|
+
"short": "Same aa change as known oncogenic variant",
|
64
|
+
"description": "Same amino acid change as a previously established oncogenic variant (using this standard) regardless of nucleotide change.",
|
65
|
+
},
|
66
|
+
),
|
67
|
+
(
|
68
|
+
"OS2",
|
69
|
+
{
|
70
|
+
"short": "Well-established functional studies",
|
71
|
+
"description": "Well-established in vitro or in vivo functional studies, supportive of an oncogenic effect of the variant.",
|
72
|
+
},
|
73
|
+
),
|
74
|
+
(
|
75
|
+
"OS3",
|
76
|
+
{
|
77
|
+
"short": "Cancer hotspot: high frequency",
|
78
|
+
"description": "Located in one of the hotspots in cancerhotspots.org with at least 50 samples with a somatic variant at the same amino acid position, and the same amino acid change count in cancerhotspots.org in at least 10 samples.",
|
79
|
+
},
|
80
|
+
),
|
81
|
+
]
|
82
|
+
),
|
83
|
+
),
|
84
|
+
(
|
85
|
+
"Moderate",
|
86
|
+
OrderedDict(
|
87
|
+
[
|
88
|
+
(
|
89
|
+
"OM1",
|
90
|
+
{
|
91
|
+
"short": "Functional domain",
|
92
|
+
"description": "Located in a critical and well-established part of a functional domain (eg, active site of an enzyme).",
|
93
|
+
},
|
94
|
+
),
|
95
|
+
(
|
96
|
+
"OM2",
|
97
|
+
{
|
98
|
+
"short": "Protein length change",
|
99
|
+
"description": "Protein length changes as a result of in-frame deletions/insertions in a known oncogene or tumor suppressor gene or stop-loss variants in a known tumor suppressor gene.",
|
100
|
+
},
|
101
|
+
),
|
102
|
+
(
|
103
|
+
"OM3",
|
104
|
+
{
|
105
|
+
"short": "Cancer hotspot: moderate frequency",
|
106
|
+
"description": "Located in one of the hotspots in cancerhotspots.org with <50 samples with a somatic variant at the same amino acid position, and the same amino acid change count in cancerhotspots.org is at least 10.",
|
107
|
+
},
|
108
|
+
),
|
109
|
+
(
|
110
|
+
"OM4",
|
111
|
+
{
|
112
|
+
"short": "Missense variant at aa with other oncogenic missense variant",
|
113
|
+
"description": "Missense variant at an amino acid residue where a different missense variant determined to be oncogenic (using this standard) has been documented. Amino acid difference from reference amino acid should be greater or at least approximately the same as for missense change determined to be oncogenic.",
|
114
|
+
},
|
115
|
+
),
|
116
|
+
]
|
117
|
+
),
|
118
|
+
),
|
119
|
+
(
|
120
|
+
"Supporting",
|
121
|
+
OrderedDict(
|
122
|
+
[
|
123
|
+
(
|
124
|
+
"OP1",
|
125
|
+
{
|
126
|
+
"short": "Computatinal evidence",
|
127
|
+
"description": "All used lines of computational evidence support an oncogenic effect of a variant (conservation/evolutionary, splicing effect, etc.).",
|
128
|
+
},
|
129
|
+
),
|
130
|
+
(
|
131
|
+
"OP2",
|
132
|
+
{
|
133
|
+
"short": "Gene in a malignancy with a single genetic etiology",
|
134
|
+
"description": "Somatic variant in a gene in a malignancy with a single genetic etiology. Example: retinoblastoma is caused by bi-allelic RB1 inactivation.",
|
135
|
+
},
|
136
|
+
),
|
137
|
+
(
|
138
|
+
"OP3",
|
139
|
+
{
|
140
|
+
"short": "Cancer hotspots: low frequency",
|
141
|
+
"description": "Located in one of the hotspots in cancerhotspots.org and the particular amino acid change count in cancerhotspots.org is below 10",
|
142
|
+
},
|
143
|
+
),
|
144
|
+
(
|
145
|
+
"OP4",
|
146
|
+
{
|
147
|
+
"short": "Absent in population databases",
|
148
|
+
"description": "Absent from controls (or at an extremely low frequency) in gnomAD.",
|
149
|
+
},
|
150
|
+
),
|
151
|
+
]
|
152
|
+
),
|
153
|
+
),
|
154
|
+
]
|
155
|
+
)
|
156
|
+
|
157
|
+
CCV_CRITERIA["benign impact"] = OrderedDict(
|
158
|
+
[
|
159
|
+
(
|
160
|
+
"Very Strong",
|
161
|
+
OrderedDict(
|
162
|
+
[
|
163
|
+
(
|
164
|
+
"SBVS1",
|
165
|
+
{
|
166
|
+
"short": "MAF is >0.05",
|
167
|
+
"description": "Minor allele frequency is >5%% in gnomAD in any 5 general continental populations: African, East Asian, European (non-Finnish), Latino, and South Asian.",
|
168
|
+
},
|
169
|
+
)
|
170
|
+
]
|
171
|
+
),
|
172
|
+
),
|
173
|
+
(
|
174
|
+
"Strong",
|
175
|
+
OrderedDict(
|
176
|
+
[
|
177
|
+
(
|
178
|
+
"SBS1",
|
179
|
+
{
|
180
|
+
"short": "MAF is >0.01",
|
181
|
+
"description": "Minor allele frequency is >1%% in gnomAD in any 5 general continental populations: African, East Asian, European (non-Finnish), Latino, and South Asian. ",
|
182
|
+
},
|
183
|
+
),
|
184
|
+
(
|
185
|
+
"SBS2",
|
186
|
+
{
|
187
|
+
"short": "Well-established functional studies",
|
188
|
+
"description": "Well-established in vitro or in vivo functional studies show no oncogenic effects.",
|
189
|
+
},
|
190
|
+
),
|
191
|
+
]
|
192
|
+
),
|
193
|
+
),
|
194
|
+
(
|
195
|
+
"Supporting",
|
196
|
+
OrderedDict(
|
197
|
+
[
|
198
|
+
(
|
199
|
+
"SBP1",
|
200
|
+
{
|
201
|
+
"short": "Computational evidence",
|
202
|
+
"description": "All used lines of computational evidence suggest no effect of a variant (conservation/evolutionary, splicing effect, etc.).",
|
203
|
+
},
|
204
|
+
),
|
205
|
+
(
|
206
|
+
"SBP2",
|
207
|
+
{
|
208
|
+
"short": "Silent mutation (no predicted impact on splicing)",
|
209
|
+
"description": "A synonymous (silent) variant for which splicing prediction algorithms predict no effect on the splice consensus sequence nor the creation of a new splice site and the nucleotide is not highly conserved.",
|
210
|
+
},
|
211
|
+
),
|
212
|
+
]
|
213
|
+
),
|
214
|
+
),
|
215
|
+
]
|
216
|
+
)
|
217
|
+
|
218
|
+
CCV_POTENTIAL_CONFLICTS = [
|
219
|
+
(
|
220
|
+
"OS2",
|
221
|
+
"OS1",
|
222
|
+
"If OS1 is applicable, OS2 can be used only if functional studies are based on the particular nucleotide change of the variant.",
|
223
|
+
),
|
224
|
+
(
|
225
|
+
"OS3",
|
226
|
+
"OS1",
|
227
|
+
"OS3 cannot be used if OS1 is applicable, unless it is possible to observe hotspots on the basis of the particular nucleotide change.",
|
228
|
+
),
|
229
|
+
(
|
230
|
+
"OM1",
|
231
|
+
"OVS1",
|
232
|
+
"OM1 cannot be used if OVS1 is applicable.",
|
233
|
+
),
|
234
|
+
(
|
235
|
+
"OM3",
|
236
|
+
"OM1",
|
237
|
+
"OM3 cannot be used if OM1 is applicable.",
|
238
|
+
),
|
239
|
+
(
|
240
|
+
"OM3",
|
241
|
+
"OM4",
|
242
|
+
"OM3 cannot be used if OM4 is applicable.",
|
243
|
+
),
|
244
|
+
]
|
scout/demo/643594.config.yaml
CHANGED
@@ -113,8 +113,8 @@ custom_images:
|
|
113
113
|
path: scout/demo/images/custom_images/640x480_one.png
|
114
114
|
- title: A jpg image
|
115
115
|
description: A very good description
|
116
|
-
width:
|
117
|
-
path: scout/demo/images/custom_images/
|
116
|
+
width: 1300
|
117
|
+
path: scout/demo/images/custom_images/1300x1000.jpg
|
118
118
|
section_two:
|
119
119
|
- title: An SVG image
|
120
120
|
description: Another very good description
|
Binary file
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
scout.models.ccv_evaluation
|
4
|
+
~~~~~~~~~~~~~~~~~~
|
5
|
+
|
6
|
+
Define a document to describe a ClinGen-CGC-VIGG evaluation
|
7
|
+
|
8
|
+
Evaluations are stored in its own collection
|
9
|
+
|
10
|
+
"""
|
11
|
+
|
12
|
+
from datetime import datetime
|
13
|
+
|
14
|
+
ccv_evaluation = dict(
|
15
|
+
variant_specific=str, # md5 document id
|
16
|
+
variant_id=str, # md5 variant id
|
17
|
+
institute_id=str, # Institute _id, required
|
18
|
+
case_id=str, # case_id, required
|
19
|
+
classification=str, # What did the evaluation end up in?
|
20
|
+
# All evaluations will have an author
|
21
|
+
user_id=str, # user email, required
|
22
|
+
user_name=str, # user name
|
23
|
+
criteria=list, # List of dictionaries with criterias
|
24
|
+
# timestamps
|
25
|
+
created_at=datetime,
|
26
|
+
)
|
scout/models/variant/variant.py
CHANGED
scout/parse/variant/compound.py
CHANGED
File without changes
|
scout/parse/variant/gene.py
CHANGED
File without changes
|
scout/parse/variant/genotype.py
CHANGED
File without changes
|
Binary file
|
@@ -62,6 +62,7 @@ from scout.server.utils import (
|
|
62
62
|
case_has_rna_tracks,
|
63
63
|
institute_and_case,
|
64
64
|
)
|
65
|
+
from scout.utils.acmg import get_acmg_temperature
|
65
66
|
|
66
67
|
LOG = logging.getLogger(__name__)
|
67
68
|
|
@@ -611,6 +612,22 @@ def check_outdated_gene_panel(panel_obj, latest_panel):
|
|
611
612
|
return extra_genes, missing_genes
|
612
613
|
|
613
614
|
|
615
|
+
def add_bayesian_acmg_classification(variant_obj: dict):
|
616
|
+
"""Append info to display the ACMG VUS Bayesian score / temperature."""
|
617
|
+
variant_acmg_classifications = list(
|
618
|
+
store.get_evaluations_case_specific(document_id=variant_obj["_id"])
|
619
|
+
)
|
620
|
+
if variant_acmg_classifications:
|
621
|
+
variant_obj["bayesian_acmg"] = get_acmg_temperature(
|
622
|
+
set(
|
623
|
+
[
|
624
|
+
criterium.get("term")
|
625
|
+
for criterium in variant_acmg_classifications[0].get("criteria", [])
|
626
|
+
]
|
627
|
+
)
|
628
|
+
)
|
629
|
+
|
630
|
+
|
614
631
|
def case_report_variants(store: MongoAdapter, case_obj: dict, institute_obj: dict, data: dict):
|
615
632
|
"""Gather evaluated variants info to include in case report."""
|
616
633
|
|
@@ -624,6 +641,7 @@ def case_report_variants(store: MongoAdapter, case_obj: dict, institute_obj: dic
|
|
624
641
|
continue
|
625
642
|
if case_key == "partial_causatives":
|
626
643
|
var_obj["phenotypes"] = case_obj["partial_causatives"][var_id]
|
644
|
+
add_bayesian_acmg_classification(var_obj)
|
627
645
|
evaluated_variants_by_type[eval_category].append(
|
628
646
|
_get_decorated_var(var_obj=var_obj, institute_obj=institute_obj, case_obj=case_obj)
|
629
647
|
)
|
@@ -663,6 +681,9 @@ def _append_evaluated_variant_by_type(
|
|
663
681
|
"""
|
664
682
|
for eval_category, variant_key in CASE_REPORT_VARIANT_TYPES.items():
|
665
683
|
if variant_key in var_obj and var_obj[variant_key] is not None:
|
684
|
+
|
685
|
+
add_bayesian_acmg_classification(var_obj)
|
686
|
+
|
666
687
|
evaluated_variants_by_type[eval_category].append(
|
667
688
|
_get_decorated_var(var_obj=var_obj, institute_obj=institute_obj, case_obj=case_obj)
|
668
689
|
)
|
@@ -40,6 +40,11 @@
|
|
40
40
|
<li class="nav-item">
|
41
41
|
<a class="nav-link link-secondary" style="text-decoration: none !important;" href="#acmg_variants">ACMG-classified variants</a>
|
42
42
|
</li>
|
43
|
+
{% if cancer %}
|
44
|
+
<li class="nav-item">
|
45
|
+
<a class="nav-link link-secondary" style="text-decoration: none !important;" href="#ccv_variants">ClinGen-CGC-VICC-classified variants</a>
|
46
|
+
</li>
|
47
|
+
{% endif %}
|
43
48
|
<li class="nav-item">
|
44
49
|
<a class="nav-link link-secondary" style="text-decoration: none !important;" href="#manual_ranked_variants">Manual ranked</a>
|
45
50
|
</li>
|
@@ -64,6 +69,7 @@
|
|
64
69
|
{{ causatives_panel()}}
|
65
70
|
{{ pinned_panel() }}
|
66
71
|
{{ classified_panel() }}
|
72
|
+
{% if cancer %}{{ ccv_classified_panel() }}{% endif %}
|
67
73
|
{{ tagged_panel() }}
|
68
74
|
{{ commented_panel() }}
|
69
75
|
{{ dismissed_panel() }}
|
@@ -392,6 +398,33 @@
|
|
392
398
|
</div>
|
393
399
|
{% endmacro %}
|
394
400
|
|
401
|
+
{% macro ccv_classified_panel() %}
|
402
|
+
<div class="card border-warning mb-3" style="border-width: 5px; display: block;">
|
403
|
+
<div class="card-header bg-warning text-dark" style="border-top-left-radius: 0; border-top-right-radius: 0;">
|
404
|
+
<a id="ccv_variants"><strong>Other ClinGen-CGC-VICC-classified Variants</strong></a>
|
405
|
+
</div>
|
406
|
+
<div class="card-body">
|
407
|
+
{% set duplicated_variants = [] %}
|
408
|
+
{% if variants.ccv_classified_detailed %}
|
409
|
+
{% for variant in variants.ccv_classified_detailed|sort(attribute='variant_rank') %}
|
410
|
+
{% if variant['_id'] not in printed_vars %}
|
411
|
+
{% do printed_vars.append(variant['_id']) %}
|
412
|
+
{{ variant_content(variant, loop.index) }}
|
413
|
+
<br>
|
414
|
+
{% else %}
|
415
|
+
{% do duplicated_variants.append(variant['_id']) %}
|
416
|
+
{% endif %}
|
417
|
+
{% endfor %}
|
418
|
+
{% else %}
|
419
|
+
No ClinGen-CGC-VICC-classified variants available for this case
|
420
|
+
{% endif %}
|
421
|
+
{% if variants.ccv_classified_detailed and duplicated_variants|length == variants.ccv_classified_detailed|length %}
|
422
|
+
All ClinGen-CGC-VICC-classified variants are already described in the previous views
|
423
|
+
{% endif %}
|
424
|
+
</div>
|
425
|
+
</div>
|
426
|
+
{% endmacro %}
|
427
|
+
|
395
428
|
{% macro tagged_panel() %}
|
396
429
|
<div class="card border-warning mb-3" style="border-width: 5px; display: block;">
|
397
430
|
<div class="card-header bg-warning text-dark" style="border-top-left-radius: 0; border-top-right-radius: 0;">
|
@@ -635,6 +668,10 @@
|
|
635
668
|
<th>Inheritance models</th>
|
636
669
|
{% endif %}
|
637
670
|
<th>ACMG classification</th>
|
671
|
+
<th>Bayesian classification</th>
|
672
|
+
{% if cancer %}
|
673
|
+
<th>ClinGen-CGC-VICC classification</th>
|
674
|
+
{% endif %}
|
638
675
|
</tr>
|
639
676
|
</thead>
|
640
677
|
<tbody>
|
@@ -682,7 +719,23 @@
|
|
682
719
|
{% else %}
|
683
720
|
-
|
684
721
|
{% endif %}
|
722
|
+
<td>
|
723
|
+
{% if variant.bayesian_acmg %}
|
724
|
+
<span class="badge rounded-pill bg-{{variant.bayesian_acmg.temperature_class}}">Score {{variant.bayesian_acmg.points|string}} <span class='fa {{variant.bayesian_acmg.temperature_icon}}'></span> {{variant.bayesian_acmg.temperature}} ({{variant.bayesian_acmg.point_classification}})</span>
|
725
|
+
{% else %}
|
726
|
+
-
|
727
|
+
{% endif %}
|
728
|
+
</td>
|
685
729
|
</td>
|
730
|
+
{% if cancer %}
|
731
|
+
<td>
|
732
|
+
{% if variant.ccv_classification %}
|
733
|
+
<span class="badge rounded-pill bg-{{variant.ccv_classification['color'] if variant.ccv_classification['color'] else 'secondary'}}" title="{{variant.ccv_classification['code']}}">{{variant.ccv_classification['code'] }}</span>
|
734
|
+
{% else %}
|
735
|
+
-
|
736
|
+
{% endif %}
|
737
|
+
</td>
|
738
|
+
{% endif %}
|
686
739
|
</tr>
|
687
740
|
</tbody>
|
688
741
|
</table>
|
@@ -372,7 +372,7 @@
|
|
372
372
|
<select class="form-control form-control-sm" name="collaborator">
|
373
373
|
<option selected disabled value="">Select institute</option>
|
374
374
|
{% for collab_id, collab_name in collaborators %}
|
375
|
-
<option value="{{ collab_id }}">{{ collab_name }}</option>
|
375
|
+
<option value="{{ collab_id }}">{{ collab_name }} ({{ collab_id }})</option>
|
376
376
|
{% endfor %}
|
377
377
|
</select>
|
378
378
|
<span class="input-group-btn">
|
@@ -389,7 +389,7 @@
|
|
389
389
|
<select class="form-control form-control-sm" name="collaborator">
|
390
390
|
<option>Institute</option>
|
391
391
|
{% for collab_id, collab_name in case.o_collaborators %}
|
392
|
-
<option value="{{ collab_id }}">{{ collab_name }}</option>
|
392
|
+
<option value="{{ collab_id }}">{{ collab_name }} ({{ collab_id }})</option>
|
393
393
|
{% endfor %}
|
394
394
|
</select>
|
395
395
|
<div class="input-group-btn">
|
@@ -25,9 +25,7 @@
|
|
25
25
|
<a href="{{ url_for('overview.cases', institute_id=institute._id) }}">
|
26
26
|
{{ institute.display_name }}
|
27
27
|
</a>
|
28
|
-
{% if current_user.is_admin %}
|
29
28
|
<span class="text-muted">({{ institute._id }})</span>
|
30
|
-
{% endif %}
|
31
29
|
<span class="badge bg-secondary rounded-pill float-end">{{ case_count }} cases </span>
|
32
30
|
</li>
|
33
31
|
{% endfor %}
|
@@ -399,11 +399,10 @@ def json_api_submission(submission_id):
|
|
399
399
|
afile.flush()
|
400
400
|
afile.seek(0)
|
401
401
|
|
402
|
-
with
|
403
|
-
mode="a+", prefix="Variant", suffix=".csv"
|
404
|
-
|
405
|
-
|
406
|
-
) as casedata_file:
|
402
|
+
with (
|
403
|
+
NamedTemporaryFile(mode="a+", prefix="Variant", suffix=".csv") as variant_file,
|
404
|
+
NamedTemporaryFile(mode="a+", prefix="CaseData", suffix=".csv") as casedata_file,
|
405
|
+
):
|
407
406
|
# Write temp Variant CSV file
|
408
407
|
_, variants_header, variants_lines = clinvar_submission_file(
|
409
408
|
submission_id, "variant_data", "SUB000"
|