Question: converting mouse emsembl gene IDs to Gene names by bioMart and gconvert with no luck
0
gravatar for akh22
4 months ago by
akh2240
United States
akh2240 wrote:

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 • 317 views
ADD COMMENTlink modified 4 months ago by prabin.dm160 • written 4 months ago by akh2240
1

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

ADD REPLYlink written 4 months ago by i.sudbery5.9k

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 REPLYlink modified 4 months ago • written 4 months ago by akh2240

look at this post

ADD REPLYlink written 4 months ago by Prakash1.7k

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 REPLYlink written 4 months ago by akh2240

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

ADD REPLYlink written 4 months ago by prabin.dm160

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

[1] "ENSMUSE00000199608" "ENSMUSE00000452812" "ENSMUSE00000464581" "ENSMUSE00000815723"
[5] "ENSMUSE00001175099" "ENSMUSE00000603281"
ADD REPLYlink written 4 months ago by akh2240
7
gravatar for prabin.dm
4 months ago by
prabin.dm160
USA/Amherst/Umass
prabin.dm160 wrote:

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 COMMENTlink written 4 months ago by prabin.dm160
1

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 REPLYlink modified 4 months ago • written 4 months ago by Mike Smith1.4k
 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 REPLYlink written 4 months ago by akh2240
0
gravatar for prabin.dm
4 months ago by
prabin.dm160
USA/Amherst/Umass
prabin.dm160 wrote:

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 COMMENTlink modified 4 months ago • written 4 months ago by prabin.dm160
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: 1716 users visited in the last hour