select(org.Hs.eg.db, keys = "MIR15A", keytype = "SYMBOL", columns = c("SYMBOL","GENENAME","ENSEMBL")) 'select()' returned 1:1 mapping between keys and columns SYMBOL GENENAME ENSEMBL 1 MIR15A microRNA 15a ENSG00000231607 select(org.Hs.eg.db, keys = "DLEU2", keytype = "SYMBOL", columns = c("SYMBOL","GENENAME","ENSEMBL")) 'select()' returned 1:1 mapping between keys and columns SYMBOL GENENAME ENSEMBL 1 DLEU2 deleted in lymphocytic leukemia 2 (non-protein coding) ENSG00000231607
But the ensembl id of MIR15A is ENSG00000283785 not ENSG00000231607.
R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) Matrix products: default locale: [1] LC_COLLATE=Chinese (Simplified)_China.936 LC_CTYPE=Chinese (Simplified)_China.936 LC_MONETARY=Chinese (Simplified)_China.936 [4] LC_NUMERIC=C LC_TIME=Chinese (Simplified)_China.936 attached base packages: [1] parallel stats4 stats graphics grDevices utils datasets methods base other attached packages: [1] org.Hs.eg.db_3.4.1 AnnotationDbi_1.38.2 IRanges_2.10.2 S4Vectors_0.14.3 Biobase_2.36.2 BiocGenerics_0.22.0 [7] clusterProfiler_3.4.4 DOSE_3.2.0 loaded via a namespace (and not attached): [1] Rcpp_0.12.12 compiler_3.4.0 plyr_1.8.4 tools_3.4.0 digest_0.6.12 bit_1.1-12 RSQLite_2.0 [8] memoise_1.1.0 tibble_1.3.3 gtable_0.2.0 pkgconfig_2.0.1 rlang_0.1.2 fastmatch_1.1-0 igraph_1.1.2 [15] DBI_0.7 rvcheck_0.0.9 fgsea_1.2.1 gridExtra_2.2.1 stringr_1.2.0 bit64_0.9-7 grid_3.4.0 [22] glue_1.1.1 qvalue_2.8.0 data.table_1.10.4 BiocParallel_1.10.1 GOSemSim_2.2.0 purrr_0.2.3 tidyr_0.7.0 [29] GO.db_3.4.1 DO.db_2.9 ggplot2_2.2.1 reshape2_1.4.2 blob_1.1.0 magrittr_1.5 splines_3.4.0 [36] scales_0.4.1 colorspace_1.3-2 stringi_1.1.5 lazyeval_0.2.0 munsell_0.4.3
In addition, do note that the orgDb packages that we supply are based on mappings from Entrez Gene IDs to all other annotation sources, and if you are trying to map from NCBI IDs to EBI IDs you will always run into disagreements between the annotation groups. To wit:
So EBI doesn't seem to recognize that there is an Entrez Gene ID for DLEU2. But miR15A and DLEU2 are overlapping genes (miR15A comes from an intron of DLEU2), so you can end up with positional mappings that may not make sense if you look at an individual mapping, but that may be programmatically convenient for a group (say NCBI or EBI) who is trying to do a cross-mapping when their isn't agreement between them.
NCBI may have cleaned this one up, but rest assured there are many others. So as Jo already noted, if you want Ensembl IDs, use EBI based annotation packages. If you want Entrez Gene IDs, use NCBI based annotation packages. And probably don't use gene symbols for much if possible.