Question: topGO: GO terms but no P-value score
1
gravatar for khhgng
2.1 years ago by
khhgng60
khhgng60 wrote:

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

topgo gene ontology R • 1.6k views
ADD COMMENTlink written 2.1 years ago by khhgng60
1

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
ADD REPLYlink modified 2.1 years ago • written 2.1 years ago by Chirag Parsania1.5k

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

ADD REPLYlink written 2.1 years ago by khhgng60
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: 1747 users visited in the last hour