phlower.tl.assign_graph_node_attr_to_adata
- phlower.tl.assign_graph_node_attr_to_adata(adata, graph_name='X_pca_ddhodge_g', from_attr='pos', to_attr='pos', iscopy=False)
assign the node attributes of a graph to adata.obs
Parameters
- adata: AnnData
The AnnData object
- graph_name: str
The name of the graph in adata.uns
- from_attr: str
The attribute of the graph nodes
- to_attr: str
The attribute of the adata.obs
Returns
- AnnData
The AnnData object with the new attribute