corceslab / CHOIR

CHOIR : Clustering Hierarchy Optimization by Iterative Random forests (www.CHOIRclustering.com)
MIT License
20 stars 5 forks source link

how to extract the PCs and UMAP coordinates after running CHOIR? Misc slots are null #5

Closed klai001 closed 9 months ago

klai001 commented 9 months ago

thank you for the nice package, i managed to run it- however i would like to extract the PCs and UMAPs coordinates which CHOIR runs to store in the reduction slots of the seurat object. i tried Misc(data.integrated, slot=Integrated) and Misc(data.integrated, slot=RNA) which you mentioned in the tutorial but everything is NULL. here's my code snippet before running CHOIR, i stored it in integrated data slot

DefaultAssay(data.integrated) <- "integrated"
library(CHOIR) 
data.integrated = CHOIR(data.integrated , n_cores = 2) 

thanks

catpetersen commented 9 months ago

Hi!

For Seurat objects, try extracting the 'misc' data using the code data.integrated@misc$CHOIR instead. The Misc() function doesn't work for this.

The CHOIR-computed PCA reductions will be under data.integrated@misc$CHOIR$reduction. The primary PCA reduction can also be found under data.integrated@reductions$CHOIR_P0_reduction.

CHOIR does not automatically compute UMAP reductions. To do so, please run the runCHOIRumap() function.

Thanks for trying CHOIR!

klai001 commented 9 months ago

thanks! i got it