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

Why initializeScenic error: 'motifAnnotations_hgnc' not found? #364

Closed KOBE24DUNK closed 1 year ago

KOBE24DUNK commented 1 year ago

I'm sorry, I'm still new to SCENIC and RStudio. In fact, I tried it many times successfully in my desktop, but when I was running it on RStudio server, it always reported following error when creating scenicOptions.

`> scenicOptions <- initializeScenic(org="hgnc",

I would really appreciate it if any one can give some suggestions.

napaintian commented 1 year ago

Did the problems you encountered solved? I also encountered the same problem

ab1402 commented 1 year ago

Hi @napaintian @ShaoZhiting24,

I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows:

I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument

data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error

motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this helps!

KOBE24DUNK commented 1 year ago

Thank you so much @ab1402 for your nice help! I would try again later, and I'll give feedback here if it works. Can this help you?@napaintian

Wangzy00 commented 1 year ago

Hi @napaintian @ShaoZhiting24,

I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows:

I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this helps!

Thx!It works!

Georgeguoql commented 1 year ago

Hi @napaintian @ShaoZhiting24, I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows: I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this

Hi @napaintian @ShaoZhiting24,

I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows:

I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this helps!

I am sorry. I did not find this code (list="motifAnnotations_hgnc_v9", package="RcisTarget") in (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R). Did the author changed the code?

Georgeguoql commented 1 year ago

I have solved the problem! It works!Thanks!

z0402 commented 1 year ago

Hi @napaintian @ShaoZhiting24,

I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows:

I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this helps!

Can you explain how to solve it in detail ?

brianFSM commented 1 year ago

I'm using mouse, but had a similar issue. Here's how I resolved it in detail.

First I ran scenicOptions <- initializeScenic(org="mgi", dbDir="cisTarget_databases", nCores=10)

Note that I had to use old versions of the mouse database feather files available here:

https://resources.aertslab.org/cistarget/databases/old/

running initializeScenic generates the error message:

Motif databases selected: mm9-500bp-upstream-7species.mc9nr.feather mm9-tss-centered-10kb-7species.mc9nr.feather Error in eval(as.name(motifAnnotName)) : object 'motifAnnotations_mgi' not found

Even though there's an error message, initializeScenic did create the object 'motifAnnotations' in my environment. Then all I had to do was

motifAnnotations_mgi <- motifAnnotations

then run initializeScenic again.

hope this helps.

yunbokai commented 11 months ago

Thanks. It works.

liuyifang commented 8 months ago

i can initializescenic with the following code:

org <- "mgi" # or hgnc, or dmel
dbDir <- "cisTarget_databases/mm10"
myDatasetTitle <- "SCENIC" # choose a name for your analysis
data(defaultDbNames)
defaultDbNames$mgi[1] <- "mm10__refseq-r80__10kb_up_and_down_tss.mc9nr.feather"
defaultDbNames$mgi[2] <- "mm10__refseq-r80__500bp_up_and_100bp_down_tss.mc9nr.feather"
defaultDbNames
data(list="motifAnnotations_mgi_v9", package="RcisTarget")
motifAnnotations_mgi <- motifAnnotations_mgi_v9
scenicOptions <- initializeScenic(org = org,
                                  dbDir = dbDir,
                                  dbs = defaultDbNames[["mgi"]],
                                  datasetTitle = myDatasetTitle,
                                  nCores = cores)
scenicOptions@settings$verbose <- TRUE
scenicOptions@settings$seed <- 123
BarretTan commented 6 months ago

Hi @napaintian @ShaoZhiting24,

I had the same error as you and it basically is referring to the motifannotations file, and the name its looking for in your environment is 'motifAnnotations_hgnc', the work around I used was as follows:

I figured it out based off looking at the source code for a completely different argument (https://rdrr.io/github/aertslab/SCENIC/src/R/runSCENIC_2_createRegulons_Original.R) if you just use ctrl+f "motifAnnotations" you will find the relevant bit of code

load in the motifannotation this will load it into your environment but as the name in which is given to the list argument data(list="motifAnnotations_hgnc_v9", package="RcisTarget")

rename the motif annnotion by attributing it to the variable that is in the error motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

Hope this helps!

Thanks for you advice.

I tried to use: data(list="motifAnnotations_hgnc_v9", package="RcisTarget") motifAnnotations_hgnc <- motifAnnotations_hgnc_v9

However, it remains to return: object 'motifAnnotations_hgnc' not found and initializeScenic could not create the object 'motifAnnotations' in my environment.

Have you ever encountered a similar situation?