biomaRt error for different R version
1
0
Entering edit mode
7 months ago
manaswwm ▴ 550

Hello all,

I am trying to run this simple piece of R code which uses the biomaRt package:

#importing biomaRt library 
library(biomaRt)

#delcaring hsap mart 
hsap_mart = useEnsembl(biomart = 'genes', 
                       dataset = 'hsapiens_gene_ensembl',
                       version = 95)

I run this same piece of code for two R versions - 4.3.1 and 4.3.2. The code runs fine for version 4.3.2 but it gives the following error for 4.3.1:

Error in `collect()`:
! Failed to collect lazy table.
Caused by error in `db_collect()`:
! Arguments in `...` must be used.
x Problematic argument:
* ..1 = Inf
i Did you misspell an argument name?
Run `rlang::last_trace()` to see where the error occurred.
Error during wrapup: 'length = 2' in coercion to 'logical(1)'
Error: no more error handlers available (recursive errors?); invoking 'abort' restart

Theoretically, I can just ignore the error and keep using 4.3.2, but just wanted to know what could be causing this error for 4.3.1.

Any ideas?

biomaRt R • 1.1k views
ADD COMMENT
0
Entering edit mode

Tagging: Mike Smith

ADD REPLY
2
Entering edit mode
7 months ago
GenoMax 147k

There is a proposed solution here and it relates to dplyr: https://stackoverflow.com/questions/77370659/error-failed-to-collect-lazy-table-caused-by-error-in-db-collect-using

This solution works for v.4.3.1.

@Mike Smith may comment.

ADD COMMENT
1
Entering edit mode

Yes, this is an issue with dbplyr and BiocFileCache, which then affects biomaRt.

The answer is as suggested in that StackOverflow post and can also be found on the Bioconductor Support Site at https://support.bioconductor.org/p/9154901/#9154924

It should be somewhat independent of the R version (at least as far as 4.3.1 vs 4.3.2 is concerned), and my guess would be that after updating R you also updated some extra packages including BiocFileCache.

ADD REPLY
0
Entering edit mode

Wonderful, and thanks for tagging Mike!

For those who come back for this problem, the following seemed to work for me:

Downgrading dbplyr package:

install.packages("devtools")

devtools::install_version("dbplyr", version = "2.3.4")

Re-running the biomaRt lines:

#importing biomaRt library
library(biomaRt)


#delcaring hsap mart 
hsa_mart = useEnsembl(biomart = "ensembl", dataset = "hsapiens_gene_ensembl")
ADD REPLY

Login before adding your answer.

Traffic: 1501 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