org.Hs.eg.db -- Entrez ID to Gene Symbol conversion
3
0
Entering edit mode
Tim Smith ★ 1.1k
@tim-smith-1532
Last seen 10.2 years ago
Hi, I wanted a table that provides a mapping from Entrez Ids to Gene Symbols for homo sapiens. To do this, I used the following code: ---------------------------------------------------------------------- -------------------------------------------- library(org.Hs.eg.db) x <- org.Hs.egSYMBOL # Get the gene symbol that are mapped to an entrez gene identifiers mapped_genes <- mappedkeys(x) # Convert to a list xx <- as.list(x[mapped_genes]) eids <- '' ENTREZID2GENESYMBOL <- matrix(0,length(xx),2) colnames(ENTREZID2GENESYMBOL) <- c('ENTREZ_IDS','GENE_SYMBOLS') for(k in 1:length(xx)){ if(k==1){ eids <- unlist(xx[k]) goids <- names(xx[k]) } if(k>1){ eids <- c(eids,unlist(xx[k])) goids <- c(goids,names(xx[k])) } dd <- '' for(m in 1:length(unlist(xx[k]))){ if(m==1) dd <- unlist(xx[k])[m] if(m>1) dd <- paste(dd,unlist(xx[k])[m],sep=',') } ENTREZID2GENESYMBOL[k,2] <- dd } ENTREZID2GENESYMBOL[,1] <- rownames(ENTREZID2GENESYMBOL) <- goids idx <- unlist(sort(as.numeric(rownames(ENTREZID2GENESYMBOL)),index=TRUE)[2]) ENTREZID2GENESYMBOL <- ENTREZID2GENESYMBOL[idx,] write.table(ENTREZID2GENESYMBOL,'test.txt',sep='\t') ---------------------------------------------------------------------- ------------------------------------------------ However, when I search the table for the gene 'mTOR' I don't find anything. I believe that mTOR is widely recognized as a cancer causing gene, and I was wondering if I was doing something wrong in my code (or libraries/functions used)... many thanks! Tim PS: My sessionInfo() is : R version 2.8.0 (2008-10-20) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] tools stats graphics grDevices utils datasets methods base other attached packages: [1] org.Hs.eg.db_2.2.6 RSQLite_0.7-1 DBI_0.2-4 AnnotationDbi_1.4.2 Biobase_2.2.1 > [[alternative HTML version deleted]]
Cancer Homo sapiens convert Cancer Homo sapiens convert • 7.1k views
ADD COMMENT
0
Entering edit mode
@vincent-j-carey-jr-4
Last seen 10 weeks ago
United States
briefly, > get("MTOR", org.Hs.egALIAS2EG) [1] "2475" > get("2475", org.Hs.egSYMBOL) [1] "FRAP1" i.e., MTOR is not the symbol used by Entrez. in addition, i would suggest that all refrain from creating lists in R to make such tables. the tables exist in SQLite and you can send SQL queries directly to them. there should be enough information in the AnnotationDbi vignette to indicate how to do this. there is nothing wrong with moving all the data to R, it is just inefficient and defeats the purpose of the external data stores. On Sun, Feb 22, 2009 at 11:45 AM, Tim Smith <tim_smith_666@yahoo.com> wrote: > Hi, > > I wanted a table that provides a mapping from Entrez Ids to Gene Symbols > for homo sapiens. To do this, I used the following code: > > > -------------------------------------------------------------------- ---------------------------------------------- > > library(org.Hs.eg.db) > > x <- org.Hs.egSYMBOL > # Get the gene symbol that are mapped to an entrez gene identifiers > mapped_genes <- mappedkeys(x) > # Convert to a list > xx <- as.list(x[mapped_genes]) > eids <- '' > > ENTREZID2GENESYMBOL <- matrix(0,length(xx),2) > colnames(ENTREZID2GENESYMBOL) <- c('ENTREZ_IDS','GENE_SYMBOLS') > for(k in 1:length(xx)){ > if(k==1){ > eids <- unlist(xx[k]) > goids <- names(xx[k]) > } > if(k>1){ > eids <- c(eids,unlist(xx[k])) > goids <- c(goids,names(xx[k])) > } > dd <- '' > for(m in 1:length(unlist(xx[k]))){ > if(m==1) > dd <- unlist(xx[k])[m] > if(m>1) > dd <- paste(dd,unlist(xx[k])[m],sep=',') > } > ENTREZID2GENESYMBOL[k,2] <- dd > } > ENTREZID2GENESYMBOL[,1] <- rownames(ENTREZID2GENESYMBOL) <- goids > idx <- > unlist(sort(as.numeric(rownames(ENTREZID2GENESYMBOL)),index=TRUE)[2]) > ENTREZID2GENESYMBOL <- ENTREZID2GENESYMBOL[idx,] > > write.table(ENTREZID2GENESYMBOL,'test.txt',sep='\t') > > > -------------------------------------------------------------------- -------------------------------------------------- > > However, when I search the table for the gene 'mTOR' I don't find anything. > I believe that mTOR is widely recognized as a cancer causing gene, and I was > wondering if I was doing something wrong in my code (or libraries/functions > used)... > > many thanks! > > Tim > > > PS: My sessionInfo() is : > > R version 2.8.0 (2008-10-20) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United > States.1252;LC_MONETARY=English_United > States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] tools stats graphics grDevices utils datasets methods > base > > other attached packages: > [1] org.Hs.eg.db_2.2.6 RSQLite_0.7-1 DBI_0.2-4 > AnnotationDbi_1.4.2 Biobase_2.2.1 > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: > http://news.gmane.org/gmane.science.biology.informatics.conductor > [[alternative HTML version deleted]]
ADD COMMENT
0
Entering edit mode
@christof-winter-3264
Last seen 10.2 years ago
Hi Tim! Tim Smith wrote, On 22.02.2009 17:45: > Hi, > > I wanted a table that provides a mapping from Entrez Ids to Gene Symbols for > homo sapiens. What about the following? > library(org.Hs.eg.db) > e2s = toTable(org.Hs.egSYMBOL) > head(e2s) gene_id symbol 1 1 A1BG 2 2 A2M 3 3 A2MP 4 9 NAT1 5 10 NAT2 6 11 AACP Cheers, Christof
ADD COMMENT
0
Entering edit mode
@seraya-maouche-3302
Last seen 10.2 years ago
Dear Tim, I think it's not due to something wrong in your code. As you know, the "official symbol" for Mtor gene is FRAP1 and this gene has several gene alias including FRAP; MTOR; FRAP2; RAFT1; RAPT1; FLJ44809; FRAP1, so I think that in your table, the gene is represented with different symbol. Try to search with Entrez id (2475) Best regards, Seraya ********************************************** Seraya Maouche PhD candidate & computer sciences engineer INSERM U937 Facult? de M?decine Piti?-Salp?tri?re 91 Boulevard de l'H?pital 75634 PARIS cedex 13 Tel: 33 6 65 69 52 67 Fax: 33 1 40 77 97 28 Email: seraya.maouche at chups.jussieu.fr ********************************************** ------------------------------ Message: 3 Date: Sun, 22 Feb 2009 08:45:43 -0800 (PST) From: Tim Smith <tim_smith_666@yahoo.com> Subject: [BioC] org.Hs.eg.db -- Entrez ID to Gene Symbol conversion To: bioc <bioconductor at="" stat.math.ethz.ch=""> Message-ID: <556253.15950.qm at web57503.mail.re1.yahoo.com> Content-Type: text/plain Hi, I wanted a table that provides a mapping from Entrez Ids to Gene Symbols for homo sapiens. To do this, I used the following code: ---------------------------------------------------------------------- ------ -------------------------------------- library(org.Hs.eg.db) x <- org.Hs.egSYMBOL # Get the gene symbol that are mapped to an entrez gene identifiers mapped_genes <- mappedkeys(x) # Convert to a list xx <- as.list(x[mapped_genes]) eids <- '' ENTREZID2GENESYMBOL <- matrix(0,length(xx),2) colnames(ENTREZID2GENESYMBOL) <- c('ENTREZ_IDS','GENE_SYMBOLS') for(k in 1:length(xx)){ if(k==1){ eids <- unlist(xx[k]) goids <- names(xx[k]) } if(k>1){ eids <- c(eids,unlist(xx[k])) goids <- c(goids,names(xx[k])) } dd <- '' for(m in 1:length(unlist(xx[k]))){ if(m==1) dd <- unlist(xx[k])[m] if(m>1) dd <- paste(dd,unlist(xx[k])[m],sep=',') } ENTREZID2GENESYMBOL[k,2] <- dd } ENTREZID2GENESYMBOL[,1] <- rownames(ENTREZID2GENESYMBOL) <- goids idx <- unlist(sort(as.numeric(rownames(ENTREZID2GENESYMBOL)),index=TRUE)[2]) ENTREZID2GENESYMBOL <- ENTREZID2GENESYMBOL[idx,] write.table(ENTREZID2GENESYMBOL,'test.txt',sep='\t') ---------------------------------------------------------------------- ------ ------------------------------------------ However, when I search the table for the gene 'mTOR' I don't find anything. I believe that mTOR is widely recognized as a cancer causing gene, and I was wondering if I was doing something wrong in my code (or libraries/functions used)... many thanks! Tim
ADD COMMENT

Login before adding your answer.

Traffic: 538 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6