scout-browser 4.82.2__py3-none-any.whl → 4.83__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/client.py +1 -0
- scout/adapter/mongo/base.py +0 -1
- scout/adapter/mongo/case.py +15 -37
- scout/adapter/mongo/case_events.py +98 -2
- scout/adapter/mongo/hgnc.py +39 -22
- scout/adapter/mongo/institute.py +3 -9
- scout/adapter/mongo/panel.py +2 -1
- scout/adapter/mongo/variant.py +3 -2
- scout/adapter/mongo/variant_loader.py +92 -79
- scout/commands/base.py +1 -0
- scout/commands/update/case.py +10 -10
- scout/commands/update/individual.py +6 -1
- scout/constants/file_types.py +4 -0
- scout/load/__init__.py +0 -1
- scout/load/all.py +3 -4
- scout/load/panel.py +8 -4
- scout/load/setup.py +1 -0
- scout/models/case/case_loading_models.py +6 -16
- scout/parse/case.py +0 -1
- scout/parse/disease_terms.py +1 -0
- scout/parse/omim.py +1 -0
- scout/parse/panel.py +40 -15
- scout/resources/__init__.py +3 -0
- scout/server/app.py +4 -50
- scout/server/blueprints/alignviewers/controllers.py +15 -17
- scout/server/blueprints/alignviewers/templates/alignviewers/igv_viewer.html +13 -3
- scout/server/blueprints/alignviewers/views.py +10 -15
- scout/server/blueprints/cases/controllers.py +70 -73
- scout/server/blueprints/cases/templates/cases/case.html +37 -21
- scout/server/blueprints/cases/templates/cases/collapsible_actionbar.html +1 -1
- scout/server/blueprints/cases/templates/cases/phenotype.html +8 -6
- scout/server/blueprints/cases/templates/cases/utils.html +3 -3
- scout/server/blueprints/cases/views.py +8 -6
- scout/server/blueprints/variant/controllers.py +5 -5
- scout/server/blueprints/variant/templates/variant/acmg.html +25 -16
- scout/server/blueprints/variant/templates/variant/components.html +11 -6
- scout/server/blueprints/variant/views.py +5 -2
- scout/server/blueprints/variants/controllers.py +1 -1
- scout/server/blueprints/variants/views.py +1 -1
- scout/server/config.py +16 -4
- scout/server/extensions/__init__.py +4 -2
- scout/server/extensions/beacon_extension.py +1 -0
- scout/server/extensions/chanjo_extension.py +58 -0
- scout/server/extensions/phenopacket_extension.py +1 -0
- scout/server/static/bs_styles.css +18 -0
- scout/server/utils.py +16 -2
- scout/utils/acmg.py +33 -20
- scout/utils/track_resources.py +70 -0
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/METADATA +1 -1
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/RECORD +55 -55
- scout/load/case.py +0 -36
- scout/utils/cloud_resources.py +0 -61
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/LICENSE +0 -0
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/WHEEL +0 -0
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/entry_points.txt +0 -0
- {scout_browser-4.82.2.dist-info → scout_browser-4.83.dist-info}/top_level.txt +0 -0
scout/load/case.py
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
import logging
|
3
|
-
|
4
|
-
from scout.exceptions import IntegrityError
|
5
|
-
|
6
|
-
logger = logging.getLogger(__name__)
|
7
|
-
|
8
|
-
|
9
|
-
def load_case(adapter, case_obj, update=False):
|
10
|
-
"""Load a case into the database
|
11
|
-
|
12
|
-
If the case already exists the function will exit.
|
13
|
-
If the user want to load a case that is already in the database
|
14
|
-
'update' has to be 'True'
|
15
|
-
|
16
|
-
Args:
|
17
|
-
adapter (MongoAdapter): connection to the database
|
18
|
-
case_obj (dict): case object to persist to the database
|
19
|
-
update(bool): If existing case should be updated
|
20
|
-
|
21
|
-
Returns:
|
22
|
-
case_obj(dict): A dictionary with the builded case
|
23
|
-
"""
|
24
|
-
logger.info("Loading case {} into database".format(case_obj["display_name"]))
|
25
|
-
|
26
|
-
# Check if case exists in database
|
27
|
-
existing_case = adapter.case(case_obj["_id"])
|
28
|
-
|
29
|
-
if existing_case:
|
30
|
-
if update:
|
31
|
-
adapter.update_case(case_obj)
|
32
|
-
else:
|
33
|
-
raise IntegrityError("Case {0} already exists in database".format(case_obj["_id"]))
|
34
|
-
else:
|
35
|
-
adapter.add_case(case_obj)
|
36
|
-
return case_obj
|
scout/utils/cloud_resources.py
DELETED
@@ -1,61 +0,0 @@
|
|
1
|
-
# coding=UTF-8
|
2
|
-
import logging
|
3
|
-
|
4
|
-
LOG = logging.getLogger(__name__)
|
5
|
-
|
6
|
-
REQUIRED_FIELDS = ["name", "type", "url"]
|
7
|
-
TRACK_KEYS = ["name", "type", "format", "url", "indexURL"]
|
8
|
-
|
9
|
-
|
10
|
-
class AlignTrackHandler:
|
11
|
-
"""Class collecting external IGV tracks stored in the cloud"""
|
12
|
-
|
13
|
-
def init_app(self, app):
|
14
|
-
self.public_tracks = self.set_public_tracks(app.config["CLOUD_IGV_TRACKS"])
|
15
|
-
|
16
|
-
def track_template(self, track_info):
|
17
|
-
"""Provides the template for a VCF track object"""
|
18
|
-
track = {}
|
19
|
-
|
20
|
-
for key in TRACK_KEYS:
|
21
|
-
if key in track_info:
|
22
|
-
track[key] = track_info[key]
|
23
|
-
|
24
|
-
# Save track only of it contains the minimal required keys
|
25
|
-
if all(track.get(key) for key in REQUIRED_FIELDS):
|
26
|
-
return track
|
27
|
-
|
28
|
-
def set_public_tracks(self, bucket_list):
|
29
|
-
"""Return a list of public IGV tracks stored on the cloud
|
30
|
-
|
31
|
-
Args:
|
32
|
-
bucket_list(list): a list of cloud bucket dictionaries containing IGV tracks, can be public or private
|
33
|
-
|
34
|
-
Returns:
|
35
|
-
public_tracks(dict): a list of public access tracks stored on the cloud, where key is genome build
|
36
|
-
"""
|
37
|
-
public_tracks = {}
|
38
|
-
# Loop over the bucket list and collect all public tracks
|
39
|
-
for bucket_obj in bucket_list:
|
40
|
-
if bucket_obj.get("access") == "private" or None:
|
41
|
-
continue
|
42
|
-
for track in bucket_obj.get("tracks", []):
|
43
|
-
build = track.get("build")
|
44
|
-
if build not in ["37", "38"]:
|
45
|
-
LOG.warning(
|
46
|
-
f"One or more IGV cloud public tracks could not be used, Please provide a genome build ('37', '38') for it."
|
47
|
-
)
|
48
|
-
continue
|
49
|
-
track_obj = self.track_template(track)
|
50
|
-
if track_obj is None:
|
51
|
-
LOG.warning(
|
52
|
-
f"One or more IGV cloud public tracks could not be used, Please provide all required keys:{REQUIRED_FIELDS}"
|
53
|
-
)
|
54
|
-
continue
|
55
|
-
if build in public_tracks:
|
56
|
-
public_tracks[build].append(track_obj)
|
57
|
-
else:
|
58
|
-
public_tracks[build] = [track_obj]
|
59
|
-
|
60
|
-
if public_tracks != {}:
|
61
|
-
return public_tracks
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|