Hello list and Evarist,

I am using the phenoTest package in order to perform gene set enrichment 
analysis but I am getting some weird(I think) errors.

What I want to do is find the statistically significant enriched GO 
categories and KEGG pathways of the upregulated, downregulated and 
differentially expressed genes. I was able to find the enriched GO and 
KEGG for the upregulated and downregulated genes using these calls of gsea:
         gseaGOResults <- gsea.go(newDiffExpr, ontologies = 'BP', 
p.adjust.method='BH');
         gseaKEGGResults <- gsea.kegg(newDiffExpr, p.adjust.method='BH');

But when I do the same call with the parameter absVals set to TRUE(to 
find the enriched GO and KEGG based for the differentially expressed 
genes), for example I do this like this for the KEGG pathways:
         gseaKEGGResults <- gsea.kegg(newDiffExpr, p.adjust.method='BH', 
absVals = TRUE);
I get the following error:
         Error in gam(y.nosel ~ s(x.nosel, k = k, bs = "cr")) : Not 
enough (non-NA) data to do anything meaningful

I also get another error but not always. Unfortunately, I could not find 
exactly under which circumstances each error occurred. The second error 
is this:
         Error in smooth.construct.cr.smooth.spec(object, dk$data, 
dk$knots) : x.nosel has insufficient unique values to support 10 knots: 
reduce k.

You can find here 
<https://www.dropbox.com/s/7ojwm0gmjlkj2s5/gsea_test.zip> my data and a 
small script of what I am running. In the end of the email I have 
written also the output of sessionInfo() and traceback() of the first error.

Am I doing something wrong or have I overlooked something?

Thank you in advance,

Kostas Kerkentzes
Postgraduate student,
Computer Science Department,
University of Crete

This is the output of sessionInfo():

R version 3.0.2 (2013-09-25)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=Greek_Greece.1253  LC_CTYPE=Greek_Greece.1253    LC_MONETARY=Greek_Greece.1253
[4] LC_NUMERIC=C                  LC_TIME=Greek_Greece.1253

attached base packages:
  [1] grid      splines   parallel  stats     graphics  grDevices utils     datasets  methods
[10] base

other attached packages:
  [1] KEGG.db_2.10.1       hgu95av2.db_2.10.1   org.Hs.eg.db_2.10.1  phenoTest_1.10.0
  [5] RSQLite_0.11.4       DBI_0.2-7            gridExtra_0.9.1      ggplot2_0.9.3.1
  [9] BMA_3.16.2.3         robustbase_0.90-2    leaps_2.9            survival_2.37-7
[13] Heatplus_2.8.0       annotate_1.40.1      AnnotationDbi_1.24.0 Biobase_2.22.0
[17] BiocGenerics_0.8.0

loaded via a namespace (and not attached):
  [1] affy_1.40.0           affyio_1.30.0         BiocInstaller_1.12.0  biomaRt_2.18.0
  [5] BioNet_1.23.2         Biostrings_2.30.1     bit_1.1-11            bitops_1.0-6
  [9] Category_2.28.0       caTools_1.16          cellHTS2_2.26.0       cluster_1.15.1
[13] codetools_0.2-8       colorspace_1.2-4      DEoptimR_1.0-1        dichromat_2.0-0
[17] digest_0.6.4          ellipse_0.3-8         ff_2.2-12             foreach_1.4.1
[21] Formula_1.1-1         gdata_2.13.2          genefilter_1.44.0     GenomicRanges_1.14.4
[25] gplots_2.12.1         graph_1.40.1          GSEABase_1.24.0       gtable_0.1.2
[29] gtools_3.3.1          hgu133a.db_2.10.1     Hmisc_3.14-3          hopach_2.22.0
[33] HTSanalyzeR_2.14.0    igraph_0.7.0          IRanges_1.20.7        iterators_1.0.6
[37] KernSmooth_2.23-10    labeling_0.2          lattice_0.20-27       latticeExtra_0.6-26
[41] limma_3.18.13         MASS_7.3-30           Matrix_1.1-2-2        mgcv_1.7-28
[45] munsell_0.4.2         mvtnorm_0.9-9997      nlme_3.1-115          oligoClasses_1.24.0
[49] pcaPP_1.9-49          plyr_1.8.1            prada_1.38.0          preprocessCore_1.24.0
[53] proto_0.3-10          RankProd_2.34.0       RBGL_1.38.0           RColorBrewer_1.0-5
[57] Rcpp_0.11.0           RCurl_1.95-4.1        reshape2_1.2.2        rrcov_1.3-4
[61] scales_0.2.3          SNPchip_2.8.0         stats4_3.0.2          stringr_0.6.2
[65] tools_3.0.2           vsn_3.30.0            XML_3.98-1.1          xtable_1.7-3
[69] XVector_0.2.0         zlibbioc_1.8.0

This is the output of traceback():

13: stop("Not enough (non-NA) data to do anything meaningful")
12: gam(y.nosel ~ s(x.nosel, k = k, bs = "cr"))
11: getNesGam(escore, gsets.len, es.sim)
10: getSummary(es, es.sim, fchr, p.adjust.method = p.adjust.method,
         pval.comp.method, pval.smooth.tail, signatures, test, fewGsets)
9: cbind(n = unlist(lapply(x$s, length)), getSummary(es, es.sim,
        fchr, p.adjust.method = p.adjust.method, pval.comp.method,
        pval.smooth.tail, signatures, test, fewGsets))
8: gseaSignificance(x, p.adjust.method, pval.comp.method, pval.smooth.tail)
7: gseaSignificance(x, p.adjust.method, pval.comp.method, pval.smooth.tail)
6: FUN(X[[1L]], ...)
5: lapply(x, function(x) gseaSignificance(x, p.adjust.method, pval.comp.method,
        pval.smooth.tail))
4: gseaSignificance(sim, p.adjust.method = p.adjust.method, pval.comp.method = pval.comp.method,
        pval.smooth.tail = pval.smooth.tail)
3: gseaSignificance(sim, p.adjust.method = p.adjust.method, pval.comp.method = pval.comp.method,
        pval.smooth.tail = pval.smooth.tail)
2: gsea(x = x, gsets = kegg, logScale = logScale, absVals = absVals,
        averageRepeats = averageRepeats, B = B, mc.cores = mc.cores,
        test = test, p.adjust.method = p.adjust.method, pval.comp.method = pval.comp.method,
        pval.smooth.tail = pval.smooth.tail, minGenes = minGenes,
        maxGenes = maxGenes, center = center)
1: gsea.kegg(newDiffExpr, p.adjust.method = "BH", absVals = TRUE)



	[[alternative HTML version deleted]]

