lynx.dataset.HeteroDataset

class lynx.dataset.HeteroDataset(*args, **kwargs)[source]

Bases: XeniumDataset

Load paired multi-modal ST data w/ hybrid resolutions into a hetero-graph

Parameters:
  • adatas_ref (scanpy.AnnData | List[scanpy.AnnData])

  • adatas_query (scanpy.AnnData | List[scanpy.AnnData])

  • k (int)

  • r (float)

  • r_bigraph (float)

  • n_subgraphs (int)

  • is_query_grid (bool)

  • is_ref_grid (bool)

__init__(adatas_ref, adatas_query, k=8, r=50.0, r_bigraph=30.0, n_subgraphs=8, is_query_grid=True, is_ref_grid=False, **kwargs)[source]
Parameters:
  • adatas_ref (scanpy.AnnData | List[scanpy.AnnData])

  • adatas_query (scanpy.AnnData | List[scanpy.AnnData])

  • k (int)

  • r (float)

  • r_bigraph (float)

  • n_subgraphs (int)

  • is_query_grid (bool)

  • is_ref_grid (bool)

Methods

__init__(adatas_ref, adatas_query[, k, r, ...])

construct_graph(neighbor_nodes, distances[, ...])

Compute undirected graph edges & attributes

construct_hetero_graph(ref_neighbors, distances)

Compute ref -> query & query -> ref edges & attributes to construct hetero-graph, ref_neighbors - (dim: [L', k])

get(idx)

get_neighbors(ref_coords, query_coords[, ...])

Retrieve k-nearest-neighbor (or radius-bounded neighbors) of query_coords to ref_coords using a KDTree

len()

load_graphs()

construct_hetero_graph(ref_neighbors, distances)[source]

Compute ref -> query & query -> ref edges & attributes to construct hetero-graph, ref_neighbors - (dim: [L’, k])