scout-browser 4.91.2__py3-none-any.whl → 4.93.1__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.
Files changed (50) hide show
  1. scout/__version__.py +1 -1
  2. scout/adapter/mongo/base.py +3 -0
  3. scout/adapter/mongo/case.py +27 -2
  4. scout/adapter/mongo/ccv.py +131 -0
  5. scout/adapter/mongo/query.py +13 -16
  6. scout/adapter/mongo/variant.py +4 -3
  7. scout/adapter/mongo/variant_events.py +45 -1
  8. scout/build/ccv.py +59 -0
  9. scout/commands/delete/delete_command.py +27 -4
  10. scout/commands/serve.py +2 -1
  11. scout/constants/__init__.py +2 -0
  12. scout/constants/case_tags.py +2 -0
  13. scout/constants/ccv.py +244 -0
  14. scout/demo/643594.config.yaml +2 -2
  15. scout/demo/images/custom_images/1300x1000.jpg +0 -0
  16. scout/models/ccv_evaluation.py +26 -0
  17. scout/models/variant/variant.py +1 -0
  18. scout/parse/panelapp.py +3 -1
  19. scout/server/blueprints/cases/templates/cases/case_report.html +45 -0
  20. scout/server/blueprints/cases/templates/cases/collapsible_actionbar.html +2 -2
  21. scout/server/blueprints/cases/templates/cases/index.html +0 -2
  22. scout/server/blueprints/genes/templates/genes/gene.html +6 -0
  23. scout/server/blueprints/institutes/templates/overview/causatives.html +1 -1
  24. scout/server/blueprints/institutes/templates/overview/utils.html +12 -1
  25. scout/server/blueprints/institutes/templates/overview/verified.html +1 -1
  26. scout/server/blueprints/institutes/views.py +4 -0
  27. scout/server/blueprints/panels/controllers.py +5 -6
  28. scout/server/blueprints/panels/templates/panels/panel.html +5 -5
  29. scout/server/blueprints/variant/controllers.py +148 -1
  30. scout/server/blueprints/variant/templates/variant/cancer-variant.html +1 -1
  31. scout/server/blueprints/variant/templates/variant/ccv.html +183 -0
  32. scout/server/blueprints/variant/templates/variant/components.html +61 -3
  33. scout/server/blueprints/variant/templates/variant/variant.html +1 -1
  34. scout/server/blueprints/variant/templates/variant/variant_details.html +29 -11
  35. scout/server/blueprints/variant/utils.py +21 -1
  36. scout/server/blueprints/variant/views.py +114 -3
  37. scout/server/blueprints/variants/controllers.py +31 -0
  38. scout/server/blueprints/variants/templates/variants/cancer-variants.html +2 -1
  39. scout/server/blueprints/variants/templates/variants/components.html +63 -73
  40. scout/server/blueprints/variants/templates/variants/indicators.html +11 -0
  41. scout/server/extensions/panelapp_extension.py +2 -2
  42. scout/server/static/custom_images.js +19 -2
  43. scout/utils/ccv.py +201 -0
  44. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/METADATA +6 -5
  45. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/RECORD +49 -43
  46. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/WHEEL +1 -1
  47. scout/demo/images/custom_images/640x480_two.jpg +0 -0
  48. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/LICENSE +0 -0
  49. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/entry_points.txt +0 -0
  50. {scout_browser-4.91.2.dist-info → scout_browser-4.93.1.dist-info}/top_level.txt +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
+ ]
@@ -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: 500
117
- path: scout/demo/images/custom_images/640x480_two.jpg
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
@@ -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
+ )
@@ -94,6 +94,7 @@ variant = dict(
94
94
  manual_rank=int, # choices=[0, 1, 2, 3, 4, 5]
95
95
  dismiss_variant=list,
96
96
  acmg_classification=str, # choices=ACMG_TERMS
97
+ ccv_classification=str, # choices=CCV_TERMS
97
98
  )
98
99
 
