I was trying to convert a list of genes to EntrezID, in my list, I have either enternal_gene_name or entrezgene_accession, and I need to convert them to EntrezID level.
I tried BioMart:
library(biomaRt) ensembl = useMart("ENSEMBL_MART_ENSEMBL",dataset="btaurus_gene_ensembl") # I work with **Bos taurus** attributes = c("external_gene_name","entrezgene_accession","entrezgene_id") gene = getBM(attributes=attributes, mart = ensembl) test = c("ZNF567", "MILR1") gene[gene$external_gene_name %in% test,] # cannot get EntrezID here
And it works fine.
My pain is that I always have a few genes with no EntrezID returned, while I look them up, manually, in NCBI (https://www.ncbi.nlm.nih.gov/), I actually can get the corresponding EntrezID.
I wonder what could possibly be the problem. And If there are other ways can achieve the conversion seamlessly.
I have Mac 10.14.6.
Thank you so much!