I'm running goseq on a sequence of bootstraps where a DE test is performed on a random selection of replicates. THis way, I have a constant list of background genes and a selection of significant genes which is slightly changing from bootstrap to bootstrap. goseq works nicely on most of these bootstraps, but every now and then it crashes. Here is an example:
> library(goseq) > library(org.Sc.sgd.db) > all.genes = toupper(scan("test_all.txt", what="character")) Read 7126 items > sel.genes = toupper(scan("test_sel.txt", what="character")) Read 630 items > gene.vector = as.integer(all.genes%in%sel.genes) > names(gene.vector) = all.genes > pwf=nullp(gene.vector, "sacCer2", "ensGene") Loading sacCer2 length data... Error in if (min(fv) < lower_bound) fv = fv - min(fv) + lower_bound : missing value where TRUE/FALSE needed
This happens only to a few bootstraps, must be some peculiar selection of genes causing it.
Here are the text files (gene lists) I used in this example (they crash goseq):
OK, this helped! I updated goseq to version 1.18.0 and the error disappeared.
Thanks a lot,
Marek