biomaRt error message
1
0
Entering edit mode
Ting ▴ 10
@ting-6853
Last seen 10.0 years ago
United States

Hi, all

I'm trying to get some snp information, such as ID, position, etc., from biomaRt. The code I'm using is attached below:

> require(biomaRt)

> mart <- useMart("snp")

> dataset <- useDataset("hsapiens_snp", mart=mart)

> snps.chr22 <- getBM(attributes=c('refsnp_id', 'chrom_start', 'minor_allele_freq', 'ensembl_gene_stable_id', 'consequence_type_tv', 'phenotype_description'), filters='chr_name', values=22, mart=dataset)

But after hours of waiting, I always get the same error message:

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line 545406 did not have 6 elements

The strange part is, if I run the above code in different terminals, I got the errors in every terminal at the same time but with different line numbers. For example, in one terminal the error message could be the one shown above while in another terminal the error message could look like this:

Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
  line 1405583 did not have 6 elements

Does anyone know why is this happening all the time? Thanks.

 

Sincerely,

Ting

biomaRt snp • 1.9k views
ADD COMMENT
1
Entering edit mode
Thomas Maurel ▴ 800
@thomas-maurel-5295
Last seen 21 months ago
United Kingdom

Dear Ting,

It could be that the load on the biomart.org servers was quite high when you tried your query. I've just tried the same query using the ensembl.org website and it worked fine:

> library(biomaRt)
> ensembl = useMart(biomart="ENSEMBL_MART_SNP", host="www.ensembl.org", path="/biomart/martservice" ,dataset="hsapiens_snp")

> snps.chr22 <- getBM(attributes=c('refsnp_id', 'chrom_start', 'minor_allele_freq', 'ensembl_gene_stable_id', 'consequence_type_tv', 'phenotype_description'), filters='chr_name', values=22, mart=ensembl)
> dim(snps.chr22)
[1] 2127508       6

 

Hope this helps,

Regards,

Thomas

ADD COMMENT
0
Entering edit mode

Yes that helps! Thank you very much!

Sincerely,

Ting

ADD REPLY

Login before adding your answer.

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