phc-ingestion 0.10.8__tar.gz → 0.10.10__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.8 → phc-ingestion-0.10.10}/PKG-INFO +1 -1
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/manifest_assembler.py +7 -23
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/process.py +3 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/pyproject.toml +1 -1
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/PYPI.md +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/process.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/cnv.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/detect_genome_ref.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/hla.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/ihc.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/interpretation.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/json.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/metadata.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/specimen_details.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/structural.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tests.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tmb.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/tsv.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/caris/util/vcf.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/process.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/cnv.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/fnv.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/ga4gh.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/interpretation.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/foundation/util/vcf_etl.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/process.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/generic/utils.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nebula/constants.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/process.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/alteration_table.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/interpretation.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/manifest_helpers.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/nextgen_specific_genes.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_cnv.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_manifest.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_structural.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/process_vcf.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/types.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/resources/GRCh37_map.csv.gz +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/resources/GRCh38_map.csv.gz +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/coords_to_genes.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/ga4gh.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/gene_to_coords.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/lambda_client.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/open_maybe_gzipped.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/tar.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/shared_util/types.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/Variant.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/standardize.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/__init__.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
- {phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/read_write.py +0 -0
|
@@ -37,7 +37,7 @@ class Patient(Resource):
|
|
|
37
37
|
gender: str | None
|
|
38
38
|
birthDate: str | None
|
|
39
39
|
managingOrganization: Reference | None
|
|
40
|
-
generalPractitioner: Reference | None
|
|
40
|
+
generalPractitioner: list[Reference] | None
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
class Organization(Resource):
|
|
@@ -103,22 +103,11 @@ 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
|
|
107
|
-
|
|
108
|
-
return ""
|
|
109
|
-
|
|
110
|
-
ref_string = reference.get("reference")
|
|
111
|
-
if not ref_string:
|
|
112
|
-
return ""
|
|
113
|
-
|
|
106
|
+
def __extract_id_from_reference(self, reference: Reference) -> str:
|
|
107
|
+
ref_string = reference.get("reference", "")
|
|
114
108
|
parts = ref_string.split("/")
|
|
115
109
|
return parts[1] if len(parts) > 1 else parts[0]
|
|
116
110
|
|
|
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
|
-
|
|
122
111
|
def __extract_elation_mrn(self, patient: Patient) -> str:
|
|
123
112
|
identifier = next(
|
|
124
113
|
(
|
|
@@ -160,20 +149,15 @@ class ManifestAssembler:
|
|
|
160
149
|
raise RuntimeError(f"Patient with kit id {self.kit_id} not found")
|
|
161
150
|
patient_birth_date = patient.get("birthDate")
|
|
162
151
|
if not patient_birth_date:
|
|
163
|
-
raise RuntimeError("Patient birth date is
|
|
152
|
+
raise RuntimeError("Patient birth date is required to create a manifest")
|
|
164
153
|
|
|
165
154
|
organization: Organization | None = self.__fetch_resource_by_type_and_reference(
|
|
166
155
|
"Organization", patient.get("managingOrganization")
|
|
167
156
|
)
|
|
168
157
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
)
|
|
158
|
+
general_practitioner: Practitioner | None = self.__fetch_resource_by_type_and_reference(
|
|
159
|
+
"Practitioner", next(iter(patient.get("generalPractitioner", [])), None)
|
|
160
|
+
)
|
|
177
161
|
|
|
178
162
|
patient_info = self.__parse_human_name(patient.get("name"))
|
|
179
163
|
practitioner_info = self.__parse_human_name(
|
|
@@ -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.8 → phc-ingestion-0.10.10}/ingestion/nextgen/util/nextgen_specific_genes.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/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.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/__init__.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/af_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/dp_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.8 → phc-ingestion-0.10.10}/ingestion/vcf_standardization/util/read_write.py
RENAMED
|
File without changes
|