CellScope.ts.tree_structure_visualization_step
CellScope.ts. tree_structure_visualization_step (T, step0, step1, Title_1, Title_all, Y_initial,
Y_1, Y_all, index_1, index_all, **main_radius**=2.0, **orbit_radius**=1.5, **orbit_distance**=4.0,
**branch_params**=None, **save_fig**=False, **save_path**=’’)
The tree_structure_visualization_step function progressively constructs the main trunk and branch components of the tree-structured visualization, enabling users to freely assemble them.
Parameters
- T (
np.ndarray): Matrix of clustering labels for different levels of clustering.
- T (
- step0 (
int): Final starting level for the tree-structured visualization.
- step0 (
- step1 (
int): Final ending level for the tree-structured visualization.
- step1 (
- Title_1 (
list): List of titles for the first-level clusters.
- Title_1 (
- Title_all (
list): List of titles for clusters at all levels.
- Title_all (
- Y_initial (
np.ndarray): Initial 2D UMAP embedding of all cells.
- Y_initial (
- Y_1 (
listofnp.ndarray): List of UMAP embeddings for clusters at the first level.
- Y_1 (
- Y_all (
listofnp.ndarray): List of UMAP embeddings for clusters at all levels.
- Y_all (
- index_1 (
list): List of indices corresponding to cells in each cluster at the first level.
- index_1 (
- index_all (
list): List of indices corresponding to cells in each cluster at all levels.
- index_all (
- main_radius (
float, optional, default=2.0): The node radius of the zeroth-layer nodes.
- main_radius (
- orbit_radius (
float, optional, default=1.5): The node radius of the first-layer nodes.
- orbit_radius (
- orbit_distance (
float, optional, default=4.0): The distance between the centers of the first-layer nodes and the zeroth-layer nodes.
- orbit_distance (
- branch_params (
Noneordict, optional, default=None): Additional parameters for branch customization.
- branch_params (
- save_fig (
bool, optional, default=False): If True, saves the figures to the specified path.
- save_fig (
- save_path (
str, optional, default=’’): Directory path to save the figures. Required if save_figure=True.
- save_path (
Returns
Two dictionaries
R_dictandC_dict, containing node radii and center coordinates for plotting.