saezlab / dorothea

R package to access DoRothEA's regulons
https://saezlab.github.io/dorothea/
GNU General Public License v3.0
133 stars 27 forks source link

run_viper() ERROR: no method for coercing this S4 class to a vector #71

Open sshanyiiii opened 8 months ago

sshanyiiii commented 8 months ago

Hi, I am running the example of run_viper() but reported an error "Error in as.vector(data) : no method for coercing this S4 class to a vector". Also, when I run run_viper() with my own Seurat object, the same error comes up as well. Would you help me with this?

CODE

library(bcellViper)
data(bcellViper, package = "bcellViper")
data(dorothea_hs, package = "dorothea")
tf_activities <- run_viper(dset, dorothea_hs,
                           options =  list(method = "scale", minsize = 4,
                           eset.filter = FALSE, cores = 1,
                           verbose = FALSE))

ERROR

Error in as.vector(data) : no method for coercing this S4 class to a vector

VERSION

R version 4.3.3 (2024-02-29) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 22.04.4 LTS

other attached packages: [1] bcellViper_1.38.0 Signac_1.12.0 Biobase_2.62.0 BiocGenerics_0.48.1 Seurat_5.0.2 SeuratObject_5.0.1 sp_2.1-3
[8] pheatmap_1.0.12 decoupleR_2.8.0 dorothea_1.14.1

PauBadiaM commented 8 months ago

Hi @sshanyiiii,

It seems you are looking at an old vignette. To infer TF activities we have updated our tutorials, now we run TF activity inference through decoupleR, here's a link to the vignettes: https://saezlab.github.io/decoupleR/ Hope this is helpful!

sshanyiiii commented 8 months ago

Thank you! I tried decoupleR with no error!