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.
first delaunay triangulation on graph.
check barcode0 of different radius of from the triangulated graph
when there’s only one connected component move a litte bit forward.
perform the filtering.
connect starts and the ends.
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