diff --git a/docs/release-notes/0.15.0.md b/docs/release-notes/0.15.0.md index 95485c2e..017ed505 100644 --- a/docs/release-notes/0.15.0.md +++ b/docs/release-notes/0.15.0.md @@ -10,3 +10,4 @@ ```{rubric} Bug fixes ``` * Fix multi-GPU ``cudaErrorLaunchFailure`` during cross-device result aggregation when using RMM without pool allocation for very large datasets {pr}`594` {smaller}`S Dicks` +* Fix ForceAtlas2 random cell ordering by sorting positions by vertex in ``tl.draw_graph`` {pr}`621` {smaller}`L Faure` diff --git a/src/rapids_singlecell/tools/_draw_graph.py b/src/rapids_singlecell/tools/_draw_graph.py index c1e73e42..510ef163 100644 --- a/src/rapids_singlecell/tools/_draw_graph.py +++ b/src/rapids_singlecell/tools/_draw_graph.py @@ -99,6 +99,7 @@ def draw_graph( gravity=1.0, random_state=0, ) + positions = positions.sort_values("vertex").reset_index(drop=True) positions = cp.vstack((positions["x"].to_cupy(), positions["y"].to_cupy())).T layout = "fa" adata.uns["draw_graph"] = {}