Hi all,
I'm trying to find the names (e.g. SYMBOLS) corresponding to gene ID using the "org.Dm.eg.db" and "TxDb.Dmelanogaster.UCSC.dm3.ensGene" libraries. I have done it (and it works) when I try with the mm9 (mouse) genome, but some how, I get an error if I try with the drosophila genome.
I have pasted some code below:
Part1: Mouse genome and libraries. This works with no error.
Part2: Drosophila genome and librairies. I get the following error:
Error in .testForValidKeys(x, keys, keytype) : None of the keys entered are valid keys for 'ENTREZID'. Please use the keys method to see a listing of valid arguments.
However, when I try to look at the possible keys, the "SYMBOL" is present, so I don't understand..
keytypes(drosoDB2) [1] "ENTREZID" "ACCNUM" "ALIAS" "CHR" "CHRLOC" [6] "CHRLOCEND" "ENZYME" "MAP" "PATH" "PMID" [11] "REFSEQ" "SYMBOL" "UNIGENE" "ENSEMBL" "ENSEMBLPROT" [16] "ENSEMBLTRANS" "GENENAME" "UNIPROT" "GO" "EVIDENCE" [21] "ONTOLOGY" "GOALL" "EVIDENCEALL" "ONTOLOGYALL" "FLYBASE" [26] "FLYBASECG" "FLYBASEPROT"
Any help would be greatly appreciated. Thanks!
Part 1 (Mouse)
TaxonDatabaseKG <- "TxDb.Mmusculus.UCSC.mm9.knownGene" TaxonDatabaseDict <- "org.Mm.eg.db" library(TaxonDatabaseKG, character.only = TRUE) library(TaxonDatabaseDict, character.only = TRUE) exonRanges <- exonsBy(get(TaxonDatabaseKG), by = "gene") symb <- select(get(TaxonDatabaseDict), names(exonRanges), columns = "SYMBOL") mouseDB1 <- get("TxDb.Mmusculus.UCSC.mm9.knownGene") keytypes(mouseDB1) help('select') mouseDB2 <- get("org.Mm.eg.db") keytypes(mouseDB) symb <- select(get(TaxonDatabaseDict), names(exonRanges), columns = "SYMBOL")
Part 2 (Drosophila)
TaxonDatabaseKG <- "TxDb.Dmelanogaster.UCSC.dm3.ensGene" TaxonDatabaseDict <- "org.Dm.eg.db" library(TaxonDatabaseKG, character.only = TRUE) library(TaxonDatabaseDict, character.only = TRUE) exonRanges <- exonsBy(get(TaxonDatabaseKG), by = "gene") symb <- select(get(TaxonDatabaseDict), names(exonRanges), columns = "SYMBOL") drosoDB1 <- get("TxDb.Dmelanogaster.UCSC.dm3.ensGene") keytypes(drosoDB1) drosoDB2 <- get("org.Dm.eg.db") keytypes(drosoDB2) symb <- select(get(TaxonDatabaseDict), names(exonRanges), columns = "SYMBOL")