cg 83.14.0__py3-none-any.whl → 83.15.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/services/sequencing_qc_service/quality_checks/checks.py +3 -1
- cg/services/sequencing_qc_service/quality_checks/utils.py +26 -0
- {cg-83.14.0.dist-info → cg-83.15.0.dist-info}/METADATA +1 -1
- {cg-83.14.0.dist-info → cg-83.15.0.dist-info}/RECORD +7 -7
- {cg-83.14.0.dist-info → cg-83.15.0.dist-info}/WHEEL +1 -1
- {cg-83.14.0.dist-info → cg-83.15.0.dist-info}/entry_points.txt +0 -0
cg/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__title__ = "cg"
|
|
2
|
-
__version__ = "83.
|
|
2
|
+
__version__ = "83.15.0"
|
|
@@ -7,6 +7,7 @@ from cg.services.sequencing_qc_service.quality_checks.utils import (
|
|
|
7
7
|
any_sample_in_case_has_reads,
|
|
8
8
|
case_pass_sequencing_qc_on_hifi_yield,
|
|
9
9
|
case_pass_sequencing_qc_on_reads,
|
|
10
|
+
raw_data_case_pass_qc,
|
|
10
11
|
sample_pass_sequencing_qc_on_reads,
|
|
11
12
|
)
|
|
12
13
|
from cg.store.models import Case
|
|
@@ -24,6 +25,7 @@ class SequencingQCCheck(QualityCheck):
|
|
|
24
25
|
SAMPLE_PASSES: Callable = sample_pass_sequencing_qc_on_reads
|
|
25
26
|
ALL_SAMPLES_IN_CASE_HAVE_READS: Callable = all_samples_in_case_have_reads
|
|
26
27
|
ANY_SAMPLE_IN_CASE_HAS_READS: Callable = any_sample_in_case_has_reads
|
|
28
|
+
RAW_DATA_CASE_QC: Callable = raw_data_case_pass_qc
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
def get_sequencing_quality_check_for_case(case: Case) -> Callable:
|
|
@@ -41,7 +43,7 @@ def get_sequencing_quality_check_for_case(case: Case) -> Callable:
|
|
|
41
43
|
Workflow.MUTANT: SequencingQCCheck.ANY_SAMPLE_IN_CASE_HAS_READS,
|
|
42
44
|
Workflow.NALLO: SequencingQCCheck.CASE_PASSES_ON_YIELD,
|
|
43
45
|
Workflow.RAREDISEASE: SequencingQCCheck.CASE_PASSES_ON_READS,
|
|
44
|
-
Workflow.RAW_DATA: SequencingQCCheck.
|
|
46
|
+
Workflow.RAW_DATA: SequencingQCCheck.RAW_DATA_CASE_QC,
|
|
45
47
|
Workflow.RNAFUSION: SequencingQCCheck.CASE_PASSES_ON_READS,
|
|
46
48
|
Workflow.TAXPROFILER: SequencingQCCheck.ALL_SAMPLES_IN_CASE_HAVE_READS,
|
|
47
49
|
Workflow.TOMTE: SequencingQCCheck.CASE_PASSES_ON_READS,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
+
from cg.constants.devices import DeviceType
|
|
3
4
|
from cg.constants.priority import Priority
|
|
4
5
|
from cg.constants.sequencing import SeqLibraryPrepCategory
|
|
5
6
|
from cg.exc import ApplicationDoesNotHaveHiFiYieldError
|
|
@@ -132,6 +133,31 @@ def any_sample_in_case_has_reads(case: Case) -> bool:
|
|
|
132
133
|
return passed_quality_check
|
|
133
134
|
|
|
134
135
|
|
|
136
|
+
def raw_data_case_pass_qc(case: Case) -> bool:
|
|
137
|
+
if is_case_ready_made_library(case):
|
|
138
|
+
return ready_made_library_case_pass_sequencing_qc(case)
|
|
139
|
+
if is_first_sample_yield_based_and_processed(case):
|
|
140
|
+
return all(sample_has_enough_hifi_yield(sample) for sample in case.samples)
|
|
141
|
+
elif is_first_sample_reads_based_and_processed(case):
|
|
142
|
+
return all(sample_has_enough_reads(sample) for sample in case.samples)
|
|
143
|
+
LOG.warning(f"Not all samples for case {case.internal_id} have been post-processed.")
|
|
144
|
+
return False
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
def is_first_sample_yield_based_and_processed(case: Case) -> bool:
|
|
148
|
+
sample: Sample = case.samples[0]
|
|
149
|
+
if metrics := sample.sample_run_metrics:
|
|
150
|
+
return metrics[0].type == DeviceType.PACBIO
|
|
151
|
+
return False
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
def is_first_sample_reads_based_and_processed(case: Case) -> bool:
|
|
155
|
+
sample: Sample = case.samples[0]
|
|
156
|
+
if metrics := sample.sample_run_metrics:
|
|
157
|
+
return metrics[0].type == DeviceType.ILLUMINA
|
|
158
|
+
return False
|
|
159
|
+
|
|
160
|
+
|
|
135
161
|
def is_case_express_priority(case: Case) -> bool:
|
|
136
162
|
"""
|
|
137
163
|
Check if a case is express priority.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cg/__init__.py,sha256=
|
|
1
|
+
cg/__init__.py,sha256=LzHKmL8dVmAmq-6AHs2IvH5WkbB5nsiiArjFCiCZoEA,41
|
|
2
2
|
cg/apps/__init__.py,sha256=pYf0vxo4iYQqURzFRYzqpOCdV8Cm9MWx0GHvJOz0EMg,315
|
|
3
3
|
cg/apps/coverage/__init__.py,sha256=dJtsmNf8tODE2-VEomMIoYA7ugLYZAk_upsfOQCZeF8,27
|
|
4
4
|
cg/apps/coverage/api.py,sha256=e_ozC3QeNKoEfpjjMaL-XjeBLtz-JySWccrtw0E9mLM,2940
|
|
@@ -853,8 +853,8 @@ cg/services/sample_run_metrics_service/dtos.py,sha256=bJ0BL-QkqXIAAIg3F9edIdzAa_
|
|
|
853
853
|
cg/services/sample_run_metrics_service/sample_run_metrics_service.py,sha256=aQvOuorTG97lUbw7OREO8nsPhO3ouQ38RwksstGwguQ,1795
|
|
854
854
|
cg/services/sample_run_metrics_service/utils.py,sha256=BwICxptnhGg8oBghCLhzHaMNu0LuEV40cSYz1e8mB0A,829
|
|
855
855
|
cg/services/sequencing_qc_service/__init__.py,sha256=OaL9dyyI6B8uRjopTIoD1zcX_H-SbGj46ZM-V-aoq6w,88
|
|
856
|
-
cg/services/sequencing_qc_service/quality_checks/checks.py,sha256=
|
|
857
|
-
cg/services/sequencing_qc_service/quality_checks/utils.py,sha256=
|
|
856
|
+
cg/services/sequencing_qc_service/quality_checks/checks.py,sha256=qdcHRwZD7uxrOmacyiAG4-EN6nG5z-r4rLxcReU5kSI,2593
|
|
857
|
+
cg/services/sequencing_qc_service/quality_checks/utils.py,sha256=2WN7S4kYsN_9iYPx7d4coAYcWHeueQWrPP2pJ8ztMMc,8969
|
|
858
858
|
cg/services/sequencing_qc_service/sequencing_qc_service.py,sha256=2QIJ9IDZeMtO74ZHJ9bfzyK3-RhDK-m9xaoKsi9RHt8,1969
|
|
859
859
|
cg/services/sequencing_qc_service/utils.py,sha256=5WHJltBICfRODEzFVPFTdCbGNaMKCaVeOswHgIOGgFc,199
|
|
860
860
|
cg/services/slurm_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -923,7 +923,7 @@ cg/utils/flask/enum.py,sha256=xwNVtFPkSzoloJctLHu7obRyxcng1GJrhkeYkqwf9tw,1052
|
|
|
923
923
|
cg/utils/mapping.py,sha256=oZpZW2kgsbtAP2FZ7RtRPELiEE1zZk_nAGisHGtCOUo,491
|
|
924
924
|
cg/utils/time.py,sha256=_VOglhrFEZ5cwHK1U1g36SdwzB7UvV-Nvlt4ymuZUho,1501
|
|
925
925
|
cg/utils/utils.py,sha256=RciI_UhWcnG_pMZrmQZ1ZYb-O1N0DweTYMmhE0SIRgQ,1410
|
|
926
|
-
cg-83.
|
|
927
|
-
cg-83.
|
|
928
|
-
cg-83.
|
|
929
|
-
cg-83.
|
|
926
|
+
cg-83.15.0.dist-info/METADATA,sha256=wj51NyMN6wmwfhFYzc6eCNr6yc2UzVNWHh5V_r30Vgs,4940
|
|
927
|
+
cg-83.15.0.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
928
|
+
cg-83.15.0.dist-info/entry_points.txt,sha256=q5f47YQQGltzK_xnIq1mDopRXXEItr85Xe1BCtG-Wts,39
|
|
929
|
+
cg-83.15.0.dist-info/RECORD,,
|
|
File without changes
|