When I converted my gene symbol list to Ensembl ID, I found that the relationship with gene symbol and Ensemble ID is not a one-to-one correspondence. For example, the original list has 798 genes. However, after I convert the gene symbol, there are 831 Ensembl IDs and corresponding gene symbols. Therefore, I do not why and would you explain this phenomenon? Thank you very much!
library("biomaRt")
listMarts()
ensembl <- useMart("ensembl")
datasets <- listDatasets(ensembl)
ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl)
Gene<-read.csv("HEK293_Baltz2012_4SURIC.csv",header=T)
options(max.print=1000000)
getBM(attributes=c('external_gene_name','ensembl_gene_id'), filters = 'external_gene_name', values = Gene$Gene_name, mart = ensembl)
library("biomaRt") listMarts() ensembl <- useMart("ensembl") datasets <- listDatasets(ensembl) ensembl = useDataset("hsapiens_gene_ensembl",mart=ensembl) Gene<-read.csv("HEK293_Baltz2012_4SURIC.csv",header=T) options(max.print=1000000) getBM(attributes=c('external_gene_name','ensembl_gene_id'), filters = 'external_gene_name', values = Gene$Gene_name, mart = ensembl)