rapids_singlecell.tl.draw_graph

Contents

rapids_singlecell.tl.draw_graph#

rapids_singlecell.tl.draw_graph(adata, *, init_pos=None, max_iter=500)[source]#

Force-directed graph drawing with cugraph’s implementation of Force Atlas 2. This is a reimplementation of scanpys function for GPU compute.

Parameters:
adata AnnData

annData object with ‘neighbors’ field.

init_pos str | bool | None (default: None)

'paga'/True, None/False, or any valid 2d-.obsm key. Use precomputed coordinates for initialization. If False/None (the default), initialize randomly.

max_iter int (default: 500)

This controls the maximum number of levels/iterations of the Force Atlas algorithm. When specified the algorithm will terminate after no more than the specified number of iterations. No error occurs when the algorithm terminates in this manner. Good short-term quality can be achieved with 50-100 iterations. Above 1000 iterations is discouraged.

Return type:

None

Returns:

updates adata with the following fields.

X_draw_graph_layout_faadata.obsm

Coordinates of graph layout.