Skip to content

Commit

Permalink
gene column was shuffled
Browse files Browse the repository at this point in the history
  • Loading branch information
quentinblampey committed Oct 20, 2023
1 parent 53cd8ef commit f6c911b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/spatialdata_io/readers/merscope.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,7 @@ def _get_points(transcript_path: Path) -> dd.DataFrame:
coordinates={"x": MerscopeKeys.GLOBAL_X, "y": MerscopeKeys.GLOBAL_Y},
transformations={"microns": Identity()},
)
categories = transcripts["gene"].compute().astype("category")
gene_categorical = dd.from_pandas(categories, npartitions=transcripts.npartitions).reset_index(drop=True)
transcripts["gene"] = gene_categorical
transcripts["gene"] = transcripts["gene"].astype("category")
return transcripts


Expand Down

0 comments on commit f6c911b

Please sign in to comment.