Question: how to retrieve mouse (mm10) gene information from Ensemble using Biomart inR
3
gravatar for M K
4.6 years ago by
M K490
United States
M K490 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 • 12k views
ADD COMMENTlink modified 4.6 years ago by Sakti390 • written 4.6 years ago by M K490

What is mm10.kgXref.geneSymbol? 

ADD REPLYlink written 4.6 years ago by komal.rathi3.5k

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

ADD REPLYlink modified 10 weeks ago by RamRS25k • written 4.6 years ago by M K490
5
gravatar for komal.rathi
4.6 years ago by
komal.rathi3.5k
Children's Hospital of Philadelphia, Philadelphia, PA
komal.rathi3.5k 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 4.6 years ago • written 4.6 years ago by komal.rathi3.5k

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 modified 10 weeks ago by RamRS25k • written 4.6 years ago by M K490

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

ADD REPLYlink modified 4.6 years ago • written 4.6 years ago by Sakti390
4
gravatar for Sakti
4.6 years ago by
Sakti390
United States
Sakti390 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 4.6 years ago • written 4.6 years ago by Sakti390

I got it. Thanks a lot Sakti.

ADD REPLYlink written 4.6 years ago by M K490
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: 879 users visited in the last hour