Trying to annotate M. musculus SNPs but getting: Error in martCheck(mart)
2
0
Entering edit mode
8.0 years ago
mm • 0

Hi,

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!

R SNP BioMart • 2.0k views
ADD COMMENT
2
Entering edit mode
8.0 years ago
igor 13k

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

ADD COMMENT
0
Entering edit mode

Thanks for finding my mistake!

ADD REPLY

Login before adding your answer.

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