aertslab / SCENIC

SCENIC is an R package to infer Gene Regulatory Networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
394 stars 94 forks source link

Error in runSCENIC_2_createRegulons() #217

Open ZJ-zuojing opened 2 years ago

ZJ-zuojing commented 2 years ago

Hello, When I run runSCENIC_2_createRegulons(scenicOptions) , I get the following error:

Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘getSettings’ for signature ‘"NULL"’

Bellow is the code I ran. @s-aibar Could you please help me understand where the problem is ?

library(Seurat) library(clustree) library(cowplot) library(dplyr) library(ggplot2) rds<-readRDS("rds_withoutR.rds") exprMat <- as.matrix(rds@assays$RNA@data,row.names=1) cellInfo <- rds@meta.data[,c(45,3,2)] colnames(cellInfo)=c('cluster', 'nGene' ,'nUMI')

library(SCENIC) a<-c("hg38refseq-r8010kb_up_and_down_tss.mc9nr.feather","hg38refseq-r80500bp_up_and_100bp_down_tss.mc9nr.feather") myDatasetTitle <- "SCENIC example on C11_DA" scenicOptions <-initializeScenic(org="hgnc",dbDir="/mnt/3/ywlai_genome/database/SCENIC/motif/",datasetTitle=myDatasetTitle,dbs=a,nCores=10) saveRDS(scenicOptions, file="int/scenicOptions.Rds") genesKept <- geneFiltering(exprMat, scenicOptions=scenicOptions, minCountsPerGene=3.01ncol(exprMat), minSamples=ncol(exprMat)*.01) exprMat_filtered <- exprMat[genesKept, ] runCorrelation(exprMat_filtered, scenicOptions) exprMat_filtered_log <- log2(exprMat_filtered+1) runGenie3(exprMat_filtered_log, scenicOptions) exprMat_log <- log2(exprMat+1) scenicOptions@settings$dbs <- scenicOptions@settings$dbs["10kb"] scenicOptions <- runSCENIC_1_coexNetwork2modules(scenicOptions) scenicOptions <- runSCENIC_2_createRegulons(scenicOptions)

u2e389y commented 4 months ago

I'm having the same issue, can you tell me how you solved it,thank you

MujeebQadiri commented 4 months ago

Same here! Has anyone figured this out?

or-lazarescu commented 3 months ago

i have the same issue as above. only solution so far was to re-initialize scenicOption object

also: when saving scenicOptions object as .Rds mid analysis and re-reading it for the next stage results always in the same error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘getSettings’ for signature ‘"summaryDefault"’ Calls: runSCENIC_3_scoreCells -> getSettings -> <Anonymous> Execution halted

u2e389y commented 3 months ago

i have the same issue as above. only solution so far was to re-initialize scenicOption object

also: when saving scenicOptions object as .Rds mid analysis and re-reading it for the next stage results always in the same error: Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘getSettings’ for signature ‘"summaryDefault"’ Calls: runSCENIC_3_scoreCells -> getSettings -> <Anonymous> Execution halted

thank you,that's true