This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Topgo Error

I'm using topGO and getting a couple odd (maybe related?) errors.

The default test

resultWeight01 <- runTest(BP_GOdata, statistic = 'fisher')

runs fine.

But, when I try:

resultKS <- runTest(BP_GOdata, algorithm = 'classic', statistic = 'ks')

I get the message

Error in seq_len(N)[-x.a] : only 0's may be mixed with negative subscripts

and when I run

resultKS.elim <- runTest(BP_GOdata, algorithm = 'elim', statistic = "ks")

I get the error message:

Error in ks.test(x.a, seq_len(N)[-x.a], alternative = "greater") : not enough 'y' data

The default results may be adequate, but curious why the other methods don't work.

My topGOdata:

BP_GOdata <- new("topGOdata", description = "BP gene set analysis", ontology = "BP", allGenes = geneList, geneSel = selectFDR, nodeSize = 10, annot = annFUN.gene2GO, gene2GO = geneID2GO)

bioconductor gene enrichment

2 answers

Solved my own question...

I had NA values in my 'geneList'. These didn't cause problems with the default (gene counts) but did cause problems with the 'ks' tests based on gene scores.

The same probelm. Thanks for your sharing

Log in to answer this question.