Entering edit mode
5.3 years ago
sangram_keshari
▴
260
For most of the annotation packages, we need to provide input keytype (such as ENSEMBL) to convert another keytype (ENTREZID).
Example:
library(AnnotationDbi)
library(org.Hs.eg.db)
input_ids <- c("ENSG00000121410", "ENSG00000175899", "ENSG00000256069", "ENSG00000171428")
AnnotationDbi::mapIds(org.Hs.eg.db, input_ids, keytype = 'ENSEMBL', 'ENTREZID')
I am just curious if is there any r-package which having a function to auto find keytype based on input keys (a list of IDs). Like input list coming from any source can convert to ENTREZID, which is standard input for most of the functions in many packages.
Or any other solution idea to detect input keytype?
I am not sure if there is an R package for this. I am also not sure if it would be wise to automate these things. See e.g., excel, that recognizes automatically dates from some of the gene symbols. I also saw once by a student that used limma for GO enrichment analysis, that she forgot to make row names of her gene IDs. Limma automatically assumed the row numbers were entrez numbers, which resulted in no error but not correct results.