cg 80.1.0__py3-none-any.whl → 83.14.0__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.
- cg/__init__.py +1 -1
- cg/apps/housekeeper/hk.py +1 -1
- cg/apps/tb/api.py +1 -1
- cg/cli/upload/mutacc.py +16 -3
- cg/cli/upload/scout.py +2 -2
- cg/cli/upload/utils.py +10 -1
- cg/cli/workflow/balsamic/base.py +29 -4
- cg/cli/workflow/microsalt/base.py +3 -1
- cg/cli/workflow/nallo/base.py +18 -38
- cg/cli/workflow/nf_analysis.py +2 -203
- cg/cli/workflow/raredisease/base.py +33 -51
- cg/cli/workflow/rnafusion/base.py +28 -3
- cg/cli/workflow/taxprofiler/base.py +21 -13
- cg/cli/workflow/tomte/base.py +17 -19
- cg/constants/constants.py +3 -3
- cg/constants/devices.py +6 -1
- cg/constants/gene_panel.py +3 -1
- cg/constants/lims.py +4 -0
- cg/constants/orderforms.py +1 -1
- cg/constants/pacbio.py +1 -0
- cg/constants/scout.py +6 -4
- cg/exc.py +12 -4
- cg/meta/compress/compress.py +7 -2
- cg/meta/delivery_report/nallo.py +1 -1
- cg/meta/delivery_report/templates/macros/ticket_system.html +1 -1
- cg/meta/observations/balsamic_observations_api.py +1 -1
- cg/meta/observations/mip_dna_observations_api.py +1 -1
- cg/meta/observations/nallo_observations_api.py +1 -1
- cg/meta/observations/observations_api.py +1 -1
- cg/meta/observations/raredisease_observations_api.py +1 -1
- cg/meta/tar/tar.py +5 -2
- cg/meta/upload/coverage.py +5 -5
- cg/meta/upload/raredisease/raredisease.py +3 -0
- cg/meta/upload/scout/nallo_config_builder.py +14 -0
- cg/meta/workflow/nallo.py +22 -95
- cg/meta/workflow/nf_analysis.py +11 -262
- cg/meta/workflow/raredisease.py +3 -112
- cg/meta/workflow/rnafusion.py +2 -34
- cg/meta/workflow/taxprofiler.py +2 -38
- cg/meta/workflow/tomte.py +2 -42
- cg/models/deliverables/metric_deliverables.py +1 -1
- cg/models/nallo/nallo.py +14 -64
- cg/models/nf_analysis.py +1 -41
- cg/models/raredisease/raredisease.py +0 -62
- cg/models/rnafusion/rnafusion.py +0 -26
- cg/models/scout/scout_load_config.py +1 -0
- cg/models/taxprofiler/taxprofiler.py +0 -42
- cg/models/tomte/tomte.py +0 -69
- cg/resources/nallo_bundle_filenames.yaml +282 -22
- cg/resources/raredisease_bundle_filenames.yaml +11 -1
- cg/resources/taxprofiler_bundle_filenames.yaml +20 -0
- cg/server/admin.py +51 -24
- cg/server/app.py +15 -4
- cg/server/endpoints/sequencing_run/dtos.py +21 -3
- cg/server/endpoints/sequencing_run/pacbio_sequencing_run.py +29 -10
- cg/server/endpoints/sequencing_run/pacbio_smrt_cell_metrics.py +20 -0
- cg/services/analysis_starter/configurator/configurator.py +1 -1
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/models.py +40 -1
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/nallo.py +3 -1
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/tomte_params_file_creator.py +3 -1
- cg/services/analysis_starter/factories/configurator_factory.py +4 -4
- cg/services/analysis_starter/tracker/implementations/balsamic.py +4 -1
- cg/services/analysis_starter/tracker/implementations/microsalt.py +4 -4
- cg/services/analysis_starter/tracker/implementations/mip_dna.py +4 -1
- cg/services/analysis_starter/tracker/implementations/nextflow_tracker.py +6 -4
- cg/services/analysis_starter/tracker/tracker.py +10 -6
- cg/services/illumina/backup/backup_service.py +29 -7
- cg/services/orders/validation/constants.py +3 -0
- cg/services/orders/validation/index_sequences.py +558 -0
- cg/services/run_devices/pacbio/data_storage_service/pacbio_store_service.py +39 -18
- cg/services/run_devices/pacbio/data_transfer_service/data_transfer_service.py +8 -2
- cg/services/run_devices/pacbio/data_transfer_service/dto.py +9 -3
- cg/services/run_devices/pacbio/data_transfer_service/utils.py +14 -7
- cg/services/run_devices/pacbio/metrics_parser/models.py +1 -0
- cg/services/run_devices/pacbio/sequencing_runs_service.py +35 -7
- cg/services/sequencing_qc_service/quality_checks/checks.py +18 -16
- cg/services/sequencing_qc_service/quality_checks/utils.py +82 -18
- cg/services/sequencing_qc_service/sequencing_qc_service.py +12 -10
- cg/store/crud/create.py +73 -42
- cg/store/crud/read.py +50 -2
- cg/store/crud/update.py +14 -3
- cg/store/models.py +88 -31
- cg/store/store.py +8 -1
- {cg-80.1.0.dist-info → cg-83.14.0.dist-info}/METADATA +1 -1
- {cg-80.1.0.dist-info → cg-83.14.0.dist-info}/RECORD +91 -90
- /cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{nallo.py → nallo_sample_sheet_creator.py} +0 -0
- /cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{raredisease.py → raredisease_sample_sheet_creator.py} +0 -0
- /cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{rnafusion.py → rnafusion_sample_sheet_creator.py} +0 -0
- /cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{taxprofiler.py → taxprofiler_sample_sheet_creator.py} +0 -0
- {cg-80.1.0.dist-info → cg-83.14.0.dist-info}/WHEEL +0 -0
- {cg-80.1.0.dist-info → cg-83.14.0.dist-info}/entry_points.txt +0 -0
|
@@ -48,7 +48,15 @@ rnafusion.add_command(store_available)
|
|
|
48
48
|
@ARGUMENT_CASE_ID
|
|
49
49
|
@click.pass_obj
|
|
50
50
|
def config_case(cg_config: CGConfig, case_id: str):
|
|
51
|
-
"""
|
|
51
|
+
"""
|
|
52
|
+
Configure an RNAFUSION case so that it is ready to be run.
|
|
53
|
+
|
|
54
|
+
\b
|
|
55
|
+
Creates the following files in the case run directory:
|
|
56
|
+
- CASE_ID_params_file.yaml
|
|
57
|
+
- CASE_ID_nextflow_config.json
|
|
58
|
+
- CASE_ID_samplesheet.csv
|
|
59
|
+
"""
|
|
52
60
|
factory = ConfiguratorFactory(cg_config)
|
|
53
61
|
configurator = cast(NextflowConfigurator, factory.get_configurator(Workflow.RNAFUSION))
|
|
54
62
|
configurator.configure(case_id=case_id)
|
|
@@ -60,7 +68,15 @@ def config_case(cg_config: CGConfig, case_id: str):
|
|
|
60
68
|
@ARGUMENT_CASE_ID
|
|
61
69
|
@click.pass_obj
|
|
62
70
|
def run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | None):
|
|
63
|
-
"""
|
|
71
|
+
"""
|
|
72
|
+
Run a preconfigured RNAFUSION case.
|
|
73
|
+
|
|
74
|
+
\b
|
|
75
|
+
Assumes that the following files exist in the case run directory:
|
|
76
|
+
- CASE_ID_params_file.yaml
|
|
77
|
+
- CASE_ID_nextflow_config.json
|
|
78
|
+
- CASE_ID_samplesheet.csv
|
|
79
|
+
"""
|
|
64
80
|
factory = AnalysisStarterFactory(cg_config)
|
|
65
81
|
analysis_starter: AnalysisStarter = factory.get_analysis_starter_for_workflow(
|
|
66
82
|
Workflow.RNAFUSION
|
|
@@ -73,7 +89,16 @@ def run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | None):
|
|
|
73
89
|
@ARGUMENT_CASE_ID
|
|
74
90
|
@click.pass_obj
|
|
75
91
|
def start(cg_config: CGConfig, case_id: str, revision: str | None):
|
|
76
|
-
"""
|
|
92
|
+
"""
|
|
93
|
+
Start an RNAFUSION case. Configures the case if needed.
|
|
94
|
+
|
|
95
|
+
\b
|
|
96
|
+
Configures the case and writes the following files:
|
|
97
|
+
- CASE_ID_params_file.yaml
|
|
98
|
+
- CASE_ID_nextflow_config.json
|
|
99
|
+
- CASE_ID_samplesheet.csv
|
|
100
|
+
and submits the job to the Seqera Platform.
|
|
101
|
+
"""
|
|
77
102
|
LOG.info(f"Starting RNAFUSION workflow for case {case_id}.")
|
|
78
103
|
factory = AnalysisStarterFactory(cg_config)
|
|
79
104
|
analysis_starter: AnalysisStarter = factory.get_analysis_starter_for_workflow(
|
|
@@ -41,11 +41,14 @@ def taxprofiler(context: click.Context) -> None:
|
|
|
41
41
|
@ARGUMENT_CASE_ID
|
|
42
42
|
@click.pass_obj
|
|
43
43
|
def start(cg_config: CGConfig, case_id: str, revision: str | None) -> None:
|
|
44
|
-
"""
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
"""
|
|
45
|
+
Start a Taxprofiler case.
|
|
46
|
+
|
|
47
|
+
\b
|
|
48
|
+
Configures the case and writes the following files:
|
|
49
|
+
- CASE_ID_params_file.yaml
|
|
50
|
+
- CASE_ID_nextflow_config.json
|
|
51
|
+
- CASE_ID_samplesheet.csv
|
|
49
52
|
and submits the job to the Seqera Platform.
|
|
50
53
|
"""
|
|
51
54
|
factory = AnalysisStarterFactory(cg_config)
|
|
@@ -75,10 +78,13 @@ def start_available(cg_config: CGConfig) -> None:
|
|
|
75
78
|
@ARGUMENT_CASE_ID
|
|
76
79
|
@click.pass_obj
|
|
77
80
|
def run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | None) -> None:
|
|
78
|
-
"""
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
"""
|
|
82
|
+
Run a preconfigured Taxprofiler case.
|
|
83
|
+
|
|
84
|
+
\b
|
|
85
|
+
Assumes that the following files are in the case run directory:
|
|
86
|
+
- CASE_ID_params_file.yaml
|
|
87
|
+
- CASE_ID_nextflow_config.json
|
|
82
88
|
- CASE_ID_samplesheet.csv
|
|
83
89
|
"""
|
|
84
90
|
factory = AnalysisStarterFactory(cg_config)
|
|
@@ -92,10 +98,12 @@ def run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | None) -
|
|
|
92
98
|
@ARGUMENT_CASE_ID
|
|
93
99
|
@click.pass_obj
|
|
94
100
|
def config_case(cg_config: CGConfig, case_id: str) -> None:
|
|
95
|
-
"""Configure a Taxprofiler case so that it is ready to be run.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
101
|
+
"""Configure a Taxprofiler case so that it is ready to be run.
|
|
102
|
+
|
|
103
|
+
\b
|
|
104
|
+
Creates the following files in the case run directory:
|
|
105
|
+
- CASE_ID_params_file.yaml
|
|
106
|
+
- CASE_ID_nextflow_config.json
|
|
99
107
|
- CASE_ID_samplesheet.csv
|
|
100
108
|
"""
|
|
101
109
|
factory = ConfiguratorFactory(cg_config)
|
cg/cli/workflow/tomte/base.py
CHANGED
|
@@ -10,12 +10,8 @@ from cg.cli.workflow.commands import ARGUMENT_CASE_ID, resolve_compression
|
|
|
10
10
|
from cg.cli.workflow.nf_analysis import (
|
|
11
11
|
OPTION_RESUME,
|
|
12
12
|
OPTION_REVISION,
|
|
13
|
-
config_case,
|
|
14
13
|
metrics_deliver,
|
|
15
14
|
report_deliver,
|
|
16
|
-
run,
|
|
17
|
-
start,
|
|
18
|
-
start_available,
|
|
19
15
|
store,
|
|
20
16
|
store_available,
|
|
21
17
|
store_housekeeper,
|
|
@@ -41,10 +37,6 @@ def tomte(context: click.Context) -> None:
|
|
|
41
37
|
|
|
42
38
|
|
|
43
39
|
tomte.add_command(resolve_compression)
|
|
44
|
-
tomte.add_command(config_case)
|
|
45
|
-
tomte.add_command(run)
|
|
46
|
-
tomte.add_command(start)
|
|
47
|
-
tomte.add_command(start_available)
|
|
48
40
|
tomte.add_command(metrics_deliver)
|
|
49
41
|
tomte.add_command(report_deliver)
|
|
50
42
|
tomte.add_command(store_housekeeper)
|
|
@@ -52,12 +44,14 @@ tomte.add_command(store)
|
|
|
52
44
|
tomte.add_command(store_available)
|
|
53
45
|
|
|
54
46
|
|
|
55
|
-
@tomte.command("
|
|
47
|
+
@tomte.command("config-case")
|
|
56
48
|
@ARGUMENT_CASE_ID
|
|
57
49
|
@click.pass_obj
|
|
58
|
-
def
|
|
50
|
+
def config_case(cg_config: CGConfig, case_id: str):
|
|
59
51
|
"""
|
|
60
|
-
Configure a Tomte case so that it is ready to be run.
|
|
52
|
+
Configure a Tomte case so that it is ready to be run.
|
|
53
|
+
|
|
54
|
+
\b
|
|
61
55
|
Creates the following files in the case run directory:
|
|
62
56
|
- CASE_ID_params_file.yaml
|
|
63
57
|
- CASE_ID_nextflow_config.json
|
|
@@ -69,14 +63,16 @@ def dev_config_case(cg_config: CGConfig, case_id: str):
|
|
|
69
63
|
configurator.configure(case_id=case_id)
|
|
70
64
|
|
|
71
65
|
|
|
72
|
-
@tomte.command("
|
|
66
|
+
@tomte.command("run")
|
|
73
67
|
@OPTION_REVISION
|
|
74
68
|
@OPTION_RESUME
|
|
75
69
|
@ARGUMENT_CASE_ID
|
|
76
70
|
@click.pass_obj
|
|
77
|
-
def
|
|
71
|
+
def run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | None) -> None:
|
|
78
72
|
"""
|
|
79
|
-
Run a preconfigured Tomte case.
|
|
73
|
+
Run a preconfigured Tomte case.
|
|
74
|
+
|
|
75
|
+
\b
|
|
80
76
|
Assumes that the following files exist in the case run directory:
|
|
81
77
|
- CASE_ID_params_file.yaml
|
|
82
78
|
- CASE_ID_nextflow_config.json
|
|
@@ -88,13 +84,15 @@ def dev_run(cg_config: CGConfig, case_id: str, resume: bool, revision: str | Non
|
|
|
88
84
|
analysis_starter.run(case_id=case_id, resume=resume, revision=revision)
|
|
89
85
|
|
|
90
86
|
|
|
91
|
-
@tomte.command("
|
|
87
|
+
@tomte.command("start")
|
|
92
88
|
@OPTION_REVISION
|
|
93
89
|
@ARGUMENT_CASE_ID
|
|
94
90
|
@click.pass_obj
|
|
95
|
-
def
|
|
91
|
+
def start(cg_config: CGConfig, case_id: str, revision: str | None):
|
|
96
92
|
"""
|
|
97
|
-
Start a Tomte case.
|
|
93
|
+
Start a Tomte case.
|
|
94
|
+
|
|
95
|
+
\b
|
|
98
96
|
Configures the case and writes the following files:
|
|
99
97
|
- CASE_ID_params_file.yaml
|
|
100
98
|
- CASE_ID_nextflow_config.json
|
|
@@ -107,9 +105,9 @@ def dev_start(cg_config: CGConfig, case_id: str, revision: str | None):
|
|
|
107
105
|
analysis_starter.start(case_id=case_id, revision=revision)
|
|
108
106
|
|
|
109
107
|
|
|
110
|
-
@tomte.command("
|
|
108
|
+
@tomte.command("start-available")
|
|
111
109
|
@click.pass_obj
|
|
112
|
-
def
|
|
110
|
+
def start_available(cg_config: CGConfig):
|
|
113
111
|
"""Starts all available Tomte cases."""
|
|
114
112
|
LOG.info("Starting Tomte workflow for all available cases.")
|
|
115
113
|
factory = AnalysisStarterFactory(cg_config)
|
cg/constants/constants.py
CHANGED
|
@@ -100,9 +100,9 @@ class CancerAnalysisType(StrEnum):
|
|
|
100
100
|
|
|
101
101
|
|
|
102
102
|
class SexOptions(StrEnum):
|
|
103
|
-
MALE
|
|
104
|
-
FEMALE
|
|
105
|
-
UNKNOWN
|
|
103
|
+
MALE = "male"
|
|
104
|
+
FEMALE = "female"
|
|
105
|
+
UNKNOWN = "unknown"
|
|
106
106
|
|
|
107
107
|
|
|
108
108
|
SARS_COV_REGEX = "^[0-9]{2}CS[0-9]{6}$"
|
cg/constants/devices.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Enums for run_devices."""
|
|
2
2
|
|
|
3
|
-
from enum import Enum, auto
|
|
3
|
+
from enum import Enum, StrEnum, auto
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class DeviceType(Enum):
|
|
@@ -8,3 +8,8 @@ class DeviceType(Enum):
|
|
|
8
8
|
BIONANO = auto()
|
|
9
9
|
OXFORD_NANOPORE = auto()
|
|
10
10
|
PACBIO = auto()
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RevioNames(StrEnum):
|
|
14
|
+
BETTY = "Betty"
|
|
15
|
+
WILMA = "Wilma"
|
cg/constants/gene_panel.py
CHANGED
|
@@ -20,6 +20,7 @@ class GenePanelMasterList(StrEnum):
|
|
|
20
20
|
CH = "CH"
|
|
21
21
|
CHILDHYPOTONIA = "CHILDHYPOTONIA"
|
|
22
22
|
CTD = "CTD"
|
|
23
|
+
COMPD = "COMPD"
|
|
23
24
|
DIAB = "DIAB"
|
|
24
25
|
ENDO = "ENDO"
|
|
25
26
|
EP = "EP"
|
|
@@ -35,6 +36,7 @@ class GenePanelMasterList(StrEnum):
|
|
|
35
36
|
MTDNA = "mtDNA"
|
|
36
37
|
NBS_M = "NBS-M"
|
|
37
38
|
NEURODEG = "NEURODEG"
|
|
39
|
+
NOONAN = "NOONAN"
|
|
38
40
|
NMD = "NMD"
|
|
39
41
|
OMIM_AUTO = "OMIM-AUTO"
|
|
40
42
|
OPTIC = "OPTIC"
|
|
@@ -47,7 +49,7 @@ class GenePanelMasterList(StrEnum):
|
|
|
47
49
|
SOVM = "SOVM"
|
|
48
50
|
STROKE = "STROKE"
|
|
49
51
|
AID = "AID"
|
|
50
|
-
|
|
52
|
+
IHC = "IHC"
|
|
51
53
|
VEO_IBD = "VEO-IBD"
|
|
52
54
|
KIDNEY = "Kidney"
|
|
53
55
|
CAKUT = "CAKUT"
|
cg/constants/lims.py
CHANGED
|
@@ -145,6 +145,10 @@ MASTER_STEPS_UDFS = {
|
|
|
145
145
|
"atlas_document": "Sequencing Method",
|
|
146
146
|
"atlas_version": "Atlas Version",
|
|
147
147
|
},
|
|
148
|
+
"Set Up Sequencing Run (Revio) v2": {
|
|
149
|
+
"atlas_document": "Sequencing Method",
|
|
150
|
+
"atlas_version": "Atlas Version",
|
|
151
|
+
},
|
|
148
152
|
},
|
|
149
153
|
"delivery_method_step": {
|
|
150
154
|
"CG002 - Delivery": {
|
cg/constants/orderforms.py
CHANGED
|
@@ -31,7 +31,7 @@ class Orderform(StrEnum):
|
|
|
31
31
|
"""Returns the current version of the given order form."""
|
|
32
32
|
current_order_form_versions = {
|
|
33
33
|
Orderform.MIP_DNA: "35",
|
|
34
|
-
Orderform.RML: "
|
|
34
|
+
Orderform.RML: "21",
|
|
35
35
|
Orderform.MICROSALT: "12",
|
|
36
36
|
Orderform.NALLO: "1",
|
|
37
37
|
Orderform.SARS_COV_2: "10",
|
cg/constants/pacbio.py
CHANGED
|
@@ -64,6 +64,7 @@ class SmrtLinkDatabasesAliases:
|
|
|
64
64
|
BIO_SAMPLE_NAME: str = "bioSampleName"
|
|
65
65
|
CELL_ID: str = "cellId"
|
|
66
66
|
CELL_INDEX: str = "cellIndex"
|
|
67
|
+
INSTRUMENT_NAME: str = "instrumentName"
|
|
67
68
|
MOVIE_NAME: str = "metadataContextId"
|
|
68
69
|
PATH: str = "path"
|
|
69
70
|
RUN_COMPLETED_AT = "createdAt"
|
cg/constants/scout.py
CHANGED
|
@@ -66,12 +66,12 @@ NALLO_CASE_TAGS = dict(
|
|
|
66
66
|
multiqc={"multiqc-html"},
|
|
67
67
|
peddy_check={"ped-check", "peddy"},
|
|
68
68
|
peddy_ped={"ped", "peddy"},
|
|
69
|
-
|
|
70
|
-
vcf_snv_research={"vcf-snv-research"},
|
|
69
|
+
somalier_samples={"somalier", "relate-samples"},
|
|
71
70
|
vcf_snv={"vcf-snv-clinical"},
|
|
72
|
-
|
|
73
|
-
vcf_sv={"vcf-sv-clinical"},
|
|
71
|
+
vcf_snv_research={"vcf-snv-research"},
|
|
74
72
|
vcf_str={"vcf-str"},
|
|
73
|
+
vcf_sv={"vcf-sv-clinical"},
|
|
74
|
+
vcf_sv_research={"vcf-sv-research"},
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
MIP_CASE_TAGS: dict[str, set[str]] = dict(
|
|
@@ -138,6 +138,8 @@ RAREDISEASE_SAMPLE_TAGS: dict[str, set[str]] = dict(
|
|
|
138
138
|
NALLO_SAMPLE_TAGS: dict[str, set[str]] = dict(
|
|
139
139
|
alignment_path={AlignmentFileTag.BAM, "haplotags"},
|
|
140
140
|
assembly_alignment_path={AlignmentFileTag.BAM, "assembly"},
|
|
141
|
+
chromograph_autozyg={"chromograph", "autozyg"},
|
|
142
|
+
chromograph_coverage={"chromograph", "tcov"},
|
|
141
143
|
d4_file={"coverage", "d4"},
|
|
142
144
|
hificnv_coverage={"hificnv", "bigwig"},
|
|
143
145
|
paraphase_alignment_path={AlignmentFileTag.BAM, NalloAnalysisTag.PARAPHASE},
|
cg/exc.py
CHANGED
|
@@ -150,6 +150,14 @@ class IlluminaRunAlreadyBackedUpError(CgError):
|
|
|
150
150
|
"""Raised when a flow cell is already backed-up."""
|
|
151
151
|
|
|
152
152
|
|
|
153
|
+
class PacbioSequencingRunAlreadyExistsError(CgError):
|
|
154
|
+
"""Raised when a PacBio sequencing run already exists."""
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
class PacbioSequencingRunNotFoundError(CgError):
|
|
158
|
+
"""Raised when a PacBio sequencing run is not found."""
|
|
159
|
+
|
|
160
|
+
|
|
153
161
|
class HousekeeperFileMissingError(CgError):
|
|
154
162
|
"""
|
|
155
163
|
Exception raised when a file is missing in Housekeeper.
|
|
@@ -216,10 +224,6 @@ class RunParametersError(CgError):
|
|
|
216
224
|
"""Raised when something is wrong with the run parameters file."""
|
|
217
225
|
|
|
218
226
|
|
|
219
|
-
class NfSampleSheetError(CgError):
|
|
220
|
-
"""Raised when something is wrong with the sample sheet."""
|
|
221
|
-
|
|
222
|
-
|
|
223
227
|
class SampleSheetContentError(CgError):
|
|
224
228
|
"""Raised when something is wrong with the sample sheet content."""
|
|
225
229
|
|
|
@@ -350,3 +354,7 @@ class MissingConfigFilesError(CgError):
|
|
|
350
354
|
|
|
351
355
|
class SeqeraError(CgError):
|
|
352
356
|
"""Exception raised when receiving an unexpected response from Seqera platform"""
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
class ApplicationDoesNotHaveHiFiYieldError(CgError):
|
|
360
|
+
"""Exception raised when application does not have HiFi yield set."""
|
cg/meta/compress/compress.py
CHANGED
|
@@ -96,8 +96,13 @@ class CompressAPI:
|
|
|
96
96
|
def decompress_case(self, case: Case) -> None:
|
|
97
97
|
"""Decompresses all Spring files tied to the case.
|
|
98
98
|
Raises:
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
DecompressionCouldNotStartError if no sample could start decompressing.
|
|
100
|
+
"""
|
|
101
|
+
success = False
|
|
102
|
+
for sample in case.samples:
|
|
103
|
+
if self.decompress_spring(sample.internal_id):
|
|
104
|
+
success = True
|
|
105
|
+
if not success:
|
|
101
106
|
raise DecompressionCouldNotStartError(
|
|
102
107
|
f"No sample could be decompressed for {case.internal_id}"
|
|
103
108
|
)
|
cg/meta/delivery_report/nallo.py
CHANGED
|
@@ -52,7 +52,7 @@ class NalloDeliveryReportAPI(DeliveryReportAPI):
|
|
|
52
52
|
median_coverage=sample_metrics.median_coverage,
|
|
53
53
|
million_read_pairs=get_million_read_pairs(sample.reads),
|
|
54
54
|
pct_10x=coverage_metrics.coverage_completeness_percent if coverage_metrics else None,
|
|
55
|
-
sex=sample_metrics.
|
|
55
|
+
sex=sample_metrics.predicted_sex,
|
|
56
56
|
)
|
|
57
57
|
|
|
58
58
|
def is_report_accredited(
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="container">
|
|
3
3
|
<div class="alert alert-info" role="alert">
|
|
4
4
|
All kommunikation gällande ordern, såsom tillägg, avvikelser eller ev undantag i metoden från
|
|
5
|
-
Clinical Genomics, finns tillgänglig i
|
|
5
|
+
Clinical Genomics, finns tillgänglig i Freshdesk och är länkad till ärendets ticket:
|
|
6
6
|
<a class="alert-link">#{{ ticket_id }}</a>. En stängd ticket kan närsomhelst öppnas upp igen för frågor.
|
|
7
7
|
</div>
|
|
8
8
|
</div>
|
|
@@ -82,7 +82,7 @@ class BalsamicObservationsAPI(ObservationsAPI):
|
|
|
82
82
|
[
|
|
83
83
|
self.is_customer_eligible_for_observations_upload(case.customer.internal_id),
|
|
84
84
|
self.is_analysis_type_eligible_for_observations_upload(case),
|
|
85
|
-
self.
|
|
85
|
+
self.is_sample_source_type_not_ffpe(case.internal_id),
|
|
86
86
|
self.is_panel_allowed_for_observations_upload(case),
|
|
87
87
|
]
|
|
88
88
|
)
|
|
@@ -58,7 +58,7 @@ class MipDNAObservationsAPI(ObservationsAPI):
|
|
|
58
58
|
self.is_customer_eligible_for_observations_upload(case.customer.internal_id),
|
|
59
59
|
self.is_sequencing_method_eligible_for_observations_upload(case.internal_id),
|
|
60
60
|
self.is_sample_type_eligible_for_observations_upload(case),
|
|
61
|
-
self.
|
|
61
|
+
self.is_sample_source_type_not_ffpe(case.internal_id),
|
|
62
62
|
]
|
|
63
63
|
)
|
|
64
64
|
|
|
@@ -59,7 +59,7 @@ class NalloObservationsAPI(ObservationsAPI):
|
|
|
59
59
|
self.is_customer_eligible_for_observations_upload(case.customer.internal_id),
|
|
60
60
|
self.is_sequencing_method_eligible_for_observations_upload(case.internal_id),
|
|
61
61
|
self.is_sample_type_eligible_for_observations_upload(case),
|
|
62
|
-
self.
|
|
62
|
+
self.is_sample_source_type_not_ffpe(case.internal_id),
|
|
63
63
|
]
|
|
64
64
|
)
|
|
65
65
|
|
|
@@ -132,7 +132,7 @@ class ObservationsAPI:
|
|
|
132
132
|
return False
|
|
133
133
|
return True
|
|
134
134
|
|
|
135
|
-
def
|
|
135
|
+
def is_sample_source_type_not_ffpe(self, case_id: str) -> bool:
|
|
136
136
|
source_type: str | None = self.analysis_api.get_case_source_type(case_id)
|
|
137
137
|
if source_type and SourceType.FFPE.lower() not in source_type.lower():
|
|
138
138
|
return True
|
|
@@ -58,7 +58,7 @@ class RarediseaseObservationsAPI(ObservationsAPI):
|
|
|
58
58
|
self.is_customer_eligible_for_observations_upload(case.customer.internal_id),
|
|
59
59
|
self.is_sequencing_method_eligible_for_observations_upload(case.internal_id),
|
|
60
60
|
self.is_sample_type_eligible_for_observations_upload(case),
|
|
61
|
-
self.
|
|
61
|
+
self.is_sample_source_type_not_ffpe(case.internal_id),
|
|
62
62
|
]
|
|
63
63
|
)
|
|
64
64
|
|
cg/meta/tar/tar.py
CHANGED
|
@@ -24,8 +24,9 @@ class TarAPI:
|
|
|
24
24
|
self.process.run_command(command, dry_run=self.dry_run)
|
|
25
25
|
|
|
26
26
|
@staticmethod
|
|
27
|
-
def get_extract_file_command(input_file: Path, output_dir: Path) -> list[str]:
|
|
28
|
-
"""Generates the Tar command for flow cel run directory extraction
|
|
27
|
+
def get_extract_file_command(input_file: Path, output_dir: Path, is_current: bool) -> list[str]:
|
|
28
|
+
"""Generates the Tar command for flow cel run directory extraction. If the is_current flag
|
|
29
|
+
is set, the command will strip the first 6 components of the file path when extracting."""
|
|
29
30
|
extraction_parameters: list = FlowCellExtractionParameters.EXTRACT_FILE.copy()
|
|
30
31
|
extraction_parameters.append(str(input_file))
|
|
31
32
|
exclude_files: list = FlowCellExtractionParameters.EXCLUDE_FILES.copy()
|
|
@@ -33,6 +34,8 @@ class TarAPI:
|
|
|
33
34
|
target_directory_parameters: list = FlowCellExtractionParameters.CHANGE_TO_DIR.copy()
|
|
34
35
|
extraction_parameters.extend(target_directory_parameters)
|
|
35
36
|
extraction_parameters.append(str(output_dir))
|
|
37
|
+
if is_current:
|
|
38
|
+
extraction_parameters.append("--strip-components=6")
|
|
36
39
|
return extraction_parameters
|
|
37
40
|
|
|
38
41
|
def get_compress_cmd(self, input_path: Path) -> str:
|
cg/meta/upload/coverage.py
CHANGED
|
@@ -25,15 +25,15 @@ class UploadCoverageApi:
|
|
|
25
25
|
"""Get data for uploading coverage."""
|
|
26
26
|
case_id = analysis.case.internal_id
|
|
27
27
|
data = {"family": case_id, "family_name": analysis.case.name, "samples": []}
|
|
28
|
-
for
|
|
28
|
+
for sample in analysis.case.samples:
|
|
29
29
|
hk_coverage: File = self.hk_api.files(
|
|
30
30
|
version=analysis.housekeeper_version_id,
|
|
31
|
-
tags=
|
|
32
|
-
).
|
|
31
|
+
tags={sample.internal_id, "coverage", "sambamba-depth", "chanjo"},
|
|
32
|
+
).one()
|
|
33
33
|
data["samples"].append(
|
|
34
34
|
{
|
|
35
|
-
"sample":
|
|
36
|
-
"sample_name":
|
|
35
|
+
"sample": sample.internal_id,
|
|
36
|
+
"sample_name": sample.name,
|
|
37
37
|
"coverage": hk_coverage.full_path,
|
|
38
38
|
}
|
|
39
39
|
)
|
|
@@ -6,6 +6,7 @@ import logging
|
|
|
6
6
|
import rich_click as click
|
|
7
7
|
|
|
8
8
|
from cg.cli.generate.delivery_report.base import generate_delivery_report
|
|
9
|
+
from cg.cli.upload.coverage import upload_coverage
|
|
9
10
|
from cg.cli.upload.genotype import upload_genotypes
|
|
10
11
|
from cg.cli.upload.gens import upload_to_gens
|
|
11
12
|
from cg.cli.upload.observations import upload_observations_to_loqusdb
|
|
@@ -31,6 +32,8 @@ class RarediseaseUploadAPI(UploadAPI):
|
|
|
31
32
|
analysis: Analysis = self.status_db.get_latest_completed_analysis_for_case(case.internal_id)
|
|
32
33
|
self.update_upload_started_at(analysis=analysis)
|
|
33
34
|
|
|
35
|
+
ctx.invoke(upload_coverage, family_id=case.internal_id)
|
|
36
|
+
|
|
34
37
|
# Delivery report generation
|
|
35
38
|
if case.data_delivery in REPORT_SUPPORTED_DATA_DELIVERY:
|
|
36
39
|
ctx.invoke(generate_delivery_report, case_id=case.internal_id)
|
|
@@ -90,6 +90,20 @@ class NalloConfigBuilder(ScoutConfigBuilder):
|
|
|
90
90
|
"""Include sample level files that are optional."""
|
|
91
91
|
LOG.info("Including NALLO specific sample level files")
|
|
92
92
|
sample_id: str = cast(str, config_sample.sample_id)
|
|
93
|
+
config_sample.chromograph_images.autozygous = self.remove_chromosome_substring(
|
|
94
|
+
self.get_sample_file(
|
|
95
|
+
hk_tags=self.sample_tags.chromograph_autozyg,
|
|
96
|
+
sample_id=sample_id,
|
|
97
|
+
hk_version=hk_version,
|
|
98
|
+
)
|
|
99
|
+
)
|
|
100
|
+
config_sample.chromograph_images.coverage = self.remove_chromosome_substring(
|
|
101
|
+
self.get_sample_file(
|
|
102
|
+
hk_tags=self.sample_tags.chromograph_coverage,
|
|
103
|
+
sample_id=sample_id,
|
|
104
|
+
hk_version=hk_version,
|
|
105
|
+
)
|
|
106
|
+
)
|
|
93
107
|
config_sample.d4_file = self.get_sample_file(
|
|
94
108
|
hk_tags=cast(set[str], self.sample_tags.d4_file),
|
|
95
109
|
sample_id=sample_id,
|