Skip to content

Commit

Permalink
Convert cell_metadata index from integer to string for latest MERFISH…
Browse files Browse the repository at this point in the history
… public data (#679)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Giovanni Palla <25887487+giovp@users.noreply.github.com>
Co-authored-by: LLehner <64135338+LLehner@users.noreply.github.com>
  • Loading branch information
4 people committed May 19, 2023
1 parent b074135 commit 3684f11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion squidpy/read/_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def visium(
)
coords.columns = ["in_tissue", "array_row", "array_col", "pxl_col_in_fullres", "pxl_row_in_fullres"]
# https://github.com/scverse/squidpy/issues/657
coords.set_index(coords.index.astype(adata.obs.index.dtype), inplace=True)
coords.set_index(coords.index.astype("str"), inplace=True)

adata.obs = pd.merge(adata.obs, coords, how="left", left_index=True, right_index=True)
adata.obsm[Key.obsm.spatial] = adata.obs[["pxl_row_in_fullres", "pxl_col_in_fullres"]].values
Expand Down

0 comments on commit 3684f11

Please sign in to comment.