phc-ingestion 0.10.5__tar.gz → 0.10.6__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.5 → phc-ingestion-0.10.6}/PKG-INFO +1 -1
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nebula/manifest_assembler.py +33 -5
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/pyproject.toml +1 -1
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/PYPI.md +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/process.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/cnv.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/detect_genome_ref.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/hla.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/ihc.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/interpretation.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/json.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/metadata.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/specimen_details.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/structural.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/tests.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/tmb.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/tsv.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/caris/util/vcf.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/process.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/cnv.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/fnv.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/ga4gh.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/interpretation.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/foundation/util/vcf_etl.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/generic/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/generic/process.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/generic/utils.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nebula/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nebula/constants.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nebula/process.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/process.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/alteration_table.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/interpretation.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/manifest_helpers.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/nextgen_specific_genes.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/pre_filter_somatic_vcf.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/process_cnv.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/process_manifest.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/process_structural.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/process_vcf.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/types.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/resources/GRCh37_map.csv.gz +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/resources/GRCh38_map.csv.gz +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/coords_to_genes.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/ga4gh.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/gene_to_coords.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/lambda_client.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/open_maybe_gzipped.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/tar.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/shared_util/types.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/Variant.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/standardize.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/__init__.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/af_helpers.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/dp_helpers.py +0 -0
- {phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/read_write.py +0 -0
|
@@ -9,6 +9,7 @@ from ingestion.nebula.constants import (
|
|
|
9
9
|
NEBULA_BODY_SITE,
|
|
10
10
|
NEBULA_INDICATION,
|
|
11
11
|
)
|
|
12
|
+
import re
|
|
12
13
|
|
|
13
14
|
|
|
14
15
|
class HumanName(TypedDict):
|
|
@@ -99,7 +100,7 @@ class ManifestAssembler:
|
|
|
99
100
|
return identifiers[0].get("value", "") if identifiers else ""
|
|
100
101
|
|
|
101
102
|
def __extract_id_from_reference(self, reference: Reference) -> str:
|
|
102
|
-
if not reference
|
|
103
|
+
if not reference:
|
|
103
104
|
return ""
|
|
104
105
|
|
|
105
106
|
ref_string = reference.get("reference")
|
|
@@ -109,12 +110,39 @@ class ManifestAssembler:
|
|
|
109
110
|
parts = ref_string.split("/")
|
|
110
111
|
return parts[1] if len(parts) > 1 else parts[0]
|
|
111
112
|
|
|
113
|
+
def __extract_elation_mrn(self, patient: Patient) -> str:
|
|
114
|
+
if not patient:
|
|
115
|
+
return ""
|
|
116
|
+
|
|
117
|
+
identifier = next(
|
|
118
|
+
(
|
|
119
|
+
x
|
|
120
|
+
for x in patient.get("identifier", [])
|
|
121
|
+
# if matches LRN format for Elation
|
|
122
|
+
if re.search(
|
|
123
|
+
f"lrn:lo:(dev|us):{self.account_id}:ehr:{self.account_id}:{self.project_id}/Patient",
|
|
124
|
+
x.get("system", ""),
|
|
125
|
+
)
|
|
126
|
+
),
|
|
127
|
+
None,
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
if not identifier:
|
|
131
|
+
return ""
|
|
132
|
+
|
|
133
|
+
return identifier.get("value", "")
|
|
134
|
+
|
|
112
135
|
def __parse_human_name(self, human_name: list[HumanName] | None):
|
|
113
|
-
if not human_name
|
|
136
|
+
if not human_name:
|
|
137
|
+
return None
|
|
138
|
+
|
|
139
|
+
human_name = next((x for x in human_name if x.get("use") == "official"), None)
|
|
140
|
+
|
|
141
|
+
if not human_name:
|
|
114
142
|
return None
|
|
115
143
|
|
|
116
|
-
last_name = human_name
|
|
117
|
-
first_name = human_name
|
|
144
|
+
last_name = human_name.get("family", "")
|
|
145
|
+
first_name = human_name.get("given", [])[0]
|
|
118
146
|
|
|
119
147
|
return {
|
|
120
148
|
"lastName": last_name,
|
|
@@ -149,7 +177,7 @@ class ManifestAssembler:
|
|
|
149
177
|
"indexedDate": datetime.now().strftime("%Y-%m-%d"),
|
|
150
178
|
"reference": "GRCh38",
|
|
151
179
|
"patientId": patient.get("id"),
|
|
152
|
-
"mrn":
|
|
180
|
+
"mrn": self.__extract_elation_mrn(patient),
|
|
153
181
|
"bodySite": NEBULA_BODY_SITE,
|
|
154
182
|
"bodySiteDisplay": NEBULA_BODY_SITE,
|
|
155
183
|
"bodySiteSystem": BODY_SITE_SYSTEM,
|
|
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
|
|
File without changes
|
{phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/nextgen/util/nextgen_specific_genes.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/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.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/__init__.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/af_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/dp_helpers.py
RENAMED
|
File without changes
|
{phc-ingestion-0.10.5 → phc-ingestion-0.10.6}/ingestion/vcf_standardization/util/read_write.py
RENAMED
|
File without changes
|