This is a test version of Biostars. For the public version, visit https://www.biostars.org.
R bioconductor in analysying methylation data

I was working on methylation profiling data. I tried to find the gene ontology related to identified DMRs using gometh function.

The command I gave is:

gst <- gometh(sig.cpg=sigCpgs, all.cpg=allcpgs, collection = "GO",plot.bias = FALSE, prior.prob = TRUE)

But I got the error like this.

Error in BiasedUrn::pWNCHypergeo(S[i, 1 + j], S[i, "N"], Total - S[i,  : 
  Invalid value for odds
In addition: Warning message:
In alias2SymbolTable(flat$symbol) :
  Multiple symbols ignored for one or more aliases
r

1 answer

For some reason the odds that limma::goana is calculating either give non finite values or negative values. The key line of the function could be the following:

Odds <- S[, "PP"]/(SumPP - S[, "PP"]) * M2/S[, "N"]

Where S[,'PP'] is the summed prior probability of all the probes for a given GO term and SumPP is the sum of the summed prior probabilities for all GO terms. If all the probes from your universe map to a single GO category the denominator equals to 0 and you get an Infinite value, which is actually the reason for your error.

Log in to answer this question.