scglue.genomics.anchored_guidance_graph

scglue.genomics.anchored_guidance_graph(anchor, *others, extend_range=0, extend_fn=dist_power_decay, signs=None, propagate_highly_variable=True)[source]

Build guidance graph anchored on one particular dataset

Parameters:
  • adata – Anchor dataset

  • *others (AnnData) – Other datasets

  • extend_range (int) – Maximal extend distance beyond anchor genomic features

  • extend_fn (typing.Callable[[int], float]) – Distance-decreasing weight function for the extended regions (by default dist_power_decay())

  • signs (typing.Optional[typing.List[int]]) – Sign of edges between anchor features and features in each *others dataset, must have the same length as *others. Signs must be one of {-1, 1}. By default, all edges have positive signs of 1.

  • propagate_highly_variable (bool) – Whether to propagate highly variable genes to other datasets, datasets in *others would be modified in place.

Return type:

MultiDiGraph

Returns:

graph – Prior regulatory graph

Note

In this function, features in the same dataset can only connect to anchor genes via the same edge sign. For more flexibility, please construct the guidance graph manually.