Entering edit mode
Hi there!
I need to convert all my ensemble gene id on hgnc symbols and entrez
gene id.
My ensemble release s the n?72.
I use this script:
dif.DEs$ensembl <-
sapply(strsplit(rownames(dif.DEs),split="nn+"),"[",1)
#use biomart
library( "biomaRt" )
ensembl = useMart( host="jun2013.archive.ensembl.org",biomart="
ENSEMBL_MART_ENSEMBL", dataset = "hsapiens_gene_ensembl" )
genemap <- getBM( attributes = c("ensembl_gene_id", "entrezgene",
"hgnc_symbol"),
filters = "ensembl_gene_id",
values = dif.DEs$ensembl,
mart = ensembl )
idx <- match(dif.DEs$ensembl, genemap$ensembl_gene_id )
dif.DEs$entrez <- genemap$entrezgene[ idx ]
dif.DEs$hgnc_symbol <- genemap$hgnc_symbol[ idx ]
dif.DEs$entrez
[1] 25870 89869 54465 2840 NA 80230 57673 123264 NA
NA
[11] NA 392364 NA NA NA NA 221883 NA NA
NA
[21] NA NA NA NA
Many of that are as NA. How can I annotate all the genes?
thanks in advance for any help!