phlower.pl.harmonic_backbone_3d
- phlower.pl.harmonic_backbone_3d(adata: AnnData, fate_tree: str = 'fate_tree', backbone_width: float = 3, backbone_color: str = 'black', backbone_joint_size: float = 10, backbone_joint_color: str = 'black', is_color_backbone_joint: bool = False, is_color_backbone: bool = False, full_traj_matrix: str = 'full_traj_matrix', clusters: str = 'trajs_clusters', evector_name: str | None = None, retain_clusters: List = [], dims: List[int] = [0, 1, 2], figsize: Tuple[int, int] = (800, 800), ax=None, sample_ratio: float = 0.1, xylabel: bool = True, show_legend=True, fig_path=None, return_fig=False, color_palette=['#d60000', '#8c3bff', '#018700', '#00acc6', '#97ff00', '#ff7ed1', '#6b004f', '#ffa52f', '#573b00', '#005659', '#0000dd', '#00fdcf', '#a17569', '#bcb6ff', '#95b577', '#bf03b8', '#645474', '#790000', '#0774d8', '#fdf490', '#004b00', '#8e7900', '#ff7266', '#edb8b8', '#5d7e66', '#9ae4ff', '#eb0077', '#a57bb8', '#5900a3', '#03c600', '#9e4b00', '#9c3b4f', '#cac300', '#708297', '#00af89', '#8287ff', '#5d363b', '#380000', '#fdbfff', '#bde6bf', '#db6d01', '#93b8b5', '#e452ff', '#2f5282', '#c36690', '#54621f', '#c49e72', '#038287', '#69e680', '#802690'], **args)
plot backbone in cumsum sapce 1. call plot_trajectory_harmonic_lines 2. plot fate_tree nodes 3. plot fate_tree edges 4. add arrows to the tree edges.
Parameters
- adata: AnnData
adata object
- fate_tree: str
fate tree name in adata.uns
- backbone_width: float
width of the backbone, default 3
- backbone_color: str
color of the backbone, default black
- backbone_joint_size: float
size of the backbone joint, default 10
- backbone_joint_color: str
color of the backbone joint, default black
- is_color_backbone_joint: bool
if color the backbone joint, default False to color as black
- is_color_backbone: bool
if color the backbone, default False to color as black
- full_traj_matrix: str
full trajectory matrix name in adata.uns, default ‘full_traj_matrix’
- clusters: str
clusters name in adata.uns, default ‘trajs_clusters’
- evector_name: str
evector name in adata.uns, default None
- retain_clusters: List
retain clusters in the clusters, default [] to use all
- dims: List[int]
dimensions to plot, default [0,1,2]
- figsize: Tuple[int,int]
figure size, default (800,800)
- ax: matplotlib.axes.Axes
axes to plot on, default None
- sample_ratio: float
sample ratio to plot, default 0.1
- xylabel: bool
if show xy label, default True
- show_legend: bool
if show legend, default True
- fig_path: str
figure path to save, default None
- return_fig: bool
if return the figure, default False
- color_palette: List[str]
color palette to use, default sns.color_palette(cc.glasbey, n_colors=50).as_hex()
- **args:
fig.add_scatter3d args