Question: Timeout on getBM() to retrieve snps from locations
1
gravatar for Corentin
6 months ago by
Corentin380
Corentin380 wrote:

Hi everyone,

I have a list of 150 locations (eg: "10:112834:113150") and I would like to retrieve the variants found in these locations,

This is the command I use to get the variants (fantom_locs contains the list of locations):

snp_db <- useEnsembl(biomart="snp", dataset="hsapiens_snp")

snps_FANTOM <- getBM(attributes = c('refsnp_id'),
                     filters = c('chromosomal_region'), 
                     values = fantom_locs, 
                     mart = snp_db)

It works for a few locations but then I get a timeout error, I can implement a for loop to fetch the snps on one location at a time, but it is very slow and I just wondered if there was a better way to do this.

For example is it worth it to download a local version of the mart ?

timeout getbm() biomart R • 314 views
ADD COMMENTlink modified 5 months ago by Biostar ♦♦ 20 • written 6 months ago by Corentin380
5
gravatar for Ben_Ensembl
6 months ago by
Ben_Ensembl1.0k
EMBL-EBI
Ben_Ensembl1.0k wrote:

Hi Corentin,

Since this query is too large for BioMart, I would suggest using the Ensembl REST API Overlap endpoint, restricting the query using the 'feature=variation' parameter: https://rest.ensembl.org/documentation/info/overlap_region

e.g https://rest.ensembl.org/overlap/region/human/7:140424943-140624564?content-type=application/json;feature=variation

Best wishes

Ben Ensembl Helpdesk

ADD COMMENTlink written 6 months ago by Ben_Ensembl1.0k
1

Cheers ! I Just tried it, it was much faster and gave me the same list of rsid.

ADD REPLYlink written 6 months ago by Corentin380
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 617 users visited in the last hour