corceslab / CHOIR

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

'seurat_object' bug #14

Closed inofechm closed 1 month ago

inofechm commented 1 month ago

Hi,

Congrats on the preprint! I am trying to use CHOIR and ran into a minor error. If I run the CHOIR function on an object titled 'seur_obj' I get the following error: seur_obj <- CHOIR(object= seur_obj, n_cores = 4)

2024-07-11 15:22:59 : (Step 1/6) Running initial dimensionality reduction..
                      Preparing matrix using 'RNA' assay and 'data' slot..
Error in .getMatrix.Seurat(object, use_matrix, use_assay, use_slot, use_features,  : 
  object 'seurat_object' not found

but if I change the name to seurat_object it works

seurat_object = seur_obj
seurat_object <- CHOIR(object= seurat_object, n_cores = 4)

I think this may be due to lines 124-126 in HelperUtils.R referring to seurat_object instead of object.

Best, Ido

catpetersen commented 1 month ago

Thanks! Caught this as well--it's been fixed in the dev branch, commit https://github.com/corceslab/CHOIR/commit/0c7272e02f26ba6a5360ed07d6f490165057192b Will be fixed in the main branch soon!

You can install the dev branch as follows:

remotes::install_github("corceslab/CHOIR", ref = "dev", repos = BiocManager::repositories(), upgrade = "never")
# To unload a package and reload
detach("package:CHOIR", unload = TRUE)
library(CHOIR)
inofechm commented 1 month ago

Thank you!