How to get genes list from goana function in R
1
0
Entering edit mode
2.8 years ago

I have run goana function to find out gene ontology data. I have used the following code: summary(decideTests(fit[,-1])) topTable(fit)

g <- goana(fit, geneid="entrezgene")

and got the following information:

Term Ont N Up Down P.Up P.Down

GO:0001775 cell activation BP 998 278 249 0.35558846409647 0.0748840455929044 GO:0002252 immune effector process BP 854 215 242 0.931609365814019 0.000120652401703148 GO:0002263 cell activation involved in immune response BP 522 143 132 0.498982503074724 0.117805722501427 GO:0002274 myeloid leukocyte activation BP 479 120 131 0.88139274904347 0.0142793302381248 GO:0002275 myeloid cell activation involved in immune response BP 410 108 110 0.689879821335263 0.0384441418123649 GO:0002283 neutrophil activation involved in immune response BP 375 101 95 0.585272346740121 0.157023373890062 GO:0002366 leukocyte activation involved in immune response BP 518 143 132 0.455343307998325 0.0991785232322014 GO:0002376 immune system process BP 2110 550 526 0.921362031782216 0.0142714263587505 GO:0002443 leukocyte mediated immunity BP 570 148 152 0.782128474868991 0.0215373325535437 GO:0002444 myeloid leukocyte mediated immunity BP 423 110 114 0.745787139652445 0.0316370372459848 GO:0002446 neutrophil mediated immunity BP 385 104 96 0.571951311739052 0.201252379759194 GO:0002576 platelet degranulation BP 86 19 29 0.888785029280369 0.0154612137190786 GO:0006810 transport BP 3704 1022 853 0.333400659125918 0.515194298498255 GO:0006887 exocytosis BP 670 177 177 0.715486880693303 0.0198828499970463 GO:0006955 immune response BP 1355 348 356 0.926022540556113 0.00186119909072296 GO:0008150 biological_process BP 12239 3447 2786 0.0000000149021056849182 0.970546048751647 GO:0009987 cellular process BP 11767 3312 2664 0.000000791860964881637 0.992192116649992 GO:0016192 vesicle-mediated transport BP 1563 414 411 0.787941908772879 0.000769552500567336 GO:0032940 secretion by cell BP 1023 291 256 0.208099722897856 0.0644819822920157 GO:0036230 granulocyte activation BP 386 103 98 0.628980291432046 0.147115150809744 GO:0042119 neutrophil activation BP 382 103 96 0.580487115651267 0.177766548826902

I want to know how many genes are involved in each gene ontology term. Please help me how to get it.

R • 1.7k views
ADD COMMENT
0
Entering edit mode
2.8 years ago
Gordon Smyth ★ 7.0k

I want to know how many genes are involved in each gene ontology term

That's given by the N column of the output table.

ADD COMMENT
0
Entering edit mode

yeah but list of genes are not there. I want to know their names as well.

ADD REPLY
0
Entering edit mode
ADD REPLY
0
Entering edit mode

I have already gone through this link. I tried this but it didnt give me result of my own interest. This link code is giving entrez gene IDs but I havent that, instead of entrez gene IDs, I have ensembl IDs and entrez gene names. How can I retrieve entrez gene names from entrez gene IDs or is there any alternative to extract entrez gene names from that code?

ADD REPLY
0
Entering edit mode

Yes, naturally the code gives gene IDs. That is the purpose of gene IDs, to identify genes. Once you have the gene IDs, any other gene annotation is very easy to access.

The R programming environment provides many ways to do what you seem to want. For example, to get gene annotation and DE results for genes in the top GO term you might use

tab <- topTable(fit, n=Inf)
x <- org.Hs.eg.db::org.Hs.egGO2ALLEGS
Rkeys(x) <- "GO:0001775"
id.GO0001775 <- mappedLkeys(x)
tab.GO0001775 <- tab[tab$entrezgene %in% id.GO0001775,]

You could repeat lines 2--5 for any other GO term of interrest.

ADD REPLY
0
Entering edit mode

Thanks for your reply. I will try it and get back to you

ADD REPLY

Login before adding your answer.

Traffic: 2000 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