Closed cynthier closed 3 months ago
Have you tried this to find the root spot?
data.uns["iroot"] = st.spatial.trajectory.set_root(data,use_label="region_num",cluster=4,use_raw=True)
Also, you can check this https://github.com/BiomedicalMachineLearning/stLearn/issues/86#issuecomment-778539173
@duypham2108 Thank you for your reply. I get the same result using the code you recommended. Based on the prior knowledge, the cluster4 should be the root, but now the trajectory direction is reversed.
How does this cluster4 look in the UMAP? If it's on the edge, you can manually pick the terminal spot (at the end of the cluster). If the number of spots is few, it may also lead to this issue. You should look at the pseudotime plot to identify the problem
Hi, I set the root as cluster 4, but the trajectory start from cluster 0. Could you please help me?