Entering edit mode
4.2 years ago
Rob
▴
170
Hello friends, I used this code to convert ensemble gene ID to gene symbol:
df <- read.csv("gene_Ens_ID.csv")
library('biomaRt')
mart <- useDataset("hsapiens_gene_ensembl", useMart("ensembl"))
attributeNames <- c('ensembl_gene_id','external_gene_name','description','gene_biotype', "hgnc_symbol", 'chromosome_name', 'start_position', 'end_position', 'description')
filterValues <-df$gene
Annotations <- getBM(attributes=attributeNames, filters = "ensembl_gene_id",values = filterValues, mart=useMart(biomart="ensembl", dataset="hsapiens_gene_ensembl"))
write.csv(Annotations, "gene_Ids.csv")
About 300 genes do not have symbol or ID. how can I find the symbols or gene IDs for them?