99
100
  compound = dict(
scout/parse/panelapp.py CHANGED
@@ -1,12 +1,13 @@
1
1
  """Code to parse panel information"""
2
2
 
3
3
  import logging
4
- from typing import Dict, List, Optional
4
+ from typing import Dict, Optional
5
5
 
6
6
  from scout.constants import INCOMPLETE_PENETRANCE_MAP, MODELS_MAP, PANELAPP_CONFIDENCE_EXCLUDE
7
7
  from scout.utils.date import get_date
8
8
 
9
9
  LOG = logging.getLogger(__name__)
10
+ PANELAPP_PANELS_URL = "https://panelapp.genomicsengland.co.uk/panels/"
10
11
 
11
12
 
12
13
  def parse_panel_app_gene(
@@ -90,6 +91,7 @@ def parse_panelapp_panel(
90
91
  gene_panel["display_name"] = " - ".join([panel_info["name"], f"[{confidence.upper()}]"])
91
92
  gene_panel["institute"] = institute
92
93
  gene_panel["panel_type"] = ("clinical",)
94
+ gene_panel["description"] = f"{PANELAPP_PANELS_URL}{panel_id}"
93
95
 
94
96
  LOG.info("Parsing panel %s", gene_panel["display_name"])
95
97
 
@@ -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,9 @@
635
668
  <th>Inheritance models</th>
636
669
  {% endif %}
637
670
  <th>ACMG classification</th>
671
+ {% if cancer %}
672
+ <th>ClinGen-CGC-VICC classification</th>
673
+ {% endif %}
638
674
  </tr>
639
675
  </thead>
640
676
  <tbody>
@@ -683,6 +719,15 @@
683
719
  -
684
720
  {% endif %}
685
721
  </td>
722
+ {% if cancer %}
723
+ <td>
724
+ {% if variant.ccv_classification %}
725
+ <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>
726
+ {% else %}
727
+ -
728
+ {% endif %}
729
+ </td>
730
+ {% endif %}
686
731
  </tr>
687
732
  </tbody>
688
733
  </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 %}
@@ -84,6 +84,12 @@
84
84
  <a target="_blank" href={{ record.entrez_link }} referrerpolicy="no-referrer" rel="noopener" target="_blank"> {{ entrez_id }}</a>
85
85
  </span>
86
86
  </li>
87
+ <li class="list-group-item">
88
+ PanelApp
89
+ <span class="float-end">
90
+ <a target="_blank" href={{ record.panelapp_link }} referrerpolicy="no-referrer" rel="noopener" target="_blank"> {{ symbol }} </a>
91
+ </span>
92
+ </li>
87
93
  {% if pli_score %}
88
94
  <li class="list-group-item">
89
95
  pLi Score (<a href={{ record.gnomad_link }} referrerpolicy="no-referrer" rel="noopener" target="_blank">GnomAD</a>)
@@ -29,7 +29,7 @@
29
29
  <div class="container-float">
30
30
  <div class="row" id="body-row"> <!--sidebar and main container are on the same row-->
31
31
  <div class="col-12">
32
- {{ variant_list_content(institute, causatives, acmg_map, callers, inherit_palette) }}
32
+ {{ variant_list_content(institute, causatives, acmg_map, ccv_map, callers, inherit_palette) }}
33
33
  </div>
34
34
  </div> <!-- end of div id body-row -->
35
35
  </div>
@@ -446,7 +446,7 @@
446
446
  {% endmacro %}
447
447
 
448
448
 
449
- {% macro variant_list_content(institute, variants, acmg_map, callers, inherit_palette) %}
449
+ {% macro variant_list_content(institute, variants, acmg_map, ccv_map, callers, inherit_palette) %}
450
450
  <div class="card mt-3">
451
451
  <div class="card-body overflow-auto">
452
452
  <table id="variants_table" class="table display table-sm">
@@ -469,6 +469,7 @@
469
469
  <th data-bs-toggle='tooltip' data-bs-container='body' title="ref/alt-GQ">Zygosity</th>
470
470
  <th>Inheritance</th>
471
471
  <th>ACMG</th>
472
+ <th>ClinGen-CGC-VICC</th>
472
473
  <th>Case</th>
473
474
  <th>Analysis type</th>
474
475
  <th>Validated status</th>
@@ -608,6 +609,16 @@
608
609
  {% endif %}
609
610
  </a>
610
611
  </td>
612
+ <td><!-- Clingen-CGC-VIGG -->
613
+ <a href="#" data-bs-toggle="tooltip" title="Clingen-CGC-VIGG classification assigned by Scout users"
614
+ style="text-decoration: none; color: #000;">
615
+ {% if 'ccv_classification' in variant %}
616
+ <span class="badge bg-{{ccv_map[variant.ccv_classification].color}}">{{ccv_map[variant.ccv_classification].short}}</span>
617
+ {% else %}
618
+ -
619
+ {% endif %}
620
+ </a>
621
+ </td>
611
622
  <td><!-- Case -->
612
623
  <a href="{{ url_for('cases.case',
613
624
  institute_id=institute._id,
@@ -58,7 +58,7 @@
58
58
  {{validated_chart()}}
59
59
  </div>
60
60
  <div class="row">
61
- <div class="col-12">{{ variant_list_content(institute, verified, acmg_map, callers, inherit_palette) }}</div>
61
+ <div class="col-12">{{ variant_list_content(institute, verified, acmg_map, ccv_map, callers, inherit_palette) }}</div>
62
62
  </div>
63
63
  </div>
64
64
  </div>
@@ -10,6 +10,8 @@ from scout.constants import (
10
10
  ACMG_COMPLETE_MAP,
11
11
  ACMG_MAP,
12
12
  CALLERS,
13
+ CCV_COMPLETE_MAP,
14
+ CCV_MAP,
13
15
  INHERITANCE_PALETTE,
14
16
  VERBS_ICONS_MAP,
15
17
  VERBS_MAP,
@@ -72,6 +74,7 @@ def verified(institute_id):
72
74
  return dict(
73
75
  acmg_map={key: ACMG_COMPLETE_MAP[value] for key, value in ACMG_MAP.items()},
74
76
  callers=CALLERS,
77
+ ccv_map={key: CCV_COMPLETE_MAP[value] for key, value in CCV_MAP.items()},
75
78
  inherit_palette=INHERITANCE_PALETTE,
76
79
  institute=institute_obj,
77
80
  verified=verified_vars,
@@ -87,6 +90,7 @@ def causatives(institute_id):
87
90
  acmg_map={key: ACMG_COMPLETE_MAP[value] for key, value in ACMG_MAP.items()},
88
91
  callers=CALLERS,
89
92
  causatives=controllers.causatives(institute_obj, request),
93
+ ccv_map={key: CCV_COMPLETE_MAP[value] for key, value in CCV_MAP.items()},
90
94
  institute=institute_obj,
91
95
  inherit_palette=INHERITANCE_PALETTE,
92
96
  )
@@ -160,7 +160,6 @@ def update_panel(store, panel_name, csv_lines, option):
160
160
  Returns:
161
161
  panel_obj(dict)
162
162
  """
163
- new_genes = []
164
163
  panel_obj = store.gene_panel(panel_name)
165
164
  if panel_obj is None:
166
165
  return None
@@ -202,11 +201,11 @@ def update_panel(store, panel_name, csv_lines, option):
202
201
  )
203
202
 
204
203
  info_data = {
205
- "disease_associated_transcripts": new_gene["transcripts"],
206
- "reduced_penetrance": new_gene["reduced_penetrance"],
207
- "mosaicism": new_gene["mosaicism"],
208
- "inheritance_models": new_gene["inheritance_models"],
209
- "database_entry_version": new_gene["database_entry_version"],
204
+ "disease_associated_transcripts": new_gene.get("transcripts", []),
205
+ "reduced_penetrance": new_gene.get("reduced_penetrance", ""),
206
+ "mosaicism": new_gene.get("mosaicism", ""),
207
+ "inheritance_models": new_gene.get("inheritance_models", []),
208
+ "database_entry_version": new_gene.get("database_entry_version", ""),
210
209
  }
211
210
  if (
212
211
  option == "replace"
@@ -223,15 +223,15 @@
223
223
  <span data-bs-toggle="tooltip" data-bs-placement="right" data-bs-html="true" title="
224
224
  <div class='text-left'>
225
225
  <strong>Transcripts</strong>:
226
- {{ gene.info.disease_associated_transcripts|join(',') }} <br>
226
+ {{ gene.info.disease_associated_transcripts|join(',') if gene.info.disease_associated_transcripts }} <br>
227
227
  <strong>Reduced penetrance</strong>:
228
- {{ 'yes' if gene.info.reduced_penetrance else 'no' }} <br>
228
+ {{ gene.info.reduced_penetrance if gene.info.reduced_penetrance }} <br>
229
229
  <strong>Mosaicism</strong>:
230
- {{ 'yes' if gene.info.mosaicism else 'no' }} <br>
230
+ {{ gene.info.mosaicism if gene.info.mosaicism }} <br>
231
231
  <strong>Inheritance models</strong>:
232
- {{ gene.info.inheritance_models|join(',') }} <br>
232
+ {{ gene.info.inheritance_models|join(',') if gene.info.inheritance_models }} <br>
233
233
  <strong>Entry version</strong>:
234
- {{ gene.info.database_entry_version }} <br>
234
+ {{ gene.info.database_entry_version if gene.info.database_entry_version }} <br>
235
235
  </div>
236
236
  ">
237
237
  {{ gene.symbol }}