Question: Trying to annotate M. musculus SNPs but getting: Error in martCheck(mart)
gravatar for mm
4.1 years ago by
mm0 wrote:


I'm trying to get information about some SNPs from BioMart but I'm getting and error with the mart and haven't been able to figure out how to fix it. This is what I've written:

data = read.csv("SNP_positions.csv")

snpmart = useMart("ENSEMBL_MART_SNP", dataset="mmusculus_snp")

out = getBM(attributes=c("refsnp_id","chr_name","chrom_start","chrom_strand","allele","consequence_type_tv","ensemble_gene_stable_id","ensembl_type","reg_feature_stable_id","reg_consequence_types"), filters=c("chr_name","chrom_start","chrom_end", values=data, mart=snpmart))

 Error in martCheck(mart) : 
  You must provide a valid Mart object. To create a Mart object use the function: useMart.  Check ?useMart for more information.

I can view all the attributes and filters in the mart so I know I selected what I needed, I just don't know why I'm getting this error. Any help is greatly appreciated!

snp biomart R • 1.1k views
ADD COMMENTlink modified 4.1 years ago • written 4.1 years ago by mm0
gravatar for igor
4.1 years ago by
United States
igor10k wrote:

In your getBM() function, the values and mart parameters are inside the filters parameter.

ADD COMMENTlink written 4.1 years ago by igor10k

Thanks for finding my mistake!

ADD REPLYlink written 4.1 years ago by mm0
Please log in to add an answer.


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