Question: how to retrieve mouse (mm10) gene information from Ensemble using Biomart inR
2
gravatar for M K
3.8 years ago by
M K460
United States
M K460 wrote:

I am tying to retrieve mouse mm10 gene information using biomart library in R, but I don't know how to do that

(The in information that I need are mm10.knownGene.name    mm10.knownGene.chrom    mm10.knownGene.strand    mm10.knownGene.txStart    mm10.knownGene.txEnd    mm10.kgXref.geneSymbol)

source("http://bioconductor.org/biocLite.R")

biocLite("biomaRt")

library(biomaRt)

mouse = useMart("ensembl", dataset = "mmusculus_gene_ensembl")

listFilters(mouse)

l getBM( attributes=c("ensembl_gene_id", "mgi_symbol") , filters= "mgi_symbol"  ,mart=mouse)

R gene • 9.1k views
ADD COMMENTlink modified 3.8 years ago by Sakti360 • written 3.8 years ago by M K460

What is mm10.kgXref.geneSymbol? 

ADD REPLYlink written 3.8 years ago by komal.rathi3.4k

the kgXref.geneSymbol is the gene name that I got when downloaded  the known gene from UCSC website using table browser

ADD REPLYlink written 3.8 years ago by M K460
5
gravatar for komal.rathi
3.8 years ago by
komal.rathi3.4k
Children's Hospital of Philadelphia, Philadelphia, PA
komal.rathi3.4k wrote:

If you just want mm10 symbol, chr, strand, transcript start & end, you could do this:

res <- getBM(attributes = c("ensembl_gene_id", "mgi_symbol","chromosome_name",'strand','transcript_start','transcript_end'), mart = mouse)

If you have list of genes:

#genesym is a character vector of gene symbols

res <- getBM(attributes = c("ensembl_gene_id", "mgi_symbol","chromosome_name",'strand','transcript_start','transcript_end'), filters = genesym, mart = mouse)
ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by komal.rathi3.4k

Thanks Komal for helping me, I run that code and it works. But I have question about how can I assign the version release (i.e I am going to run this code with different species like human (hg19)) so here I don't know what release I will retrieve from ensemble. Is there any way to include release# in this code.

 

 

ADD REPLYlink written 3.8 years ago by M K460

The current Ensembl database should be mm10, the most up to date one. For changing genomic versions see my reply.

ADD REPLYlink modified 3.8 years ago • written 3.8 years ago by Sakti360
4
gravatar for Sakti
3.8 years ago by
Sakti360
United States
Sakti360 wrote:
library(biomaRt)
ensembl <- useMart("ensembl", dataset="mmusculus_gene_ensembl")
annot<-getBM(c("ensembl_gene_id", "mgi_symbol", "chromosome_name", "strand", "start_position", "end_position","gene_biotype"), mart=ensembl)

#For older biomart releases I have used

ensembl <- useMart("ENSEMBL_MART_ENSEMBL", dataset="mmusculus_gene_ensembl", host="jul2012.archive.ensembl.org")

#modify the host depending on when your genomic version was released, or which ensembl archive you want to use

ADD COMMENTlink modified 3.8 years ago • written 3.8 years ago by Sakti360

I got it. Thanks a lot Sakti.

ADD REPLYlink written 3.8 years ago by M K460
Please log in to add an answer.

Help
Access

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