I am quite puzzled by your post. The goseq function seems to have run correctly both with and without gene length correction. What then is the problem?
Why are you surprised that you get the same number of GO terms with and without gene length correction? Why is that a problem? You might get more or fewer, but there's no reason why you might not the get same GO terms either way. Compared with a standard GO analysis, goseq penalizes GO terms containing long genes in favor of GO terms with shorter genes, but it is not systematically more or less conservative than a standard analysis.
I don't understand your question about modifying the PWF function. Why would you want to modify the PWF function? You have already done the test without gene length correction (by using the hypergeometric option), and when you use that method the PWF becomes irrelevant. So what is the problem? What else do you want to do?
Thank you for the reply. My concern was not getting more enriched GO terms using hypergeometric option and if I was missing any other parameter. Your explanation is helpful.
Hello Gordon,
Thank you for the reply. My concern was not getting more enriched GO terms using hypergeometric option and if I was missing any other parameter. Your explanation is helpful.
Thanks