Error log when I use biomaRt getBM
2
0
Entering edit mode
niyamurry • 0
@user-24682
Last seen 3.8 years ago

I have some problems when I use biomaRt. My R version is 4.0.3 and my biomaRt is up to date.

My problem is I can’t use the function “getBM” in all of the ways. The error log is "Error in loadNamespace(name) : there is no package called ‘withr’ ”, which I can’t found the package “withr” to support this function.

I have tried many codes to align gene profile with my data, but all failed. The error code was always shown "Error in loadNamespace(name) : there is no package called ‘withr’ ”. And I am wondering what should I do to solve this problem.

This is one of the codes I have tried, still an error.

 values <- c('WBGene00166185', 'WBGene00007063')
 attr1 <- c('ensembl_gene_id', 'external_gene_name', 'coding')
 x <- getBM(attributes = attr1, mart = ensembl, bmHeader = TRUE,
      filters = 'ensembl_gene_id', values = values)                                            

Please help me to figure out what’s wrong with my code. Thank you!

biomaRt annotationTools • 1.3k views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 3 months ago
EMBL European Molecular Biology Laborat…

Try the installation instructions, in particular, run

if(!requireNamespace("BiocManager", quietly = TRUE))
    install.packages("BiocManager")
BiocManager::install("biomaRt")

and if that still fails, please reply considering the posting guide.

ADD COMMENT
0
Entering edit mode
Mike Smith ★ 6.6k
@mike-smith
Last seen 4 hours ago
EMBL Heidelberg

I'm not exactly sure how this error message is related to using getBM(), as biomaRt doesn't use the withr package directly. It's presumably a dependency of a dependency.

I'd suggest reinstalling the withr package via:

BiocManager::install('withr')

Then try you call to getBM() again.


Missing this package could be symptomatic of some wider problem in your R library. I'd suggest also running the following code which should check you've got appropriate versions of all installed packages. I would follow any instructions it recommends to "create a valid installation"

BiocManager::valid()
ADD COMMENT

Login before adding your answer.

Traffic: 915 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6