Data

For data management

source

get_net_data

 get_net_data (adata, n:int=5)

*Get demo data from the latent space

Args: adata (type): Annot data of scanpy n (int, optional): rows to sample. Defaults to 5.

Returns: tuple: nodes, edges*

Type Default Details
adata
n int 5 number of nodes per subset/group
Returns tuple
## demo data
import scanpy as sc
nodes,edges=get_net_data(sc.datasets.pbmc68k_reduced())
nodes.head(1)
cell id bulk_labels n_genes percent_mito n_counts S_score G2M_score phase louvain x y
0 CAGACAACAAAACG-7 CD4+/CD25 T Reg 1109 0.012702 3779.0 -0.054589 -1.267457 G1 0 -7.174749 -6.994063
edges.head(1)
cell id1 cell id2 distance
0 CAGACAACAAAACG-7 GTGATGACTGGGAG-4 1.298669