topGo analysis getting same number of Annotated, significant and expected
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
• 2,727 views
•
link
1 answer
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
• 0 views
•
link
Log in to answer this question.