phc-ingestion 0.10.7__tar.gz → 0.10.9__tar.gz
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.
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/PKG-INFO +1 -1
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nebula/manifest_assembler.py +23 -7
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nebula/process.py +3 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/pyproject.toml +1 -1
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/PYPI.md +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/process.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/cnv.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/detect_genome_ref.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/hla.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/ihc.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/interpretation.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/json.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/metadata.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/specimen_details.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/structural.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/tests.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/tmb.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/tsv.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/caris/util/vcf.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/process.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/cnv.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/fnv.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/ga4gh.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/interpretation.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/foundation/util/vcf_etl.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/generic/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/generic/process.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/generic/utils.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nebula/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nebula/constants.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/process.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/alteration_table.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/interpretation.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/manifest_helpers.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/nextgen_specific_genes.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/process_cnv.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/process_manifest.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/process_structural.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/process_vcf.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/types.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/resources/GRCh37_map.csv.gz +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/resources/GRCh38_map.csv.gz +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/coords_to_genes.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/ga4gh.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/gene_to_coords.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/lambda_client.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/open_maybe_gzipped.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/tar.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/shared_util/types.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/Variant.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/standardize.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/__init__.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
- {phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/read_write.py +0 -0
|
@@ -103,11 +103,22 @@ class ManifestAssembler:
|
|
|
103
103
|
identifiers = resource.get("identifier", [])
|
|
104
104
|
return identifiers[0].get("value", "") if identifiers else ""
|
|
105
105
|
|
|
106
|
-
def __extract_id_from_reference(self, reference: Reference) -> str:
|
|
107
|
-
|
|
106
|
+
def __extract_id_from_reference(self, reference: Reference | None) -> str:
|
|
107
|
+
if not reference:
|
|
108
|
+
return ""
|
|
109
|
+
|
|
110
|
+
ref_string = reference.get("reference")
|
|
111
|
+
if not ref_string:
|
|
112
|
+
return ""
|
|
113
|
+
|
|
108
114
|
parts = ref_string.split("/")
|
|
109
115
|
return parts[1] if len(parts) > 1 else parts[0]
|
|
110
116
|
|
|
117
|
+
def __extract_id_from_reference_list(self, references: list[Reference] | None) -> str:
|
|
118
|
+
if not references or len(references) == 0:
|
|
119
|
+
return ""
|
|
120
|
+
return self.__extract_id_from_reference(references[0])
|
|
121
|
+
|
|
111
122
|
def __extract_elation_mrn(self, patient: Patient) -> str:
|
|
112
123
|
identifier = next(
|
|
113
124
|
(
|
|
@@ -149,17 +160,22 @@ class ManifestAssembler:
|
|
|
149
160
|
raise RuntimeError(f"Patient with kit id {self.kit_id} not found")
|
|
150
161
|
patient_birth_date = patient.get("birthDate")
|
|
151
162
|
if not patient_birth_date:
|
|
152
|
-
raise RuntimeError("Patient birth date is
|
|
163
|
+
raise RuntimeError("Patient birth date is required to create a manifest")
|
|
153
164
|
|
|
154
165
|
organization: Organization | None = self.__fetch_resource_by_type_and_reference(
|
|
155
166
|
"Organization", patient.get("managingOrganization")
|
|
156
167
|
)
|
|
157
168
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
)
|
|
169
|
+
# Handle generalPractitioner as a list
|
|
170
|
+
general_practitioner: Practitioner | None = None
|
|
171
|
+
general_practitioner_refs: list[Reference] = patient.get("generalPractitioner", [])
|
|
172
|
+
if general_practitioner_refs:
|
|
173
|
+
general_practitioner = self.__fetch_resource_by_type_and_reference(
|
|
174
|
+
"Practitioner",
|
|
175
|
+
{"reference": self.__extract_id_from_reference_list(general_practitioner_refs)},
|
|
176
|
+
)
|
|
161
177
|
|
|
162
|
-
patient_info = self.__parse_human_name(patient
|
|
178
|
+
patient_info = self.__parse_human_name(patient.get("name"))
|
|
163
179
|
practitioner_info = self.__parse_human_name(
|
|
164
180
|
general_practitioner.get("name") if general_practitioner else None
|
|
165
181
|
)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import os
|
|
2
2
|
|
|
3
3
|
from ingestion.nebula.constants import NEBULA_TEST_TYPE
|
|
4
|
+
from ingestion.shared_util.ga4gh import create_yaml
|
|
4
5
|
from ingestion.vcf_standardization.standardize import standardize_vcf
|
|
5
6
|
from lifeomic_logging import scoped_logger
|
|
6
7
|
from ingestion.nebula.manifest_assembler import ManifestAssembler
|
|
@@ -43,6 +44,8 @@ def process(vcf_file, out_path, file_name, source_file_id, ingestion_id, account
|
|
|
43
44
|
}
|
|
44
45
|
]
|
|
45
46
|
|
|
47
|
+
create_yaml(manifest, file_name)
|
|
48
|
+
|
|
46
49
|
# Hard-code genome reference for Nebula VCFs
|
|
47
50
|
genome_reference = "GRCh38"
|
|
48
51
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/nextgen_specific_genes.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/nextgen/util/pre_filter_somatic_vcf.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/__init__.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/af_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/dp_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.7 → phc-ingestion-0.10.9}/ingestion/vcf_standardization/util/read_write.py
RENAMED
|
File without changes
|