phc-ingestion 0.10.13__py3-none-any.whl → 0.10.15__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.
- ingestion/caris/util/ihc.py +18 -4
- ingestion/nebula/manifest_assembler.py +3 -3
- {phc_ingestion-0.10.13.dist-info → phc_ingestion-0.10.15.dist-info}/METADATA +1 -1
- {phc_ingestion-0.10.13.dist-info → phc_ingestion-0.10.15.dist-info}/RECORD +5 -5
- {phc_ingestion-0.10.13.dist-info → phc_ingestion-0.10.15.dist-info}/WHEEL +0 -0
ingestion/caris/util/ihc.py
CHANGED
|
@@ -121,9 +121,16 @@ def get_ihc_results(data, log) -> list[dict]:
|
|
|
121
121
|
)
|
|
122
122
|
trigger = True
|
|
123
123
|
if test_results.get("stainPercent"):
|
|
124
|
-
|
|
124
|
+
try:
|
|
125
|
+
stain_percent = float(test_results["stainPercent"])
|
|
126
|
+
if np.isnan(stain_percent) == False:
|
|
127
|
+
log.warning(
|
|
128
|
+
f'IHC test {test_results["biomarkerName"]} has an unexpected pattern for "stainPercent": value of "{test_results["stainPercent"]}" was given when None was expected'
|
|
129
|
+
)
|
|
130
|
+
trigger = True
|
|
131
|
+
except (ValueError, TypeError):
|
|
125
132
|
log.warning(
|
|
126
|
-
f'IHC test {test_results["biomarkerName"]} has an
|
|
133
|
+
f'IHC test {test_results["biomarkerName"]} has an invalid value for "stainPercent": "{test_results["stainPercent"]}"'
|
|
127
134
|
)
|
|
128
135
|
trigger = True
|
|
129
136
|
|
|
@@ -193,9 +200,16 @@ def get_ihc_results(data, log) -> list[dict]:
|
|
|
193
200
|
)
|
|
194
201
|
trigger = True
|
|
195
202
|
if test_results.get("stainPercent"):
|
|
196
|
-
|
|
203
|
+
try:
|
|
204
|
+
stain_percent = float(test_results["stainPercent"])
|
|
205
|
+
if not np.isnan(stain_percent):
|
|
206
|
+
log.warning(
|
|
207
|
+
f'IHC test {test_results["biomarkerName"]} has an unexpected pattern for "stainPercent": value of "{test_results["stainPercent"]}" was given when None was expected'
|
|
208
|
+
)
|
|
209
|
+
trigger = True
|
|
210
|
+
except (ValueError, TypeError):
|
|
197
211
|
log.warning(
|
|
198
|
-
f'IHC test {test_results["biomarkerName"]} has an
|
|
212
|
+
f'IHC test {test_results["biomarkerName"]} has an invalid value for "stainPercent": "{test_results["stainPercent"]}"'
|
|
199
213
|
)
|
|
200
214
|
trigger = True
|
|
201
215
|
if test_results.get("threshold"):
|
|
@@ -154,7 +154,7 @@ class ManifestAssembler:
|
|
|
154
154
|
except Exception as e:
|
|
155
155
|
return None
|
|
156
156
|
|
|
157
|
-
def
|
|
157
|
+
def __extract_collection_date(self) -> dict[str, str]:
|
|
158
158
|
in_file = self.vcf_file_path
|
|
159
159
|
with gzip.open(in_file, "rt") if in_file.endswith(".gz") else open(in_file, "r") as f:
|
|
160
160
|
headers = read_headers(f)
|
|
@@ -173,7 +173,7 @@ class ManifestAssembler:
|
|
|
173
173
|
report_date = epoch_time or date_string
|
|
174
174
|
if report_date:
|
|
175
175
|
return {
|
|
176
|
-
"
|
|
176
|
+
"collDate": report_date.astimezone(tz=timezone.utc)
|
|
177
177
|
.isoformat(timespec="milliseconds")
|
|
178
178
|
.replace("+00:00", "Z")
|
|
179
179
|
}
|
|
@@ -204,7 +204,7 @@ class ManifestAssembler:
|
|
|
204
204
|
return {
|
|
205
205
|
"name": "Nebula",
|
|
206
206
|
"indexedDate": datetime.now().strftime("%Y-%m-%d"),
|
|
207
|
-
**self.
|
|
207
|
+
**self.__extract_collection_date(),
|
|
208
208
|
"reference": "GRCh38",
|
|
209
209
|
"patientId": patient.get("id"),
|
|
210
210
|
"mrn": self.__extract_elation_mrn(patient),
|
|
@@ -5,7 +5,7 @@ ingestion/caris/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
|
5
5
|
ingestion/caris/util/cnv.py,sha256=Nrc0aoG2k4tmrqHb69hAuXr0adDZIVVJRRjf9_sO91E,4441
|
|
6
6
|
ingestion/caris/util/detect_genome_ref.py,sha256=MpiPa71QmlO3MWvjxPzNdbEHyOhorOcpQWWlwE5BO4c,1640
|
|
7
7
|
ingestion/caris/util/hla.py,sha256=X_t6ngBRvmdG3m4I2_KnPFeWn3BaH-3IWHtOvDbS32A,770
|
|
8
|
-
ingestion/caris/util/ihc.py,sha256=
|
|
8
|
+
ingestion/caris/util/ihc.py,sha256=1XfFJjvQq9E45cdPX4EPrg2VkXABxbMJP_BOgzA8z7g,13091
|
|
9
9
|
ingestion/caris/util/interpretation.py,sha256=CghNurqeVA5VTBBorU8-ZTN-PVNPnR8wrmTwKCH3568,555
|
|
10
10
|
ingestion/caris/util/json.py,sha256=aifO1hnZwNSS-ZtY20otyGbfIoc23w9HMWJ5D56lhFo,5020
|
|
11
11
|
ingestion/caris/util/metadata.py,sha256=a6NToMtGtIRrlMd3CQwq4IRjGGmIiBA9JFwsATjNEoQ,10287
|
|
@@ -28,7 +28,7 @@ ingestion/generic/process.py,sha256=ZaVnZ_gx9faDUsuresI1A0oCegTa-dPQT7DBFMeZGyY,
|
|
|
28
28
|
ingestion/generic/utils.py,sha256=1MEIru7uq38IjUdL8lcHqDH0oTki9uWrz1f2e-pmRoU,2814
|
|
29
29
|
ingestion/nebula/__init__.py,sha256=VauK-rup_N8ZXVohx3HYqHX_PE_WoPyMUhdv2R7al4o,45
|
|
30
30
|
ingestion/nebula/constants.py,sha256=thKqSwemdaAwAmKvF4FEVI9l1Ph5ergsnMlx6nWte7E,357
|
|
31
|
-
ingestion/nebula/manifest_assembler.py,sha256=
|
|
31
|
+
ingestion/nebula/manifest_assembler.py,sha256=kcRSy6pixHkuVEK9QSoM-i6ZdLWMSYXw39eKGHvam34,7995
|
|
32
32
|
ingestion/nebula/process.py,sha256=N9OuipynGV_XgEL3nO5I_-di1tk9szOy8LqsyNTw0E0,2323
|
|
33
33
|
ingestion/nextgen/__init__.py,sha256=7LQ-h_Bvc5P1QcHMdzsqi1Qm4fTJn04-ozar2ty9wSc,59
|
|
34
34
|
ingestion/nextgen/process.py,sha256=5Z0RfclwTAYZruGDiLPutjPCYFh1DJpoWY9dnttghT4,3993
|
|
@@ -59,6 +59,6 @@ ingestion/vcf_standardization/util/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
59
59
|
ingestion/vcf_standardization/util/af_helpers.py,sha256=dpTzoeIQVeBRt0ETF3a9rp5ojZqznHg4x_hCZ8OPcOg,1061
|
|
60
60
|
ingestion/vcf_standardization/util/dp_helpers.py,sha256=Nq8oLOLObu4_pv16qwwgpALRlUoJVCULrd9cFOD-eoI,823
|
|
61
61
|
ingestion/vcf_standardization/util/read_write.py,sha256=x3Pf6Dq8tmolblbCS5CrNmrcHS3FGfqBSFpFgvFGC4g,2526
|
|
62
|
-
phc_ingestion-0.10.
|
|
63
|
-
phc_ingestion-0.10.
|
|
64
|
-
phc_ingestion-0.10.
|
|
62
|
+
phc_ingestion-0.10.15.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
|
|
63
|
+
phc_ingestion-0.10.15.dist-info/METADATA,sha256=WKlso7yXse4-3pnboF_klLG79ocyMFhai3l0HLZ0xHA,678
|
|
64
|
+
phc_ingestion-0.10.15.dist-info/RECORD,,
|
|
File without changes
|