Direction aware fgsea test
1
0
Entering edit mode
rubi ▴ 110
@rubi-6462
Last seen 5.7 years ago

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         

 

fgsea gsea • 1.5k views
ADD COMMENT
2
Entering edit mode
alserg ▴ 240
@assaron
Last seen 7 days ago
St Louis, MO

Hi, 

The GSEA test is itself directional, so you don't need to invert sign yourself. There are pathways with positive and negative enrichment scores (ES or NES). May be the example that goes with fgsea is not the best one, as the top-regulated pathways go in the same direction, but still there are both positively and negatively enriched ones.

You can check the table at the bottom of https://github.com/ctlab/fgsea, there are pathways like Cell cycle going one way and Chromatin going the other way.

 

ADD COMMENT

Login before adding your answer.

Traffic: 642 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6