Skip to content

Commit 703889e

Browse files
authored
Merge pull request #17 from openpipelines-bio/cosmx-float-conversion
float32 conversion for cosmx metrics
2 parents 088ba74 + 8b85ab5 commit 703889e

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

CHANGELOG.MD

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# openpipeline_qc 0.2.2
2+
3+
## BUG FIX
4+
5+
* `src/ingestion_qc/h5mu_to_qc_json`: Use float32 instead of float16 for CosMx staining metrics to prevent overflow to infinity (PR #17).
6+
17
# openpipeline_qc 0.2.0
28

39
## NEW FEATURES

src/ingestion_qc/h5mu_to_qc_json/script.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def format_cosmx_columns(mod_obs):
307307
if key in mod_obs:
308308
if not pd.api.types.is_float_dtype(mod_obs[key]):
309309
try:
310-
mod_obs[key] = mod_obs[key].astype("float16")
310+
mod_obs[key] = mod_obs[key].astype("float32")
311311
except ValueError:
312312
logger.warning(f"Could not convert column {key} to a float dtype.")
313313

0 commit comments

Comments
 (0)