Question: Map gene IDs to gene names
0
gravatar for bisansamara
13 months ago by
bisansamara10
bisansamara10 wrote:

Hi, I have a huge list of gene names, and I want to assign the ID for each gene. I tried the following code, and it kind of worked, but the problem was that it created extra IDs (more than the available genes) --> causing misalignment between names and IDs

CODE

library("org.Hs.eg.db")

a <- read.csv("filename.csv",TRUE,",")

y=as.character(a$Gene.refGene) #column name is Gene.refGene

gene=y

output = unlist(mget(x=gene,envir=org.Hs.egALIAS2EG,ifnotfound=NA))

write.csv(output, file = "output.csv") #write the IDs which is the output in a csv file

Is there any other way to get the gene IDs? or any suggestion on how to modify the code? your help is highly appreciated!

geneid ensembl R gene • 470 views
ADD COMMENTlink modified 13 months ago by EagleEye5.5k • written 13 months ago by bisansamara10
1

Some gene names have more IDs and vice versa. There is no way around it. One way to deal with it is to keep only one.

ADD REPLYlink written 13 months ago by b.nota4.3k
0
gravatar for EagleEye
13 months ago by
EagleEye5.5k
Sweden
EagleEye5.5k wrote:

Simple solution would be, C: Transcript Id conversion

C: go term analysis with ensembl gene id

ADD COMMENTlink modified 13 months ago • written 13 months ago by EagleEye5.5k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1588 users visited in the last hour