ArchR
ArchR copied to clipboard
Error in eval(parse(text = genome)): object 'BSgenome.Mmusculus.UCSC.mm10' not found
when I load the saved project and then use the addMotifAnnotations function, it shows this error :
Error in eval(parse(text = genome)): object 'BSgenome.Mmusculus.UCSC.mm10' not found Traceback:
- addMotifAnnotations(ArchRProj = proj, motifSet = "cisbp", name = "Motif")
- eval(parse(text = genome))
- eval(parse(text = genome))
Even though I run addArchRGenome("mm10",install=TRUE)
ahead the function. Could you please help me ? Thanks!
Hi @yingyuan830! Thanks for using ArchR! Please make sure that your post belongs in the Issues section. Only bugs and error reports belong in the Issues section. Usage questions and feature requests should be posted in the Discussions section, not in Issues.
Before we help you, you must respond to the following questions unless your original post already contained this information:
1. If you've encountered an error, have you already searched previous Issues to make sure that this hasn't already been solved?
2. Can you recapitulate your error using the tutorial code and dataset? If so, provide a reproducible example.
3. Did you post your log file? If not, add it now.
4. Remove any screenshots that contain text and instead copy and paste the text using markdown's codeblock syntax (three consecutive backticks). You can do this by editing your original post.
That looks like a small bug in the logic of the code there. The solution would be to manually load the package associated with your genome prior to running:
library(BSgenome.Mmusculus.UCSC.mm10)
I'm leaving this open to fix the logic in the code. The problem is that in many places, I removed the requirePackage()
statement that loaded the genome automatically because we wanted to support custom genomes that lacked BSgenome
objects. But in doing so, it is not longer guaranteed that the proper BSgenome package is loaded prior to the eval(parse())
statement. I think the solution is just to remove the eval(parse())
statement and let the validBSgenome()
function do all of the work.
https://github.com/GreenleafLab/ArchR/blob/f6c0388bd37023400794c9ae8562ad69e3ba9fd7/R/AnnotationPeaks.R#L494-L499
This works, thank you !
Thanks for confirming. I'm going to leave this issue open so that we're reminded to fix this bug.
Ran into this today :) it's not fun when analyzing a large data set! Although, agreed that it's a easy fix