Request to BioMart web service failed. Tried multiple marts, can't seem to get it working

314 views
Skip to first unread message

Ian Pan

unread,
Dec 15, 2015, 5:04:04 AM12/15/15
to biomart-users
Hi all,

I am using R. I have a dataframe that has 3 columns - chromosome number, chromosome start position, chromosome end position - for 483 genes of interest. 

I'm trying to use biomart to get all the rs numbers associated with each gene. Right now, my code looks like this:

require(biomaRt)

hg19.snpmart <- useMart(biomart="ENSEMBL_MART_SNP",  host="grch37.ensembl.org", path="/biomart/martservice", dataset="hsapiens_snp")

get.rs <- function(chr, start, end) {
    getBM(c("refsnp_id", "allele", "chrom_start", "chrom_strand"), filters=c("chr_name", "start", "end"),
               values=list(chr, start, end), mart=hg19.snpmart)
}
rsid <- with(dataframe, Map(get.rs, chr.name, chr_start, chr_end))

dataframe is the dataframe referred to in the beginning, chr.name, chr_start, chr_end are the columns.

The last line runs for a long time, then it says:

Error in value[[3L]](cond) :
  Request to BioMart web service failed. Verify if you are still connected to the internet. Alternatively the BioMart web service is temporarily down.

I've tried using a different host (feb2014.archive.ensembl.org) as well as a different function: useEnsembl(biomart="snp", dataset="hsapiens_snp", GRCh=37). Both give the same result.

Does it have something to do with the fact that this function probably takes a long time to run so there's a web time out? Is there a way to circumvent this issue?

Thanks in advance.

Thomas Maurel

unread,
Dec 15, 2015, 5:21:13 AM12/15/15
to Ian Pan, biomart-users
Dear Ian,

Do you remember when you had the error? We updated the GRCh37 website to e!83 yesterday early afternoon so that would explain the time out error as the website and marts had a short downtime.
If you still get the error, could you please try to use the Ensembl gene mart instead of the Variation mart since you are only interested in variant information associated with ensembl gene IDs. This will reduce the work that BioMart needs to do to retrieve the data that you are interested in.
For information, we have Variant and gene information available in the Ensembl gene and variation marts, the difference between the two is the following:
* Ensembl gene mart is gene centric and only contains variants linked to Ensembl Transcripts.
* Ensembl Variation mart is variant centric and contains all the variants available in Ensembl.

Your code will looks like the following for the Ensembl gene mart:
require(biomaRt)

hg19.genemart <- useMart(biomart="ENSEMBL_MART_ENSEMBL",  host="grch37.ensembl.org", path="/biomart/martservice", dataset="hsapiens_gene_ensembl")

get.rs <- function(chr, start, end) {
    getBM(c("variation_name", "allele", "chromosome_start", "snp_chromosome_strand"), filters=c("chromosome_name", "start", "end"),
               values=list(chromosome_name, start, end), mart=hg19.genemart)
}
rsid <- with(dataframe, Map(get.rs, chr.name, chr_start, chr_end))

Alternatively, please send me your dataframe so that I can have a look at the mart queries.

Hope this helps,
Regards,
Thomas
--
You received this message because you are subscribed to the Google Groups "biomart-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biomart-user...@googlegroups.com.
Visit this group at https://groups.google.com/group/biomart-users.
For more options, visit https://groups.google.com/d/optout.

--
Thomas Maurel
Bioinformatician - Ensembl Production Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Wellcome Trust Genome Campus
Hinxton
Cambridge CB10 1SD
United Kingdom

Ian Pan

unread,
Dec 15, 2015, 10:51:41 AM12/15/15
to biomart-users, gotk...@gmail.com, mau...@ebi.ac.uk
This worked. Thanks!

Ian Pan

unread,
Dec 25, 2015, 5:16:27 PM12/25/15
to biomart-users, gotk...@gmail.com, mau...@ebi.ac.uk
It turns out that using the gene mart misses some of the variants that I want. Previously, I had resolved the issue by querying only a subset of the 400 genes at one time. However, right now I'm only trying to query one gene and get all the variants between the start/end position of that gene and I'm getting the same error for some reason. I don't think the web service is down because I can carry out my query using the website online. However, I'm going to need to do this in R in order to repeat it for all of my gene start/end positions. Is the web service through R down for some reason?

Thomas Maurel

unread,
Jan 7, 2016, 5:09:04 AM1/7/16
to Ian Pan, biomart-users
Dear Ian,

Do you still experience issues with the mart web service being down through R?
Could you please send me an example so that I can investigate further?

Thanks a lot,
Regards,
Thomas

Justyna

unread,
Jan 25, 2016, 12:12:23 PM1/25/16
to biomart-users
Hey guys,

I'm new in BioMart. Therefore, I'd appreciate your help.
I've encountered the Problem with connecting to BioMart. I tried to change the hosts
listMarts(host = "http://www.ensembl.org")

but still I have an error
equest to BioMart web service failed. Verify if you are still connected to the internet.  Alternatively the BioMart web service is temporarily down.  Check http://www.biomart.org and verify if this website is available.
Error: XML content does not seem to be XML: 


Any ideas what I can do to move forward?
Thanks a lot,
Justa
Reply all
Reply to author
Forward
0 new messages