Skip to content

CharlaChai/COMBINE_workshop

Repository files navigation

COMBINE_workshop

Step 1: Construct Cellular Graphs

We first construct cellular graphs as networkx.Graph using raw inputs including cell coordinates, cell types, biomarker expression, etc.

A networkx.graph can be constructed using the inputs above

The function spacegm.construct_graph_for_region also generates some visualisations for each region, stored under graph_img_output and voronoi_polygon_img_output.

The full cellular graph for each region in the dataset can be accessed using the class method get_full:

And the n-hop (n=3 in this example) subgraph of region i around its center node j can be accessed using the class method get_subgraph:

Step 2: Construct CellularGraphDataset

CellularGraphDataset will be the major data container used in model training and evaluation. This object also handles all the featurization, subgraph sampling, and other necessary functionalities for SPACE-GM.

Step 3: Initialise a Graph Neural Network (GNN)

Step 4: Train the GNN

Step 5: Evaluate the GNN

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors