phlower.tl.construct_delaunay_persistence

phlower.tl.construct_delaunay_persistence(adata: AnnData, graph_name: str | None = None, layout_name: str | None = None, filter_ratio: float = 1.2, min_persistence=0.1, cluster_name: str = 'group', circle_quant=0.1, node_attr='u', start_n=5, end_n=5, random_seed=2022, calc_layout: bool = False, iscopy: bool = False)

reimplement the function of construct_delaunay by using persistence analysis filtering.

  1. first delaunay triangulation on graph.

  2. check barcode0 of different radius of from the triangulated graph

  3. when there’s only one connected component move a litte bit forward.

  4. perform the filtering.

  5. connect starts and the ends.

  6. store the SimplexTree information for plotting

Parameters

adata: AnnData

an Annodata object

graph_name: str

the graph name in adata.uns

layout_name: str

the layout name in adata.obsm

filter_ratio: float

the cut-off threshold for triangulation, default 1.2

min_persistence: float

minimum value for simplextree persistence calculating

circle_quant: float

quantile for connecting start and end points

node_attr: str

node attribute for connecting

start_n: int

number of start points

end_n: int

number of end points

random_seed: int

random seed for selecting start and end points

calc_layout: bool

whether to calculate layout for the delaunay graph

iscopy: bool

whether to return a copy of adata