library("AnnotationDbi")
library("org.Hs.eg.db")
anno_df$gene_name <- mapIds(org.Hs.eg.db,
- keys=anno_df$gene_id,
- column="SYMBOL",
- keytype="ENSEMBL",
- multiVals="first")
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.
This is awesome! Thank you. I am trying the conversion code you gave me but here is the output from str(anno_df$gene_id):
chr [1:34528] "5S_rRNA" "7SK" "A1BG" "A1BG-AS1" "A1CF" "A2M" "A2M-AS1" "A2ML1" "A2ML1-AS2" "A2MP1" "A3GALT2" ..
Hi, therein exists the problem, i.e., your
keytype
should be SYMBOL, not ENSEMBL