My keys are all ENSEMBL, but R says they are not valid keys for ENSEMBL
1
0
Entering edit mode
12 months ago
rgomez • 0

I am running DEseq2 analysis on human RNAseq data.

I finally just want my heatmap of top 20 DE genes so I can call it a day.

Code:

library(org.Mm.eg.db)

keytypes(org.Mm.eg.db)

mykeys<- c( "ENSG00000157077", "ENSG00000230844", "ENSG00000161055" ,"ENSG00000172244", "ENSG00000066933" ,"ENSG00000197497" ,"ENSG00000170631" ,"ENSG00000260285",
           "ENSG00000136193", "ENSG00000260744", "ENSG00000141540", "ENSG00000197978", "ENSG00000235781", "ENSG00000197093" ,"ENSG00000106868", "ENSG00000171596",
           "ENSG00000204475", "ENSG00000163053", "ENSG00000237940", "ENSG00000159339")

geneinfo <- AnnotationDbi::select(org.Mm.eg.db, keys=mykeys,
                                  columns=c("ENSEMBL", "SYMBOL","GENENAME"), 
                                  keytype="ENSEMBL")

This error now occurs: Error in .testForValidKeys(x, keys, keytype, fks) : 
  None of the keys entered are valid keys for 'ENSEMBL'. Please use the keys method to see a listing of valid arguments.

The 'mykeys' vector is clearly made of ENSEMBL IDs, but the error claims no valid keys for ENSEMBL are present.

I was using this code:

geneinfo <- AnnotationDbi::select(org.Mm.eg.db, keys=rownames(P482_resSort)[1:20],
                   columns=c("ENSEMBL", "SYMBOL","GENENAME"), 
                   keytype="ENSEMBL")

previously and it gave me the same error, so I changed the keys to what I thought was a straight-forward vector.

Does anyone have any ideas on how to overcome this error?

Thank you.

R ENSEMBL DESeq2 • 618 views
ADD COMMENT
3
Entering edit mode
12 months ago

Org.Mm.eg.db is the mouse organism database, but your ENSEMBL IDs are for human genes. Mouse ensembl ids start with ENSMUSG.

You probably need to use the human org db org.Hs.eg.db or to convert your human IDs to their corresponding mouse ortholog depending on your end goal.

ADD COMMENT

Login before adding your answer.

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