phc-ingestion 0.10.14__py3-none-any.whl → 0.10.16__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.
@@ -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
- if np.isnan(test_results["stainPercent"]) == False:
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 unexpected pattern for "stainPercent": value of "{test_results["stainPercent"]}" was given when None was expected'
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
- if np.isnan(test_results["stainPercent"]) == False:
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 unexpected pattern for "stainPercent": value of "{test_results["stainPercent"]}" was given when None was expected'
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"):
@@ -55,6 +55,9 @@ def get_xml_short_vars(xml_file: str, log):
55
55
  xml_short_vars = xml_dict["rr:ResultsReport"]["rr:ResultsPayload"]["variant-report"][
56
56
  "short-variants"
57
57
  ]["short-variant"]
58
+ except KeyError as e:
59
+ log.info(f"Missing key in XML structure for short variants: {str(e)}")
60
+ return vendsig_dict
58
61
  except TypeError:
59
62
  log.info("No short variants found in xml")
60
63
  return vendsig_dict
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: phc-ingestion
3
- Version: 0.10.14
3
+ Version: 0.10.16
4
4
  Summary: Functions for LifeOmic PHC genomic ingestions
5
5
  License: MIT
6
6
  Author-email: LifeOmic Development <development@lifeomic.com>
@@ -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=vegxudxHj7tLihrXGbEx_ptwkSsu3YCCB1nZVwoiYXg,12312
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
@@ -22,7 +22,7 @@ ingestion/foundation/util/cnv.py,sha256=YSKCaOBhjZDNXth_GxC-50crDURpTNCMefoHo0uO
22
22
  ingestion/foundation/util/fnv.py,sha256=-VstGsBKXM0duC-IpwUkektoTZ9yQUR0IQcDb1HibY0,5937
23
23
  ingestion/foundation/util/ga4gh.py,sha256=2oCTR9kvV5EeGZlrR35MfMkNL3nbeJYO88fo0NDDmRo,11304
24
24
  ingestion/foundation/util/interpretation.py,sha256=LVVUmMyD6Un1rIKXqiyQDUC6oIJUd8cU3I9YHD5fsXg,405
25
- ingestion/foundation/util/vcf_etl.py,sha256=ZBrX1XGRz-ymLUEiVcjjqmPZPb-AfD9On8UkZJDa1Dk,2133
25
+ ingestion/foundation/util/vcf_etl.py,sha256=GXV5JXswwdyHEEdPsM3Qq8tDPFkvZajrZn5chWgF53k,2266
26
26
  ingestion/generic/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
27
  ingestion/generic/process.py,sha256=ZaVnZ_gx9faDUsuresI1A0oCegTa-dPQT7DBFMeZGyY,1777
28
28
  ingestion/generic/utils.py,sha256=1MEIru7uq38IjUdL8lcHqDH0oTki9uWrz1f2e-pmRoU,2814
@@ -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.14.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
63
- phc_ingestion-0.10.14.dist-info/METADATA,sha256=eFtKLSIUt-CxYzOq3I9SsNeg_bb2jw6VByiE6mM0ZD8,678
64
- phc_ingestion-0.10.14.dist-info/RECORD,,
62
+ phc_ingestion-0.10.16.dist-info/WHEEL,sha256=B19PGBCYhWaz2p_UjAoRVh767nYQfk14Sn4TpIZ-nfU,87
63
+ phc_ingestion-0.10.16.dist-info/METADATA,sha256=93pAgQ-3MryemXhW8ucjSC0zGTcbq0tXciquL94S2tY,678
64
+ phc_ingestion-0.10.16.dist-info/RECORD,,