Noob question: replacing ensembl ID with the gene symbol?
Entering edit mode
11 months ago
cdeantoneo31 ▴ 10

Im a noob with a very unclear idea of what I am doing, but I'm doing my best.

The other day, the ncbi webpage for downloading genomes and GTF files was down. As a result, I had to do my analysis on this RNA seq data using the ensembl files, which messed everything I know how to do up, and now my GSEA is in the ensemble ID (ie ENSMUSG00000000001) instead of a nice, clean, and easy to read gene ID (ie Gnai3)

Below is what I used to generate the GSEA

gse <- gseGO(geneList=gene_list, 
             ont ="ALL", 
             keyType = "ENSEMBL", 
             minGSSize = 3,
             scoreType = "pos",
             maxGSSize = 800, 
             pvalueCutoff = 0.05, 
             verbose = TRUE, 
             OrgDb = "", 
             pAdjustMethod = "none")

I did try substituting the gene ID with the symbol using the second answer here, but got the following error

ensembl.genes <- (gene_list)
ENSMUSG00000026166 ENSMUSG00000027514 ENSMUSG00000026582 ENSMUSG00000024401 ENSMUSG00000018916 
         8.3426962          8.2544408          8.1768632          7.7641708          7.6248835 
ENSMUSG00000078365 ENSMUSG00000040026 ENSMUSG00000058427 ENSMUSG00000107750 ENSMUSG00000028287 
         7.0340698          6.6905516          6.4591807          6.2520667          6.1017208 
ENSMUSG00000029380 ENSMUSG00000063171 ENSMUSG00000050587 ENSMUSG00000118159 ENSMUSG00000071341 
         5.5614790          5.5298819          4.9374363          4.7380874          4.5747161  ...
 [ reached getOption("max.print") -- omitted 2013 entries ]
geneIDs1 <- ensembldb::select(EnsDb.Mmusculus.v79, keys= ensembl.genes, keytype = "GENEID", columns = c("SYMBOL", "GENEID"))
Error in .select(x = x, keys = keys, columns = columns, keytype = keytype,  : 
  Argument keys should be a character vector, an object extending AnnotationFilter, a filter expression or an AnnotationFilterList.
noob gse ensembl • 1.3k views
Entering edit mode
Entering edit mode

this seems to only work for a couple of selected genes? I would like to replace all of the ensembl ID's in my GSE, as well as within my DEseq data, with the gene symbol

Entering edit mode

There will always be genes that do not map between different annotations. It would help that you paste some here so that we can advise further.

In my answer in the other thread, to generate a complete biomaRt table for all genes, you can use this:

mart <- useMart('ensembl', dataset = 'mmusculus_gene_ensembl')
annotTable <- getBM(
  attributes = c(
  mart = mart)

The other command, for, functions in the same way as the package that you are using, i.e., EnsDb.Mmusculus.v79

Entering edit mode

this worked exactly as I needed it too. Like you said, not all of the genes were replaced exactly, but the ones relevant to my needs were. Thank you so much


Login before adding your answer.

Traffic: 1160 users visited in the last hour
Help About
Access RSS

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6