Bering.graphs.BuildGraph_fromRaw

Bering.graphs.BuildGraph_fromRaw(bg, df_spots, df_features, n_neighbors=10, beta=1.0, device='cuda')[source]

Build Graphs from unsegmented spots

Parameters:
  • bg (Bering_Graph) – Bering object

  • df_spots (DataFrame) – input dataframe of spots with columns of x, y and features

  • df_features (DataFrame) – the metadata table of all features

  • n_neighbors (int) – number of neighbors in KNN

  • device (str) – device to run the model. Options: ‘cuda’ or ‘cpu’

Returns:

: Graph of torch_geometric.data.Data