BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
176 stars 23 forks source link

Is pseudoroot & iroot the same? #260

Closed rialc13 closed 6 months ago

rialc13 commented 8 months ago

Hi. I had a follow up question to the issue #171 . The commands mentioned in the tutorial are as follows -

data.uns["iroot"] = st.spatial.trajectory.set_root(data,use_label="louvain",cluster=6,use_raw=True)
st.spatial.trajectory.pseudotimespace_global(data,use_label="louvain",list_clusters=["6","8"])

As you mentioned in the issue #171 , the iroot & the list_clusters need not be the same. Subsequently in the tutorial, a trajectory plot is created depicting the clades which originate from a 'pseudoroot'. So is the data.uns["iroot]" command being used to set the pseudoroot (which to my understanding, indicates the starting point from where all clusters are originating)? Setting iroot = 6 & list_clusters = 2,4 would mean that cluster 6 is the pseudoroot from which clusters 2,4 are originating & we then see the transition from cluster 2 to cluster 4?

duypham2108 commented 8 months ago

I meant the iroot can be in or not in the list_clusters. Basically, iroot is the starting point of every cluster as you said. list_clusters here is for setting the context of 2 clusters only and also subset the pseudotime created by iroot. A 'pseudoroot' here is an assumption for that specific context. It can be the iroot or a cell that is dead already/in another tissue dimension (we can't tell). These terms should be used separately