'convert ALL genes from ensembl ID to symbol without NAs

I tried to convert genes with ensembl ID to Symbol I used the "EnsDb.Hsapiens.v86" package using this code:

library("EnsDb.Hsapiens.v86")
mapIds <- mapIds(EnsDb.Hsapiens.v86, 
             keys = genes, 
             keytype = "GENEID", 
             column = "SYMBOL")
mapIds

Results is like that:

  • ENSG00000033327 GAB2
  • ENSG00000033627 ATP6V0A1
  • ENSG00000033800 PIAS1
  • ENSG00000033867 SLC4A7
  • ENSG00000034063 < NA >
  • ENSG00000034152 MAP2K3

in summary I have in total 20176 with 761 NAs (in conversion colonne). I got this message also :

Warning message: Unable to map 761 of 20176 requested IDs. Error in file(out, "wt") : cannot open the connection

I want to have 0 NAs using this way or another way or any other package



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source