Hi bioconductor support team,
I had run the same script for getting SNPs ID from a genome range by using biomaRt. Despite being able of getting the information needed for several ranges (about 26), there are two of them that didn't work.
Here is the script I've been using.
snp_mart = useMart(biomart = "ENSEMBL_MART_SNP",
dataset = "hsapiens_snp",
host = "grch37.ensembl.org")
snp_id9 = getBM(attributes = c("refsnp_id", "allele","chr_name", "chrom_start", "chrom_end", "chrom_strand"),
filters = c("chr_name", "start", "end"),
values = list(9, 106356922, 107356689),
mart = snp_mart)
snp_id8 = getBM(attributes = c("refsnp_id", "allele","chr_name", "chrom_start", "chrom_end", "chrom_strand"),
filters = c("chr_name", "start", "end"),
values = list(8, 143262170, 144261715),
mart = snp_mart)
I am getting two Error messages when I re-run it - sometimes the first and sometimes the second. As I mentioned, I used exactly the same thing for 26 different ranges and everything went smooth.
Here the first one: Error in getBM(attributes = c("refsnpid", "allele", "chrname", "chrom_start", : The query to the BioMart webservice returned an invalid result: biomaRt expected a character string of length 1. Please report this on the support site at http://support.bioconductor.org
Here the second one: Error in curl::curlfetchmemory(url, handle = handle) : Timeout was reached: Operation timed out after 600000 milliseconds with 77645 bytes received
I would like to get some enlightenment to solve this issue. Thank you very much for your help in advance.
Hi Mike - many thanks for your help. It works!!! I've tried creating blocks but not as matrix. Your strategy works just perfect. Than you very much indeed.
Hi Mke - I think there is something wrong with both chromosome 8 and 9. I have retrieved the SNP IDs based on genome coordinates for chromosomes 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 18, 19, 20, 22, but I can't do it for chromosomes 8 and 9. I have also tried your script and mines in another terminal - considering the PC is the issue, but it wasn't successful as well.
I am getting this error:
Also, this debugging function pop up message:
I really appreciate any help in this matter.
Ensembl's BioMart seems to be exceptionally slow for me at the moment - I suspect you're encountering the same problem as before, but even our smaller windows are timing out.
Maybe you can try the REST API instead. The following code works similarly to before, but uses the REST API rather than BioMart to retrieve the data, and seem much faster to me.
You don't have quite the same control over the output columns, but I think everything you want should still be present: