require(DOSE)
require(meshes)
## this call to enrichMeSH talks in red too much, but works
data(geneList)
gene <- names(geneList)[abs(geneList) > 1.5]
x <- enrichMeSH(gene, MeSHDb = "MeSH.Hsa.eg.db", database='gendoo', category = 'C')
# Loading required package: MeSH.Hsa.eg.db
# Loading required package: MeSHDbi
# Loading required package: BiocGenerics
# Loading required package: parallel
#
# Attaching package: ‘BiocGenerics’
#
# The following objects are masked from ‘package:parallel’:
#
# clusterApply, clusterApplyLB, clusterCall, clusterEvalQ, clusterExport,
# clusterMap, parApply, parCapply, parLapply, parLapplyLB, parRapply,
# parSapply, parSapplyLB
#
# The following objects are masked from ‘package:stats’:
#
# IQR, mad, xtabs
#
# The following objects are masked from ‘package:base’:
#
# anyDuplicated, append, as.data.frame, cbind, colnames, do.call, duplicated,
# eval, evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply,
# lengths, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin,
# pmin.int, Position, rank, rbind, Reduce, rownames, sapply, setdiff, sort,
# table, tapply, union, unique, unsplit, which, which.max, which.min
#
#
# Attaching package: ‘MeSHDbi’
#
# The following object is masked from ‘package:utils’:
#
# packageName
## this call to enrichMeSH breaks down complaining
y <- gseMeSH(gene, MeSHDb = "MeSH.Hsa.eg.db", database = 'gene2pubmed', category = "G")
# Error in GSEA_internal(geneList = geneList, exponent = exponent, nPerm = nPerm, :
# geneList should be a decreasing sorted vector...
## when the complaint is resolved, it still breaks down with another error
geneS <- sort(gene, decreasing = TRUE)
y <- gseMeSH(geneS, MeSHDb = "MeSH.Hsa.eg.db", database = 'gene2pubmed', category = "G")
# preparing geneSet collections...
# GSEA analysis...
# Error in abs(stats) : non-numeric argument to mathematical function
## this function also does not work
## x[1,1] is the set "D000782"
gseaplot(gseaResult= x, geneSetID= x[1,1])
# Error: Aesthetics must be either length 1 or the same as the data (5): ymin, ymax, x
sessionInfo()
# R version 3.3.2 (2016-10-31)
# Platform: x86_64-pc-linux-gnu (64-bit)
# Running under: Ubuntu 16.04.1 LTS
#
# locale:
# [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
# [4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
# [7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
# [10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
#
# attached base packages:
# [1] parallel stats graphics grDevices utils datasets methods base
#
# other attached packages:
# [1] MeSH.Hsa.eg.db_1.7.0 MeSHDbi_1.10.0 BiocGenerics_0.20.0 meshes_1.0.0
# [5] DOSE_3.0.10
#
# loaded via a namespace (and not attached):
# [1] Rcpp_0.12.9 plyr_1.8.4 tools_3.3.2 digest_0.6.12
# [5] RSQLite_1.1-2 memoise_1.0.0 tibble_1.2 gtable_0.2.0
# [9] fastmatch_1.1-0 igraph_1.0.1 DBI_0.5-1 fgsea_1.0.2
# [13] gridExtra_2.2.1 stringr_1.1.0 S4Vectors_0.12.1 IRanges_2.8.1
# [17] stats4_3.3.2 grid_3.3.2 qvalue_2.6.0 data.table_1.10.4
# [21] Biobase_2.34.0 AnnotationDbi_1.36.2 BiocParallel_1.8.1 GOSemSim_2.0.4
# [25] GO.db_3.4.0 ggplot2_2.2.1 DO.db_2.9 reshape2_1.4.2
# [29] magrittr_1.5 MeSH.db_1.7.0 scales_0.4.1 splines_3.3.2
# [33] assertthat_0.1 colorspace_1.3-2 stringi_1.1.2 lazyeval_0.2.0
# [37] munsell_0.4.3