carmonalab / GeneNMF

Methods to discover gene programs on single-cell data
74 stars 3 forks source link

Error in `$<-`(`*tmp*`, h, value = `*vtmp*`) #13

Open cjhong opened 1 week ago

cjhong commented 1 week ago

First of all, thank you for the great NMF development for a single-cell analysis

I installed GeneNMF and RcppML from github via dev/remotes. I got the following error message and I guess something related w/ the other package or dependency issue.

------

library(GeneNMF) library(RcppML) library(Seurat) library(ggplot2) library(UCell) library(patchwork) library(Matrix) library(viridis)

options(timeout=1000)

ddir <- "input" data.path <- sprintf("%s/pbmc_multimodal.downsampled20k.seurat.rds", ddir)

if (!file.exists(data.path)) { dir.create(ddir) dataUrl <- "https://www.dropbox.com/s/akzu3hp4uz2mpkv/pbmc_multimodal.downsampled20k.seurat.rds?dl=1" download.file(dataUrl, data.path) }

seu <- readRDS(data.path) seu.list <- SplitObject(seu, split.by = "donor")

geneNMF.programs <- multiNMF(seu.list, assay="SCT", slot="data", k=4:9, nfeatures = 1000)

Error in $<-(*tmp*, h, value = *vtmp*) : no method for assigning subsets of this S4 class

mass-a commented 1 week ago

Hello, do you get the same error if you test the installation on the toy dataset:

library(GeneNMF)
data(sampleObj)

sampleObj.list <- Seurat::SplitObject(sampleObj, split.by = "donor")
geneNMF.programs <- multiNMF(sampleObj.list, k=4:9)

That may give an indication if it's an issue with the installation, or with the dataset from the demo. Also please post your sessionInfo().

mass-a commented 6 days ago

Rereading more carefully your message, I see that you are installing RcppML from GitHub. Please use instead the release version of RcppML from CRAN: install.packages("RcppML")

cjhong commented 5 days ago

I reinstalled the RcppML from CRAN. It works now! Thank you