This is a test version of Biostars. For the public version, visit https://www.biostars.org.
topGO: GO terms but no P-value score

Hi all,

I am using topGO package for gene set enrichment analysis. I have a list of some pre selected GO terms that I want to check within this GOdata and then analyze with fisher's exact test. However after running this code, though I am able to get the annotated and significant genes number but no scores or P-values. Am I missing some step or are there additional steps required to get the P-values for these GO terms ?

myterms <- as.character(GOterms_significant$GO.ID)
str(myterms)
num.ann.genes <- countGenesInTerm(GOdata, myterms) #to get the number of annotated genes 
num.ann.genes
ann.genes <- genesInTerm(GOdata, myterms) #to get the annotated genes in GOdata
head(ann.genes)
termStat(GOdata, myterms)

Term Annotated Significant Expected

GO:0061630 111 19 5.94

GO:0061659 111 19 5.94

GO:0001071 689 56 36.86

GO:0003700 689 56 36.86

GO:0008061 38 4 2.03

GO:0004842 271 32 14.50

GO:0019787 279 32 14.93

r topgo gene ontology

You can do reverse. First do enrichment and then check if you get enriched terms which you are looking for Following are the three main functions I run for topGO to get enriched go term with pvalue. Go through tutorial to get details of how to create GOdata object

## prepare master object for GO enrichment 
        GOdata <- new("topGOdata", ontology = "BP", allGenes = geneList, annot = annFUN.gene2GO, gene2GO = geneID2GO)

        ## perform enrichment test 
        algo <- "elim"  ##  choice of the algorithms are classic,elim and weight
        stat <- "fisher"
        resultFisher.elim <- runTest(GOdata, algorithm = algo, statistic = stat)

        ## write Data 
        allRes <- GenTable(GOdata, elimFisher = resultFisher.elim, topNodes = 100,numChar=1000) ## top 100 terms

Well yes that's the way I did now. Although I was trying to do the other way, from input of GO terms.

0 answers

No answers yet.

Log in to answer this question.