cg 76.0.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 +18 -1
- cg/apps/tb/api.py +42 -5
- cg/cli/transfer.py +13 -2
- 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 +86 -172
- cg/cli/workflow/balsamic/options.py +3 -48
- cg/cli/workflow/balsamic/umi.py +210 -15
- cg/cli/workflow/microsalt/base.py +4 -2
- cg/cli/workflow/mip_dna/base.py +1 -1
- cg/cli/workflow/nallo/base.py +73 -23
- cg/cli/workflow/nf_analysis.py +5 -207
- cg/cli/workflow/raredisease/base.py +41 -54
- cg/cli/workflow/rnafusion/base.py +38 -8
- cg/cli/workflow/taxprofiler/base.py +31 -18
- cg/cli/workflow/tomte/base.py +83 -10
- cg/constants/constants.py +25 -30
- cg/constants/devices.py +6 -1
- cg/constants/gene_panel.py +3 -1
- cg/constants/housekeeper_tags.py +28 -28
- cg/constants/lims.py +4 -0
- cg/constants/nf_analysis.py +0 -1
- cg/constants/observations.py +21 -5
- cg/constants/orderforms.py +3 -3
- cg/constants/pacbio.py +1 -0
- cg/constants/priority.py +1 -1
- cg/constants/report.py +1 -0
- cg/constants/scout.py +12 -9
- cg/constants/sequencing.py +2 -2
- cg/constants/tb.py +5 -5
- cg/exc.py +27 -5
- cg/meta/compress/compress.py +7 -2
- cg/meta/delivery_report/balsamic.py +3 -1
- cg/meta/delivery_report/delivery_report_api.py +4 -3
- cg/meta/delivery_report/nallo.py +11 -11
- cg/meta/delivery_report/raredisease.py +7 -3
- cg/meta/delivery_report/templates/macros/data_analysis/qc_metrics/balsamic_qc_metrics.html +1 -0
- cg/meta/delivery_report/templates/macros/ticket_system.html +1 -1
- cg/meta/observations/balsamic_observations_api.py +110 -14
- 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 +23 -32
- cg/meta/observations/raredisease_observations_api.py +1 -1
- cg/meta/tar/tar.py +5 -2
- cg/meta/transfer/lims.py +32 -3
- cg/meta/upload/balsamic/balsamic.py +1 -8
- cg/meta/upload/coverage.py +5 -5
- cg/meta/upload/raredisease/raredisease.py +3 -0
- cg/meta/upload/scout/hk_tags.py +1 -0
- cg/meta/upload/scout/nallo_config_builder.py +31 -7
- cg/meta/workflow/balsamic.py +70 -36
- cg/meta/workflow/fastq.py +8 -0
- cg/meta/workflow/microsalt/quality_controller/models.py +0 -2
- cg/meta/workflow/microsalt/quality_controller/quality_controller.py +8 -16
- cg/meta/workflow/microsalt/quality_controller/result_logger.py +3 -6
- cg/meta/workflow/microsalt/quality_controller/utils.py +2 -45
- cg/meta/workflow/nallo.py +21 -99
- cg/meta/workflow/nf_analysis.py +12 -263
- 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/balsamic/config.py +0 -24
- cg/models/balsamic/metrics.py +5 -3
- cg/models/cg_config.py +39 -16
- cg/models/deliverables/metric_deliverables.py +1 -1
- cg/models/delivery_report/metadata.py +2 -1
- cg/models/nallo/nallo.py +14 -64
- cg/models/nf_analysis.py +1 -41
- cg/models/raredisease/raredisease.py +1 -63
- cg/models/rnafusion/rnafusion.py +0 -26
- cg/models/scout/scout_load_config.py +5 -2
- cg/models/taxprofiler/taxprofiler.py +0 -42
- cg/models/tomte/tomte.py +0 -69
- cg/resources/nallo_bundle_filenames.yaml +292 -22
- cg/resources/raredisease_bundle_filenames.yaml +11 -1
- cg/resources/taxprofiler_bundle_filenames.yaml +20 -0
- cg/server/admin.py +106 -25
- 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/{service.py → analysis_starter.py} +11 -9
- cg/services/analysis_starter/configurator/abstract_model.py +8 -0
- cg/services/analysis_starter/configurator/configurator.py +1 -1
- cg/services/analysis_starter/configurator/extensions/nallo.py +27 -0
- cg/services/analysis_starter/configurator/extensions/{abstract.py → pipeline_extension.py} +1 -1
- cg/services/analysis_starter/configurator/extensions/raredisease.py +3 -1
- cg/services/analysis_starter/configurator/extensions/tomte_extension.py +28 -0
- cg/services/analysis_starter/configurator/file_creators/balsamic_config.py +240 -0
- cg/services/analysis_starter/configurator/file_creators/gene_panel.py +10 -5
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/abstract.py +2 -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 +37 -0
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/raredisease.py +8 -5
- cg/services/analysis_starter/configurator/file_creators/nextflow/params_file/tomte_params_file_creator.py +64 -0
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/creator.py +1 -1
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/nallo_sample_sheet_creator.py +65 -0
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/protocol.py +12 -0
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{raredisease.py → raredisease_sample_sheet_creator.py} +2 -2
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{rnafusion.py → rnafusion_sample_sheet_creator.py} +2 -2
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/{taxprofiler.py → taxprofiler_sample_sheet_creator.py} +2 -2
- cg/services/analysis_starter/configurator/file_creators/nextflow/sample_sheet/tomte_sample_sheet_creator.py +36 -0
- cg/services/analysis_starter/configurator/implementations/balsamic.py +68 -0
- cg/services/analysis_starter/configurator/implementations/nextflow.py +22 -5
- cg/services/analysis_starter/configurator/models/balsamic.py +152 -0
- cg/services/analysis_starter/configurator/models/mip_dna.py +6 -8
- cg/services/analysis_starter/configurator/models/nextflow.py +9 -0
- cg/services/analysis_starter/constants.py +2 -0
- cg/services/analysis_starter/factories/configurator_factory.py +131 -51
- cg/services/analysis_starter/factories/starter_factory.py +36 -7
- cg/services/analysis_starter/input_fetcher/implementations/bam_fetcher.py +57 -0
- cg/services/analysis_starter/input_fetcher/implementations/fastq_fetcher.py +3 -3
- cg/services/analysis_starter/submitters/seqera_platform/{client.py → seqera_platform_client.py} +19 -3
- cg/services/analysis_starter/submitters/seqera_platform/seqera_platform_submitter.py +73 -0
- cg/services/analysis_starter/submitters/submitter.py +1 -1
- cg/services/analysis_starter/submitters/subprocess/submitter.py +2 -1
- cg/services/analysis_starter/tracker/implementations/balsamic.py +22 -0
- 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.py → nextflow_tracker.py} +6 -4
- cg/services/analysis_starter/tracker/tracker.py +19 -15
- cg/services/deliver_files/factory.py +1 -1
- cg/services/delivery_message/messages/__init__.py +24 -14
- cg/services/delivery_message/messages/{microsalt_mwr_message.py → microsalt_message.py} +1 -1
- cg/services/delivery_message/utils.py +4 -40
- 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/orders/validation/order_types/microsalt/models/sample.py +2 -3
- 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 +73 -7
- cg/store/crud/update.py +14 -3
- cg/store/models.py +98 -35
- cg/store/store.py +8 -1
- {cg-76.0.0.dist-info → cg-83.14.0.dist-info}/METADATA +1 -1
- {cg-76.0.0.dist-info → cg-83.14.0.dist-info}/RECORD +150 -138
- cg/services/analysis_starter/submitters/seqera_platform/submitter.py +0 -39
- cg/services/delivery_message/messages/microsalt_mwx_message.py +0 -18
- {cg-76.0.0.dist-info → cg-83.14.0.dist-info}/WHEEL +0 -0
- {cg-76.0.0.dist-info → cg-83.14.0.dist-info}/entry_points.txt +0 -0
|
@@ -114,7 +114,10 @@ class IlluminaBackupService:
|
|
|
114
114
|
"""Process a flow cell from backup. Return elapsed time."""
|
|
115
115
|
start_time: float = get_start_time()
|
|
116
116
|
run_dir = Path(self.sequencing_runs_dir)
|
|
117
|
-
|
|
117
|
+
is_current: bool = self._is_archiving_directory_current(archived_run)
|
|
118
|
+
sequencing_run_output_dir: Path = self._get_sequencing_run_output_dir(
|
|
119
|
+
archived_run=archived_run, is_current=is_current
|
|
120
|
+
)
|
|
118
121
|
self.retrieve_archived_key(
|
|
119
122
|
archived_key=archived_key, sequencing_run=sequencing_run, run_dir=run_dir
|
|
120
123
|
)
|
|
@@ -128,9 +131,12 @@ class IlluminaBackupService:
|
|
|
128
131
|
encryption_key,
|
|
129
132
|
retrieved_run,
|
|
130
133
|
retrieved_key,
|
|
131
|
-
) = self.decrypt_sequencing_run(
|
|
132
|
-
|
|
133
|
-
|
|
134
|
+
) = self.decrypt_sequencing_run(
|
|
135
|
+
archived_run=archived_run, archived_key=archived_key, run_dir=run_dir
|
|
136
|
+
)
|
|
137
|
+
self.extract_sequencing_run(
|
|
138
|
+
decrypted_run=decrypted_run, is_current=is_current, run_dir=run_dir
|
|
139
|
+
)
|
|
134
140
|
self.create_rta_complete(sequencing_run_output_dir)
|
|
135
141
|
self.create_copy_complete(sequencing_run_output_dir)
|
|
136
142
|
self.unlink_files(decrypted_run, encryption_key, retrieved_run, retrieved_key)
|
|
@@ -145,6 +151,20 @@ class IlluminaBackupService:
|
|
|
145
151
|
|
|
146
152
|
return get_elapsed_time(start_time=start_time)
|
|
147
153
|
|
|
154
|
+
def _get_sequencing_run_output_dir(self, archived_run: Path, is_current: bool) -> Path:
|
|
155
|
+
"""Return the path to the sequencing run based on the archived run path."""
|
|
156
|
+
if is_current:
|
|
157
|
+
run_full_name: str = archived_run.parent.name
|
|
158
|
+
else:
|
|
159
|
+
run_full_name: str = archived_run.name.split(".")[0]
|
|
160
|
+
return Path(self.sequencing_runs_dir, run_full_name)
|
|
161
|
+
|
|
162
|
+
def _is_archiving_directory_current(self, archived_run: Path) -> bool:
|
|
163
|
+
"""Check if the archived run is in the current archiving directory."""
|
|
164
|
+
return archived_run.as_posix().startswith(
|
|
165
|
+
Path(self.pdc_archiving_directory.current).parent.as_posix()
|
|
166
|
+
)
|
|
167
|
+
|
|
148
168
|
def unlink_files(
|
|
149
169
|
self,
|
|
150
170
|
decrypted_run: Path,
|
|
@@ -184,10 +204,12 @@ class IlluminaBackupService:
|
|
|
184
204
|
"""Create a CopyComplete.txt file in the flow cell run directory."""
|
|
185
205
|
Path(flow_cell_directory, DemultiplexingDirsAndFiles.COPY_COMPLETE).touch()
|
|
186
206
|
|
|
187
|
-
def extract_sequencing_run(self, decrypted_run, run_dir):
|
|
207
|
+
def extract_sequencing_run(self, decrypted_run: Path, is_current: bool, run_dir: Path) -> None:
|
|
188
208
|
"""Extract the sequencing run tar archive."""
|
|
189
|
-
extraction_command = self.tar_api.get_extract_file_command(
|
|
190
|
-
input_file=decrypted_run,
|
|
209
|
+
extraction_command: list[str] = self.tar_api.get_extract_file_command(
|
|
210
|
+
input_file=decrypted_run,
|
|
211
|
+
output_dir=run_dir,
|
|
212
|
+
is_current=is_current,
|
|
191
213
|
)
|
|
192
214
|
LOG.debug(f"Extract sequencing run command: {extraction_command}")
|
|
193
215
|
self.tar_api.run_tar_command(extraction_command)
|
|
@@ -30,6 +30,7 @@ class ExtractionMethod(StrEnum):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class IndexEnum(StrEnum):
|
|
33
|
+
ARCHER_SET_B = "Archer Set B"
|
|
33
34
|
AVIDA_INDEX_PLATE = "Avida Index plate"
|
|
34
35
|
AVIDA_INDEX_STRIP = "Avida Index strip"
|
|
35
36
|
IDT_DS_B = "IDT DupSeq 10 bp Set B"
|
|
@@ -37,6 +38,7 @@ class IndexEnum(StrEnum):
|
|
|
37
38
|
IDT_XGEN_UDI = "IDT xGen UDI Adapters"
|
|
38
39
|
IDT10_UDI_NIPT = "IDT10 UDI NIPT"
|
|
39
40
|
KAPA_UDI_NIPT = "KAPA UDI NIPT"
|
|
41
|
+
NEBNEXT_LV_Unique_Dual_2A = "NEBNext LV Unique Dual Index Primers Set 2A"
|
|
40
42
|
NEXTERA_XT = "Nextera XT Dual"
|
|
41
43
|
NEXTFLEX_UDI_96 = "NEXTflex® Unique Dual Index Barcodes 1 - 96"
|
|
42
44
|
NEXTFLEX_V2_UDI_96 = "NEXTflex® v2 UDI Barcodes 1 - 96"
|
|
@@ -46,4 +48,5 @@ class IndexEnum(StrEnum):
|
|
|
46
48
|
TWIST_UDI_B = "TWIST UDI Set B"
|
|
47
49
|
TWIST_UDI_C = "TWIST UDI Set C"
|
|
48
50
|
TRUSEQ_DNA_HT = "TruSeq DNA HT Dual-index (D7-D5)"
|
|
51
|
+
XGEN_UDI_10_1_4 = "xGen UDI 10nt Primer Plates 1-4"
|
|
49
52
|
NO_INDEX = "NoIndex"
|