Question: R_Conversion from ENTREZ ID to OFFICIAL GENE SYMBOL
0
gravatar for kim
5.7 years ago by
kim60
United States
kim60 wrote:

I'm having an issue how to convert data. Actually, I have data file which contains tons of gene sets and genes as follows.

    GO.1        GO.2  ...

    811           811

    1520         3638

    3685         3685

    8943         5719

    10197

 ...

Here, each column (gene set) contains a list of genes which are annotated on corresponding gene set. The number means ENTREZ ID of specific annotated gene. I'm trying to convert ENTREZ ID to Official gene symbol and then make output file from it. What am I supposed to do for it?

I know there are various ways to convert like this.

library(annotate)
library(org.Hs.eg.db)
lookUp('811','org.Hs.eg','SYMBOL')
$`811`
[1] "CALR"

But, I don't have any idea to read text file and convert data and then write it.

 

R • 5.9k views
ADD COMMENTlink modified 5.7 years ago by Neilfws48k • written 5.7 years ago by kim60

If reading, converting and writing data is the problem, then you need to learn the basic R skills to do this. Perhaps start with the documentation for R data import/export.

ADD REPLYlink written 5.7 years ago by Neilfws48k
1
gravatar for raunakms
5.7 years ago by
raunakms1.1k
San Francisco
raunakms1.1k wrote:

You could simply use the biomaRt Rpackage. There is a user guide available which details out how to use it. It is pretty easy and more comprehensive when you have to convert one id type to the other. Additionally it always queries the latest version of the BioMart library so it is always up-to-date.

ADD COMMENTlink written 5.7 years ago by raunakms1.1k
0
gravatar for Ido Tamir
5.7 years ago by
Ido Tamir5.0k
Austria
Ido Tamir5.0k wrote:

I missed that you know how to translate. You want R IO basics and this is not really the place but:

tab <- read.table("inputfile", sep="\t", as.is=TRUE, header=TRUE, comment="", fill=TRUE)

//hope that its really tab formatted

ids1 <- tab[,1]

ids2 <- tab[,2]

... now the conversion ...

write.table(tab, "outfile", col.names=TRUE, row.names=FALSE, sep="\t", quote=FALSE)

But you should read up on R.

like: https://www.datacamp.com/courses/introduction-to-r

http://tryr.codeschool.com or a nice dead tree

ADD COMMENTlink modified 5.7 years ago • written 5.7 years ago by Ido Tamir5.0k
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: 1331 users visited in the last hour