Hi,
I'm trying out the fgsea
package, which is a great improvement over other much slower gsea
implementations.
One question though - I'm interested in testing for enrichment of sets both at the top of the fold-change list as well as in its bottom (for example this option is implemented in piano
's runGSA
). I thought doing this will achieve it:
data(examplePathways)
data(exampleRanks)
fgseaDnRes <- fgsea(pathways = examplePathways,stats = exampleRanks,minSize=15,maxSize=500,nperm=10000)
fgseaUpRes <- fgsea(pathways = examplePathways,stats = -1*rev(exampleRanks),minSize=15,maxSize=500,nperm=10000)
But fgseaDnRes
and fgseaUpRes
are nearly the same. This is not specific to the examplePathways
data as running a similar tool such as GORILLA (http://cbl-gorilla.cs.technion.ac.il/) on both directions of examplePathways
doesn't produce this result bu rather gives tow very different enrichment results.
Any idea?
> sessionInfo()
R version 3.3.1 (2016-06-21)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] 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] doParallel_1.0.10 iterators_1.0.8 foreach_1.4.3 fgsea_1.0.2 Rcpp_0.12.8
loaded via a namespace (and not attached):
[1] mclust_5.2 mvtnorm_1.0-5 lattice_0.20-33 Rsamtools_1.26.1 class_7.3-14
[6] Biostrings_2.40.2 assertthat_0.1 R6_2.2.0 GenomeInfoDb_1.10.0 plyr_1.8.4
[11] chron_2.3-47 stats4_3.3.1 RSQLite_1.0.0 ggplot2_2.2.1 zlibbioc_1.20.0
[16] GenomicFeatures_1.26.0 lazyeval_0.2.0 diptest_0.75-7 data.table_1.9.6 annotate_1.52.0
[21] whisker_0.3-2 Rgraphviz_2.18.0 kernlab_0.9-25 S4Vectors_0.10.3 Matrix_1.2-6
[26] qtl_1.39-5 BiocParallel_1.8.1 RCurl_1.95-4.8 biomaRt_2.30.0 munsell_0.4.3
[31] rtracklayer_1.34.1 BiocGenerics_0.20.0 nnet_7.3-12 SummarizedExperiment_1.2.3 tibble_1.2
[36] gridExtra_2.2.1 codetools_0.2-14 IRanges_2.6.1 dendextend_1.3.0 XML_3.98-1.4
[41] dplyr_0.5.0 GenomicAlignments_1.8.4 MASS_7.3-45 bitops_1.0-6 grid_3.3.1
[46] qpgraph_2.8.2 xtable_1.8-2 gtable_0.2.0 DBI_0.5-1 magrittr_1.5
[51] scales_0.4.1 graph_1.50.0 XVector_0.14.0 flexmix_2.3-13 robustbase_0.92-6
[56] fastcluster_1.1.22 fastmatch_1.0-4 tools_3.3.1 fpc_2.1-10 Biobase_2.34.0
[61] trimcluster_0.1-2 DEoptimR_1.0-6 AnnotationDbi_1.36.0 colorspace_1.2-7 cluster_2.0.4
[66] GenomicRanges_1.24.2 prabclus_2.2-6 modeltools_0.2-21