califano-lab / PISCES

R package for Protein activity analysis of single-cell RNAseq.
75 stars 24 forks source link

meta_narnea/PISCESActivity: prep...Error: $ operator is invalid for atomic vectors #19

Open stanaka6 opened 1 year ago

stanaka6 commented 1 year ago

Hi,

Thank you for developing this wonderful tool!

I am facing the following error: Data prep...Error: $ operator is invalid for atomic vectors when I run meta_narnea or PISCESActivity. Could you please help me to solve this issue?

Also, I have a question about vignettes/pisces_pbmc.Rmd. What is "narnea.res" in Line 102? Is this output of meta_narnea?

Further information is below:

mySeurat <- readRDS("/path/to/mySeuratObject.rds")
counts <- as.matrix(mySeurat@assays$RNA@counts)
filt.counts <- qc_filt(counts,max.depth = 25000, species = "mur")
gexp.ges <- internal_ges(filt.counts, norm.method = 'pflpf', est.method = 'map')
net.list <- readRDS("/path/to/myARACNe3_Final_Network_List.rds")
narnea.res <- meta_narnea(gexp.ges, net.list, sample.weights = TRUE)

Data prep...Error: $ operator is invalid for atomic vectors

or

mySeurat <- readRDS("/path/to/mySeuratObject.rds")
net.list <- readRDS("/path/to/myARACNe3_Final_Network_List.rds")
mySeurat <- AddPISCESAssay(mySeurat, stage = "pact") 
mySeurat <- AddPISCESAssay(mySeurat, stage = "gexp") 
mySeurat <- NormalizeExpression(mySeurat, method = "pflogpf", filt.per = 0.01) 
mySeurat <- AddGES(mySeurat, method = "scale")
mySeurat <- AddNetworks(mySeurat, net.list) 
mySeurat <- PISCESActivity(mySeurat, net.list, sample.weights = TRUE, use.sct = FALSE)

WARNING: Running meta_narnea with sample.weights = TRUE may be very slow for large number of samples. Data prep...Error: $ operator is invalid for atomic vectors

Package versions

Any suggestions would be appreciated!

min0609 commented 1 month ago

Hi, I'm experiencing the same error and it seems to be an issue with the 'matrix_narnea' function. Have you found a solution by any chance?