scout-browser 4.92__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.
- scout/__version__.py +1 -1
- scout/adapter/mongo/base.py +3 -0
- scout/adapter/mongo/case.py +27 -2
- scout/adapter/mongo/ccv.py +131 -0
- scout/adapter/mongo/variant.py +4 -3
- scout/adapter/mongo/variant_events.py +45 -1
- scout/build/ccv.py +59 -0
- scout/commands/serve.py +2 -1
- 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/server/blueprints/cases/templates/cases/case_report.html +45 -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/institutes/templates/overview/causatives.html +1 -1
- scout/server/blueprints/institutes/templates/overview/utils.html +12 -1
- 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/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-variants.html +2 -1
- scout/server/blueprints/variants/templates/variants/components.html +63 -73
- scout/server/blueprints/variants/templates/variants/indicators.html +11 -0
- scout/server/static/custom_images.js +19 -2
- scout/utils/ccv.py +201 -0
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/METADATA +6 -5
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/RECORD +44 -38
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/WHEEL +1 -1
- scout/demo/images/custom_images/640x480_two.jpg +0 -0
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/LICENSE +0 -0
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/entry_points.txt +0 -0
- {scout_browser-4.92.dist-info → scout_browser-4.93.1.dist-info}/top_level.txt +0 -0
scout/__version__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "4.
|
1
|
+
__version__ = "4.93.1"
|
scout/adapter/mongo/base.py
CHANGED
@@ -34,6 +34,7 @@ from flask import current_app
|
|
34
34
|
from .acmg import ACMGHandler
|
35
35
|
from .case import CaseHandler
|
36
36
|
from .case_group import CaseGroupHandler
|
37
|
+
from .ccv import CCVHandler
|
37
38
|
from .clinvar import ClinVarHandler
|
38
39
|
from .cytoband import CytobandHandler
|
39
40
|
from .disease_terms import DiagnosisHandler
|
@@ -61,6 +62,7 @@ class MongoAdapter(
|
|
61
62
|
ACMGHandler,
|
62
63
|
CaseGroupHandler,
|
63
64
|
CaseHandler,
|
65
|
+
CCVHandler,
|
64
66
|
ClinVarHandler,
|
65
67
|
CytobandHandler,
|
66
68
|
DiagnosisHandler,
|
@@ -97,6 +99,7 @@ class MongoAdapter(
|
|
97
99
|
"""Setup connection to database."""
|
98
100
|
self.db = database
|
99
101
|
self.acmg_collection = database.acmg
|
102
|
+
self.ccv_collection = database.ccv
|
100
103
|
self.case_collection = database.case
|
101
104
|
self.case_group_collection = database.case_group
|
102
105
|
self.clinvar_collection = database.clinvar
|
scout/adapter/mongo/case.py
CHANGED
@@ -11,7 +11,7 @@ from bson import ObjectId
|
|
11
11
|
from werkzeug.datastructures import ImmutableMultiDict
|
12
12
|
|
13
13
|
from scout.build.case import build_case
|
14
|
-
from scout.constants import ACMG_MAP, FILE_TYPE_MAP, ID_PROJECTION, OMICS_FILE_TYPE_MAP
|
14
|
+
from scout.constants import ACMG_MAP, CCV_MAP, FILE_TYPE_MAP, ID_PROJECTION, OMICS_FILE_TYPE_MAP
|
15
15
|
from scout.exceptions import ConfigError, IntegrityError
|
16
16
|
from scout.parse.variant.ids import parse_document_id
|
17
17
|
from scout.utils.algorithms import ui_score
|
@@ -1272,6 +1272,16 @@ class CaseHandler(object):
|
|
1272
1272
|
{"$set": {"case_id": family_id, "variant_specific": new_specific_id}},
|
1273
1273
|
)
|
1274
1274
|
|
1275
|
+
# update ClinGen-CGC-VIGG classification
|
1276
|
+
for ccv_obj in self.ccv_collection.find({"case_id": case_obj["_id"]}):
|
1277
|
+
LOG.info("update ClinGen-CGC-VIGG classification: %s", ccv_obj["classification"])
|
1278
|
+
ccv_variant = self.variant(ccv_obj["variant_specific"])
|
1279
|
+
new_specific_id = get_variantid(ccv_variant, family_id)
|
1280
|
+
self.ccv_collection.find_one_and_update(
|
1281
|
+
{"_id": ccv_obj["_id"]},
|
1282
|
+
{"$set": {"case_id": family_id, "variant_specific": new_specific_id}},
|
1283
|
+
)
|
1284
|
+
|
1275
1285
|
# update events
|
1276
1286
|
institute_obj = self.institute(case_obj["owner"])
|
1277
1287
|
for event_obj in self.events(institute_obj, case=case_obj):
|
@@ -1344,6 +1354,7 @@ class CaseHandler(object):
|
|
1344
1354
|
'mosaic_tags' : [list of variant ids],
|
1345
1355
|
'cancer_tier': [list of variant ids],
|
1346
1356
|
'acmg_classification': [list of variant ids]
|
1357
|
+
'ccv_classification': [list of variant ids]
|
1347
1358
|
'is_commented': [list of variant ids]
|
1348
1359
|
"""
|
1349
1360
|
updated_variants = {
|
@@ -1352,6 +1363,7 @@ class CaseHandler(object):
|
|
1352
1363
|
"mosaic_tags": [],
|
1353
1364
|
"cancer_tier": [],
|
1354
1365
|
"acmg_classification": [],
|
1366
|
+
"ccv_classification": [],
|
1355
1367
|
"is_commented": [],
|
1356
1368
|
}
|
1357
1369
|
|
@@ -1394,8 +1406,10 @@ class CaseHandler(object):
|
|
1394
1406
|
verb = action
|
1395
1407
|
if action == "acmg_classification":
|
1396
1408
|
verb = "acmg"
|
1397
|
-
|
1409
|
+
if action == "is_commented":
|
1398
1410
|
verb = "comment"
|
1411
|
+
if action == "ccv_classification":
|
1412
|
+
verb = "ccv"
|
1399
1413
|
|
1400
1414
|
old_event = self.event_collection.find_one(
|
1401
1415
|
{
|
@@ -1444,6 +1458,17 @@ class CaseHandler(object):
|
|
1444
1458
|
acmg_str=str_classif,
|
1445
1459
|
)
|
1446
1460
|
|
1461
|
+
if action == "ccv_classification":
|
1462
|
+
str_classif = CCV_MAP.get(old_var.get("ccv_classification"))
|
1463
|
+
updated_variant = self.update_ccv(
|
1464
|
+
institute_obj=institute_obj,
|
1465
|
+
case_obj=case_obj,
|
1466
|
+
user_obj=user_obj,
|
1467
|
+
link=link,
|
1468
|
+
variant_obj=new_var,
|
1469
|
+
ccv_str=str_classif,
|
1470
|
+
)
|
1471
|
+
|
1447
1472
|
if action in update_action_map.keys():
|
1448
1473
|
updated_variant = update_action_map[action](
|
1449
1474
|
institute_obj,
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
import logging
|
3
|
+
|
4
|
+
import pymongo
|
5
|
+
from bson import ObjectId
|
6
|
+
|
7
|
+
from scout.build.ccv import build_ccv_evaluation
|
8
|
+
from scout.utils.ccv import get_ccv
|
9
|
+
|
10
|
+
log = logging.getLogger(__name__)
|
11
|
+
|
12
|
+
|
13
|
+
class CCVHandler(object):
|
14
|
+
def submit_ccv_evaluation(
|
15
|
+
self,
|
16
|
+
variant_obj,
|
17
|
+
user_obj,
|
18
|
+
institute_obj,
|
19
|
+
case_obj,
|
20
|
+
link,
|
21
|
+
criteria=None,
|
22
|
+
classification=None,
|
23
|
+
):
|
24
|
+
"""Submit an evaluation to the database
|
25
|
+
|
26
|
+
Get all the relevant information, build an evaluation_obj
|
27
|
+
|
28
|
+
Args:
|
29
|
+
variant_obj(dict)
|
30
|
+
user_obj(dict)
|
31
|
+
institute_obj(dict)
|
32
|
+
case_obj(dict)
|
33
|
+
link(str): variant url
|
34
|
+
criteria(list(dict)):
|
35
|
+
[
|
36
|
+
{
|
37
|
+
'term': str,
|
38
|
+
'comment': str,
|
39
|
+
'modifier': str,
|
40
|
+
'links': list(str)
|
41
|
+
},
|
42
|
+
.
|
43
|
+
.
|
44
|
+
]
|
45
|
+
classification(int)
|
46
|
+
"""
|
47
|
+
criteria = criteria or []
|
48
|
+
|
49
|
+
variant_specific = variant_obj["_id"]
|
50
|
+
variant_id = variant_obj["variant_id"]
|
51
|
+
user_id = user_obj["_id"]
|
52
|
+
user_name = user_obj.get("name", user_obj["_id"])
|
53
|
+
institute_id = institute_obj["_id"]
|
54
|
+
case_id = case_obj["_id"]
|
55
|
+
|
56
|
+
evaluation_terms = []
|
57
|
+
for evaluation_info in criteria:
|
58
|
+
term = evaluation_info["term"]
|
59
|
+
if evaluation_info.get("modifier"):
|
60
|
+
term += "_" + evaluation_info.get("modifier")
|
61
|
+
evaluation_terms.append(term)
|
62
|
+
|
63
|
+
if classification is None:
|
64
|
+
classification = get_ccv(evaluation_terms)
|
65
|
+
|
66
|
+
if classification:
|
67
|
+
evaluation_obj = build_ccv_evaluation(
|
68
|
+
variant_specific=variant_specific,
|
69
|
+
variant_id=variant_id,
|
70
|
+
user_id=user_id,
|
71
|
+
user_name=user_name,
|
72
|
+
institute_id=institute_id,
|
73
|
+
case_id=case_id,
|
74
|
+
ccv_classification=classification,
|
75
|
+
ccv_criteria=criteria,
|
76
|
+
)
|
77
|
+
|
78
|
+
self._load_ccv_evaluation(evaluation_obj)
|
79
|
+
|
80
|
+
# Update the ccv classification for the variant:
|
81
|
+
self.update_ccv(institute_obj, case_obj, user_obj, link, variant_obj, classification)
|
82
|
+
return classification
|
83
|
+
|
84
|
+
def _load_ccv_evaluation(self, evaluation_obj):
|
85
|
+
"""Load a evaluation object into the database"""
|
86
|
+
res = self.ccv_collection.insert_one(evaluation_obj)
|
87
|
+
return res
|
88
|
+
|
89
|
+
def delete_ccv_evaluation(self, evaluation_obj):
|
90
|
+
"""Delete an evaluation from the database
|
91
|
+
|
92
|
+
Args:
|
93
|
+
evaluation_obj(dict)
|
94
|
+
|
95
|
+
"""
|
96
|
+
self.ccv_collection.delete_one({"_id": evaluation_obj["_id"]})
|
97
|
+
|
98
|
+
def get_ccv_evaluation(self, evaluation_id):
|
99
|
+
"""Get a single evaluation from the database
|
100
|
+
|
101
|
+
Args:
|
102
|
+
evaluation_id(str)
|
103
|
+
|
104
|
+
"""
|
105
|
+
return self.ccv_collection.find_one({"_id": ObjectId(evaluation_id)})
|
106
|
+
|
107
|
+
def get_ccv_evaluations(self, variant_obj):
|
108
|
+
"""Return all evaluations for a certain variant.
|
109
|
+
|
110
|
+
Args:
|
111
|
+
variant_obj (dict): variant dict from the database
|
112
|
+
|
113
|
+
Returns:
|
114
|
+
pymongo.cursor: database cursor
|
115
|
+
"""
|
116
|
+
query = dict(variant_id=variant_obj["variant_id"])
|
117
|
+
res = self.ccv_collection.find(query).sort([("created_at", pymongo.DESCENDING)])
|
118
|
+
return res
|
119
|
+
|
120
|
+
def get_ccv_evaluations_case_specific(self, document_id):
|
121
|
+
"""Return all evaluations for a certain variant, in a certain case as determined by document id.
|
122
|
+
|
123
|
+
Args:
|
124
|
+
document_id: variant document id from the db; an md5 hash including the case id.
|
125
|
+
|
126
|
+
Returns:
|
127
|
+
res: pymongo.cursor
|
128
|
+
"""
|
129
|
+
query = dict(variant_specific=document_id)
|
130
|
+
res = self.ccv_collection.find(query).sort([("created_at", pymongo.DESCENDING)])
|
131
|
+
return res
|
scout/adapter/mongo/variant.py
CHANGED
@@ -721,7 +721,7 @@ class VariantHandler(VariantLoader):
|
|
721
721
|
def evaluated_variant_ids_from_events(self, case_id, institute_id):
|
722
722
|
"""Returns variant ids for variants that have been evaluated
|
723
723
|
Return all variants, snvs/indels and svs from case case_id
|
724
|
-
which have an event entry for 'acmg_classification', 'manual_rank', 'dismiss_variant',
|
724
|
+
which have an event entry for 'acmg_classification', 'ccv_classification', 'manual_rank', 'dismiss_variant',
|
725
725
|
'cancer_tier', 'mosaic_tags'.
|
726
726
|
Args:
|
727
727
|
case_id(str)
|
@@ -732,6 +732,7 @@ class VariantHandler(VariantLoader):
|
|
732
732
|
|
733
733
|
evaluation_verbs = [
|
734
734
|
"acmg",
|
735
|
+
"ccv",
|
735
736
|
"manual_rank",
|
736
737
|
"cancer_tier",
|
737
738
|
"dismiss_variant",
|
@@ -758,7 +759,7 @@ class VariantHandler(VariantLoader):
|
|
758
759
|
"""Returns variants that have been evaluated
|
759
760
|
|
760
761
|
Return all variants, snvs/indels and svs from case case_id and institute_id
|
761
|
-
which have a entry for 'acmg_classification', 'manual_rank', 'dismiss_variant',
|
762
|
+
which have a entry for 'acmg_classification', 'ccv_classification', 'manual_rank', 'dismiss_variant',
|
762
763
|
'cancer_tier' or if they are commented.
|
763
764
|
|
764
765
|
Return only if the variants still exist and still have the assessment.
|
@@ -778,11 +779,11 @@ class VariantHandler(VariantLoader):
|
|
778
779
|
query = {
|
779
780
|
"$and": [
|
780
781
|
{"variant_id": {"$in": variant_ids}},
|
781
|
-
{"institute": institute_id},
|
782
782
|
{"case_id": case_id},
|
783
783
|
{
|
784
784
|
"$or": [
|
785
785
|
{"acmg_classification": {"$exists": True}},
|
786
|
+
{"ccv_classification": {"$exists": True}},
|
786
787
|
{"manual_rank": {"$exists": True}},
|
787
788
|
{"cancer_tier": {"$exists": True}},
|
788
789
|
{"dismiss_variant": {"$exists": True}},
|
@@ -4,7 +4,7 @@ from typing import Dict, List
|
|
4
4
|
|
5
5
|
import pymongo
|
6
6
|
|
7
|
-
from scout.constants import CANCER_TIER_OPTIONS, MANUAL_RANK_OPTIONS, REV_ACMG_MAP
|
7
|
+
from scout.constants import CANCER_TIER_OPTIONS, MANUAL_RANK_OPTIONS, REV_ACMG_MAP, REV_CCV_MAP
|
8
8
|
|
9
9
|
SANGER_OPTIONS = ["True positive", "False positive", "Not validated"]
|
10
10
|
|
@@ -931,3 +931,47 @@ class VariantEventHandler(object):
|
|
931
931
|
|
932
932
|
LOG.debug("Variant updated")
|
933
933
|
return updated_variant
|
934
|
+
|
935
|
+
def update_ccv(self, institute_obj, case_obj, user_obj, link, variant_obj, ccv_str):
|
936
|
+
"""Create an event for updating the ClinGen-CGC-VIGG classification of a variant.
|
937
|
+
|
938
|
+
Arguments:
|
939
|
+
institute_obj (dict): A Institute object
|
940
|
+
case_obj (dict): Case object
|
941
|
+
user_obj (dict): A User object
|
942
|
+
link (str): The url to be used in the event
|
943
|
+
variant_obj (dict): A variant object
|
944
|
+
ccv_str (str): The new ClinGen-CGC-VIGG classification string
|
945
|
+
|
946
|
+
Returns:
|
947
|
+
updated_variant
|
948
|
+
"""
|
949
|
+
self.create_event(
|
950
|
+
institute=institute_obj,
|
951
|
+
case=case_obj,
|
952
|
+
user=user_obj,
|
953
|
+
link=link,
|
954
|
+
category="variant",
|
955
|
+
verb="ccv",
|
956
|
+
variant=variant_obj,
|
957
|
+
subject=variant_obj["display_name"],
|
958
|
+
)
|
959
|
+
LOG.info(
|
960
|
+
"Setting ClinGen-CGC-VIGG to {} for: {}".format(ccv_str, variant_obj["display_name"])
|
961
|
+
)
|
962
|
+
|
963
|
+
if ccv_str is None:
|
964
|
+
updated_variant = self.variant_collection.find_one_and_update(
|
965
|
+
{"_id": variant_obj["_id"]},
|
966
|
+
{"$unset": {"ccv_classification": 1}},
|
967
|
+
return_document=pymongo.ReturnDocument.AFTER,
|
968
|
+
)
|
969
|
+
else:
|
970
|
+
updated_variant = self.variant_collection.find_one_and_update(
|
971
|
+
{"_id": variant_obj["_id"]},
|
972
|
+
{"$set": {"ccv_classification": REV_CCV_MAP[ccv_str]}},
|
973
|
+
return_document=pymongo.ReturnDocument.AFTER,
|
974
|
+
)
|
975
|
+
|
976
|
+
LOG.debug("Variant updated")
|
977
|
+
return updated_variant
|
scout/build/ccv.py
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
import logging
|
2
|
+
import datetime
|
3
|
+
|
4
|
+
LOG = logging.getLogger(__name__)
|
5
|
+
|
6
|
+
|
7
|
+
def build_ccv_evaluation(
|
8
|
+
variant_specific,
|
9
|
+
variant_id,
|
10
|
+
user_id,
|
11
|
+
user_name,
|
12
|
+
institute_id,
|
13
|
+
case_id,
|
14
|
+
ccv_classification,
|
15
|
+
ccv_criteria,
|
16
|
+
):
|
17
|
+
"""Build a ClinGen-CGC-VIGG evaluation object ready to be inserted to database
|
18
|
+
|
19
|
+
Args:
|
20
|
+
variant_specific(str): md5 string for the specific variant
|
21
|
+
variant_id(str): md5 string for the common variant
|
22
|
+
user_id(str)
|
23
|
+
user_name(str)
|
24
|
+
institute_id(str)
|
25
|
+
case_id(str)
|
26
|
+
ccv_classification(str): The ClinGen-CGC-VIGG classification
|
27
|
+
ccv_criteria(list(dict)): A list of dictionaries with ClinGen-CGC-VIGG criteria
|
28
|
+
|
29
|
+
Returns:
|
30
|
+
evaluation_obj(dict): Correctly formatted evaluation object
|
31
|
+
|
32
|
+
"""
|
33
|
+
LOG.info(
|
34
|
+
"Creating ClinGen-CGC-VIGG classification: %s for variant %s",
|
35
|
+
ccv_classification,
|
36
|
+
variant_id,
|
37
|
+
)
|
38
|
+
ccv_criteria = ccv_criteria or []
|
39
|
+
evaluation_obj = dict(
|
40
|
+
variant_specific=variant_specific,
|
41
|
+
variant_id=variant_id,
|
42
|
+
institute_id=institute_id,
|
43
|
+
case_id=case_id,
|
44
|
+
ccv_classification=ccv_classification,
|
45
|
+
user_id=user_id,
|
46
|
+
user_name=user_name,
|
47
|
+
created_at=datetime.datetime.now(),
|
48
|
+
)
|
49
|
+
criteria_objs = []
|
50
|
+
for info in ccv_criteria:
|
51
|
+
criteria_obj = {}
|
52
|
+
for criterion_key in ["term", "comment", "links", "modifier"]:
|
53
|
+
if criterion_key in info:
|
54
|
+
criteria_obj[criterion_key] = info[criterion_key]
|
55
|
+
criteria_objs.append(criteria_obj)
|
56
|
+
|
57
|
+
evaluation_obj["ccv_criteria"] = criteria_objs
|
58
|
+
|
59
|
+
return evaluation_obj
|
scout/commands/serve.py
CHANGED
@@ -22,7 +22,8 @@ def serve(host, port, debug, livereload, test):
|
|
22
22
|
"""Start the web server."""
|
23
23
|
|
24
24
|
# Verify the database connectivity before launching the app
|
25
|
-
mongo_client = current_app.config.get("MONGO_DATABASE").
|
25
|
+
mongo_client = current_app.config.get("MONGO_DATABASE").client
|
26
|
+
|
26
27
|
try:
|
27
28
|
mongo_client.server_info()
|
28
29
|
if test:
|
scout/constants/__init__.py
CHANGED
@@ -23,6 +23,7 @@ from .case_tags import (
|
|
23
23
|
VERBS_ICONS_MAP,
|
24
24
|
VERBS_MAP,
|
25
25
|
)
|
26
|
+
from .ccv import CCV_COMPLETE_MAP, CCV_CRITERIA, CCV_MAP, CCV_OPTIONS, REV_CCV_MAP
|
26
27
|
from .clinvar import (
|
27
28
|
AFFECTED_STATUS,
|
28
29
|
ALLELE_OF_ORIGIN,
|
@@ -126,6 +127,7 @@ COLLECTIONS = [
|
|
126
127
|
"disease_term",
|
127
128
|
"variant",
|
128
129
|
"acmg",
|
130
|
+
"ccv",
|
129
131
|
]
|
130
132
|
|
131
133
|
BUILDS = ["37", "38", "GRCh38"]
|
scout/constants/case_tags.py
CHANGED
@@ -43,6 +43,7 @@ CASE_REPORT_VARIANT_TYPES = {
|
|
43
43
|
"partial_causatives_detailed": "partial_causatives",
|
44
44
|
"suspects_detailed": "suspects",
|
45
45
|
"classified_detailed": "acmg_classification",
|
46
|
+
"ccv_classified_detailed": "ccv_classification",
|
46
47
|
"tagged_detailed": "manual_rank",
|
47
48
|
"tier_detailed": "cancer_tier",
|
48
49
|
"dismissed_detailed": "dismiss_variant",
|
@@ -105,6 +106,7 @@ CASE_TAGS = {
|
|
105
106
|
|
106
107
|
VERBS_MAP = {
|
107
108
|
"acmg": "updated ACMG classification for",
|
109
|
+
"ccv": "updated ClinGen-CGC-VIGG classification for",
|
108
110
|
"add_case": "added case",
|
109
111
|
"add_cohort": "updated cohort for",
|
110
112
|
"add_phenotype": "added HPO term for",
|
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
|