KrishnaswamyLab / phateR

PHATE dimensionality reduction method implemented in R
GNU General Public License v2.0
77 stars 9 forks source link

Seurat Input for PHATE after preprocessing. #60

Closed mauripops closed 2 years ago

mauripops commented 2 years ago

Sorry if a similar issue has been raised already but if it did I was unable to find it.

From my understanding from the tutorial PHATE is ran on the normalized data counts of a seurat object. Data which can be accessed witht(GetAssayData(SeuratObj,slot="data")).

I am trying to use Harmony to reduce batch effects of the data but the ouput from it is a given as a dimensionality reduction and the tool does not alter the raw.data, scale.data or data of the seurat object.

What would be the appropriate way to pass the batch normalized data to Phate for analysis?

scottgigante commented 2 years ago

You can simply pass the output of Harmony to phateR -- instead of t(GetAssayData(SeuratObj,slot="data")) you would use Embeddings(sobj, reduction = "harmony") (or whatever the key is for your Harmony DR.) It will work fine with any latent dimension as input, e.g. PCA, SVD, Harmony on PCA, NMF, etc etc.