Skip to content

Commit

Permalink
Merge pull request #68 from scverse/fix/merscope
Browse files Browse the repository at this point in the history
  • Loading branch information
LucaMarconato authored Jul 14, 2023
2 parents 0914659 + 16a4d14 commit 59330d8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/spatialdata_io/readers/merscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,10 @@ def merscope(
transcripts = PointsModel.parse(
transcript_df,
coordinates={"x": MerscopeKeys.GLOBAL_X, "y": MerscopeKeys.GLOBAL_Y},
transformations={"pixels": Identity()},
transformations={"pixels": microns_to_pixels},
)
gene_categorical = dd.from_pandas(
transcripts["gene"].compute().astype("category"), npartitions=transcripts.npartitions
).reset_index(drop=True)
categories = transcripts["gene"].compute().astype("category")
gene_categorical = dd.from_pandas(categories, npartitions=transcripts.npartitions).reset_index(drop=True)
transcripts["gene"] = gene_categorical

points = {f"{dataset_id}_transcripts": transcripts}
Expand Down

0 comments on commit 59330d8

Please sign in to comment.