converting mouse emsembl gene IDs to Gene names by bioMart and gconvert with no luck
2
0
Entering edit mode
5.5 years ago
akh22 ▴ 120

I have roughly mouse 200 DEGs with Ensembl IDs and would like to convert them to gene symbols/names. I've tried gconvert from gproflier2 as follows;

t<-gconvert(gene, organism = "mmusculus", target = "ENSG", filter_na = T)

and bioMart

ensembl <- useMart("ensembl", dataset="mmusculus_gene_ensembl")
gene <- getBM(attributes=c('ensembl_gene_id','external_gene_name'), filters = 'ensembl_gene_id', values = mouse_gene_ids, mart = ensembl)

with no luck. I checked some of these DEGs (e.g. ENSMUSE00000199608) in Ensembl browser and did see the gene but not in gProfiler web site. Am I missing something here or are there any ways to convert Ensembl gene ID of these DEGs to gene names/symbols in R ?

RNA-Seq R gene • 12k views
ADD COMMENT
1
Entering edit mode

The id you have posted is an exon id, not a gene id.

ADD REPLY
0
Entering edit mode

Ok got it but I can't figure out why I got a transcript ID instead of gene ID ? I used featureCounts with GTFattrType ="gene_id" script;

 featureCounts(x.bam, isPairedEnd = T, isGTFAnnotationFile=T, annot.ext="Mus_musculus.GRCm38.96.gtf", GTF.attrType = "gene_id")

This will be an new question.

ADD REPLY
0
Entering edit mode

look at this post

ADD REPLY
0
Entering edit mode

Tried the script on the post but did not work. I get NA. Ensembl transcript ID's heading is ENSUMST, whereas my geens have ENSMUSE.

ADD REPLY
0
Entering edit mode

Can you post what error you are getting ? also head(mouse_gene_ids) output.

ADD REPLY
0
Entering edit mode

I am not getting any error but zero contents. Output of is as follows;

[1] "ENSMUSE00000199608" "ENSMUSE00000452812" "ENSMUSE00000464581" "ENSMUSE00000815723"
[5] "ENSMUSE00001175099" "ENSMUSE00000603281"
ADD REPLY
7
Entering edit mode
5.5 years ago
prabin.dm ▴ 260

Using the info @i.sudbery's good eye caught. You should change your filter. To find out which filter to use

library(biomaRt)
    mart <- useMart(biomart = "ENSEMBL_MART_ENSEMBL")
    m_ensembl = useDataset(dataset = "mmusculus_gene_ensembl", mart = mart)
    h_ensembl = useMart("ensembl",dataset="hsapiens_gene_ensembl")

    lF <- listFilters(m_ensembl)
    lF[grep("exon", lF$name),]

This is the filter you should use.

              name                          description
55 ensembl_exon_id Exon ID(s) [e.g. ENSMUSE00000097910]

So now, if you run again but use ensembl_exon_id as filter, you should get the gene names.

ADD COMMENT
1
Entering edit mode

Just want to add that you can use the searchFilters() function to find the appropriate filters in one step e.g.

> searchFilters(m_ensembl, "exon")
              name                          description
55 ensembl_exon_id Exon ID(s) [e.g. ENSMUSE00000097910]
ADD REPLY
1
Entering edit mode
 foo <- getBM(attributes=c('ensembl_gene_id','external_gene_name'), filters = 'ensembl_exon_id', values = mouse_gene_ids, mart = ensembl)

ensembl_gene_id external_gene_name

1 ENSMUSG00000011632 Pinlyp

Worked beautifully !! Thanks for all the help !!

ADD REPLY
2
Entering edit mode
5.5 years ago
prabin.dm ▴ 260

This should also get you the gene symbols [edit] provided you had valid keys e.g. ensembl gene ID here.

library(org.Mm.eg.db)
mapIds(org.Mm.eg.db, data, keytype="ENSEMBL", column="SYMBOL", multiVals = "first")
ADD COMMENT

Login before adding your answer.

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