Skip to content

Commit 641966a

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix/1143-hvg-store-seuratv3-details
* origin/main: Set `.var` index names in `from_h5ad_to_h5mu` (#1184)
2 parents f88251c + 67023c3 commit 641966a

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@
6060

6161
* `dataflow/split_h5mu`: pin scipy version to 1.16.3 to avoid regression that corrupts large sparse matrix indexing (PR #1153).
6262

63+
* `convert/from_h5ad_h5mu`: store and reset var index names to avoid issues with a change in mudata (PR #1184).
64+
6365
* `feature_annotation/highly_variable_features_scanpy`: always store details of highly variable features, regardless of the features used (PR #1186)
6466

6567
# openpipelines 4.0.4

src/convert/from_h5ad_to_h5mu/script.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@
2929
}
3030

3131
logger.info("Converting to mudata")
32+
var_index_names = {key: adata.var.index.name for key, adata in data.items()}
3233
mudata = mu.MuData(data)
3334

3435
try:
3536
mudata.var_names_make_unique()
3637
except (TypeError, ValueError):
3738
pass
3839

40+
# Set var index names to avoid https://github.com/scverse/mudata/issues/146
41+
for key, name in var_index_names.items():
42+
mudata.mod[key].var.index.name = name
43+
3944
logger.info("Writing to %s.", par["output"])
4045
mudata.write_h5mu(par["output"], compression=par["output_compression"])
4146

0 commit comments

Comments
 (0)