I am working on a gene expression data set from TCGA, where genes are annotated with Ensembl IDs. I used Biomart to convert them to Entrez by using
mart <- useDataset("hsapiens_gene_ensembl", useMart("ensembl")) genes <- getBM( filters="ensembl_gene_id_version", attributes=c("ensembl_gene_id", "entrezgene"), values=genesens, mart=mart)
But all I get is a list with the mapped IDs, while I want to add a column with Entrez to the corresponding Ensembl ID. Any ideas of how I should modify the above code?
Thank you in advance!
EDIT: Note that Ensembl in the initial data frame have dot suffix.