paste3.model_selection.create_graph

paste3.model_selection.create_graph(adata, degree=4)[source]

Converts spatial coordinates into graph using networkx library.

param: adata - ST Slice param: degree - number of edges per vertex

return: 1) G - networkx graph
  1. node_dict - dictionary mapping nodes to spots