Question: topGo analysis getting same number of Annotated, significant and expected
0
gravatar for rashmi.jain20
7 months ago by
rashmi.jain200 wrote:

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 • 408 views
ADD COMMENTlink modified 7 months ago by Kevin Blighe65k • written 7 months ago by rashmi.jain200
0
gravatar for Kevin Blighe
7 months ago by
Kevin Blighe65k
Kevin Blighe65k wrote:

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 COMMENTlink modified 7 months ago • written 7 months ago by Kevin Blighe65k
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: 1343 users visited in the last hour