topGO enrichment using ensembl gene list
1
0
Entering edit mode
@alexthiemanngmxde-3307
Last seen 10.2 years ago
Hi, I just want to know if it is also possible to test for underrepresented GO categories by using the weight algorithm. If yes, do I have to change something in the definition of the test statistic when using weight instead of elim and classic? Thank you --
GO GO • 1.4k views
ADD COMMENT
0
Entering edit mode
Adrian Alexa ▴ 400
@adrian-alexa-936
Last seen 10.2 years ago
Hi Alex, Yes, you can test for underrepresentation with topGO. Basically what you need to do is to change the direction of the test. By default, when using Fisher's exact test, the alternative hypothesis is that the odds ratios are "greater" than the null odds. If yo want to test for underrepresentation you need to use as alternative "less". To achieve this you need to define a new test statistic in the following way: if(!isGeneric("GOFisherUnder")) setGeneric("GOFisherUnder", function(object) standardGeneric("GOFisherUnder")) setMethod("GOFisherUnder", "classicCount", function(object) { contMat <- contTable(object) if(all(contMat == 0)) p.value <- 1 else p.value <- fisher.test(contMat, alternative = "less")$p.value return(p.value) }) The following code will run the "weight" algorithm with this new test: test.stat <- new("weightCount", testStatistic = GOFisherUnder, name ="Weight with Fisher's exact test for underrepresentation") resFisher.weight <- getSigGroups(GOdata, test.stat) This is not the most elegant solution, since there is an option to parametrize the GOFisherTest, such that one can chose the direction of the test but I never did it ... I will put it on my TODO list and I'll try to include it in the next release. Hope this helps, Adrian On Thu, Feb 26, 2009 at 11:10 AM, <alexthiemann at="" gmx.de=""> wrote: > Hi, > > I just want to know if it is also possible to > test for underrepresented GO categories by > using the weight algorithm. If yes, do I have > to change something in the definition of the > test statistic when using weight instead of elim and classic? > > Thank you > -- > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor >
ADD COMMENT
0
Entering edit mode

Hi Adrian,

Just curious if you are going to be adding this functionality anytime soon? I would really like to specify it in runTest. Perhaps the test alternative could be passed as an option?  

Many thanks,

Ashley 

ADD REPLY

Login before adding your answer.

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