topGo analysis getting same number of Annotated, significant and expected
1
0
Entering edit mode
4.2 years ago

Hi,

I am trying to rum topGo analysis for some of the DE genes using topGO, but I am getting the same number of annotated, significant and expected.

Below is my code:

library(topGO)
library(org.At.tair.db)

tmp<-read.csv("./topGo-edgeRAll-input.csv")
geneList<-tmp$FDR
names(geneList) <-tmp$Gene

head(geneList)
GOdata <- new("topGOdata",
              ontology="BP",
              allGenes=geneList,
              geneSelectionFun=function(x)(x==1),
              annot=annFUN.org, mapping="org.At.tair.db")

resultKS<- runTest(GOdata, algorithm = "weight01", statistic = "ks")
resultKS
tab<- GenTable(GOdata, raw.p.value=resultKS, topNodes=length(resultKS@score), numChar=120)
head(tab)

Getting results:

GO.ID                                                 Term Annotated Significant Expected raw.p.value
1 GO:0009718 anthocyanin-containing compound biosynthetic process        14          14       14     1.9e-06
2 GO:0009744                                  response to sucrose        23          23       23     3.1e-05
3 GO:0010224                                     response to UV-B        20          20       20      0.0002
4 GO:0080167                                 response to karrikin        17          17       17      0.0016
5 GO:0002679       respiratory burst involved in defense response         6           6        6      0.0022
6 GO:0006857                               oligopeptide transport        10          10       10      0.0081

I appreciate your help!

Best

RNA-Seq • 2.1k views
ADD COMMENT
0
Entering edit mode
4.2 years ago

I think that it's due to the fact that you are using the 'weight01' algorithm, just as they use here: https://ucdavis-bioinformatics-training.github.io/2018-June-RNA-Seq-Workshop/friday/enrichment.html

Also, be very careful about the use of this parameter: geneSelectionFun - in your code, you are only retaining genes with FDR q-values (adjusted p-values) == 1, as this example shows:

genes
    a     b     c     d     e 
1.000 0.500 0.001 1.000 6.000 

geneSelectionFun=function(x)(x==1)
genes[geneSelectionFun(genes)]
a d 
1 1

If you want to automatically include all genes, then use:

geneSelectionFun = function(x) (TRUE)

Kevin

ADD COMMENT

Login before adding your answer.

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