Closed rialc13 closed 3 months ago
The name of the clade will be the starting (after pseudoroot) node. Currently, we don't have any function to extract it automatically. You can manually extract them by every sub-clusters from "sub_cluster_labels" in .obs
. For example adata.obs[adata.obs.sub_cluster_labels.isin(["3","1"])
in your case
Is there anyway we can get the clade information before generating the plot? For example, if I just run the function st.spatial.trajectory.pseudotimespace_global (not the st.pl.cluster_plot), how can I fetch the clade number?
You can extract the graph like this
import networkx as nx
from stlearn.utils import _read_graph
G = _read_graph(data,"PTS_graph")
G.remove_node(9999)
nx.draw_networkx(G)
Hi. I am running the below code for creating trajectories -
tree_plot(bdata, use_label="seurat_clusters")
After I generate the tree plot, I get the clade number information. Can you tell me how to fetch the number of clades & the clade number from my anndata object itself? For eg, if my iroot = cluster 0, & my list_clusters = 4,13, what will be the command for fetching the clade information just for this trajectory?