1 vissE

This package implements the vissE algorithm to summarise results of gene-set analyses. Usually, the results of a gene-set enrichment analysis (e.g using limma::fry, singscore or GSEA) consist of a long list of gene-sets. Biologists then have to search through these lists to determines emerging themes to explain the altered biological processes. This task can be labour intensive therefore we need solutions to summarise large sets of results from such analyses.

This package provides an approach to provide summaries of results from gene-set enrichment analyses. It exploits the relatedness between gene-sets and the inherent hierarchical structure that may exist in pathway databases and gene ontologies to cluster results. For each cluster of gene-sets vissE identifies, it performs text-mining to automate characterisation of biological functions and processes represented by the cluster.

An additional power of vissE is to perform a novel type of gene-set enrichment analysis based on the network of similarity between gene-sets. Given a list of genes (e.g. from a DE analysis), vissE can characterise said list by first identifying all other gene-sets that are similar to it, following up with clustering the resulting gene-sets and finally performing text-mining to reveal emerging themes.

In addition to these analyses, it provides visualisations to assist the users in understanding the results of their experiment. This document will demonstrate these functions across the two use-cases. The vissE package can be downloaded as follows:

2 Summarising the results of a gene-set enrichment analysis

Often, the results of a gene-set enrichment analysis (be it an over representation analysis of a functional class scoring approach) is a list of gene-sets that are accompanied by their statistics and p-values or false discovery rates (FDR). These results are mostly scanned through by biologists who then extract relevant themes pertaining to the experiment of interest. The approach here, vissE, will allow automated extraction of themes.

The example below can be used with the results of any enrichment analysis. The data below is simulated to demonstrate the workflow.

A vissE analysis involves 3 steps:

  1. Compute gene-set overlaps and the gene-set overlap network
  2. Identify clusters of gene-sets based on their overlap
  3. Characterise clusters using text mining
  4. (Optional) Visualise gene-level statistics

2.1 Compute gene-set overlap

The default approach to computing overlaps is using the Jaccard index. Overlap is computed based on the gene overlap between gene-sets. Alternatively, the overlap coefficient can be used. The latter can be used to highlight hierarchical overlaps (such as those present in the gene ontology).

The overlap network plot above is annotated using the MSigDB category. If gene-set statistics are available, they can be projected onto the network too. Gene-set statistics can be passed onto the plotting function as a named vector.

2.2 Identify clusters of gene-sets

Related gene-sets likely represent related processes. The next step is to identify clusters of gene-sets so that they can be assessed for biological themes. The specific clustering approach can be selected by the user though we recommend graph clustering approaches to use the information provided in the overlap graph. We recommend using the igraph::cluster_walktrap() algorithm as it works well with dense graphs. Many other algorithms are implemented in the igraph package and these can be used instead of the walktrap algorithm.

2.3 Characterise gene-set clusters

Gene-set clusters identified can be assessed for their biological similarities using text-mining approaches. Here, we perform a frequency analysis (adjusted for using the inverse document frequency) on the gene-set names or their short descriptions to assess recurring biological themes in clusters. These results are then presented as word clouds.

2.4 Visualise gene-level statistics for gene-set clusters

Gene-level statistics for each gene-set cluster can be visualised to better understand the genes contributing to significance of gene-sets. Gene-level statistics can be passed onto the plotting function as a named vector. A jitter is applied on the x-axis (due to its discrete nature).

3 Characterise a gene list

An alternative application of this package is to characterise a gene list based on similarity with all other gene-sets in the MSigDB. Below, we demonstrate how a list of DNA repair genes can be characterised using this approach.

First we generate a similarity network using the gene list as a query.

Next, we follow a similar workflow to the previous section whereby gene-set clusters are first, identified, then characterised. Instead of the walktrap clustering algorithm, we can use the Louvain algorithm.

4 Session information

sessionInfo()
#> R version 4.1.0 (2021-05-18)
#> Platform: x86_64-pc-linux-gnu (64-bit)
#> Running under: Ubuntu 20.04.2 LTS
#> 
#> Matrix products: default
#> BLAS:   /home/biocbuild/bbs-3.13-bioc/R/lib/libRblas.so
#> LAPACK: /home/biocbuild/bbs-3.13-bioc/R/lib/libRlapack.so
#> 
#> locale:
#>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
#>  [3] LC_TIME=en_GB              LC_COLLATE=C              
#>  [5] LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8   
#>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C                 
#>  [9] LC_ADDRESS=C               LC_TELEPHONE=C            
#> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
#> 
#> attached base packages:
#> [1] stats4    parallel  stats     graphics  grDevices utils     datasets 
#> [8] methods   base     
#> 
#> other attached packages:
#>  [1] ggpubr_0.4.0         ggplot2_3.3.3        igraph_1.2.6        
#>  [4] Matrix_1.3-3         vissE_1.0.0          GSEABase_1.54.0     
#>  [7] graph_1.70.0         annotate_1.70.0      XML_3.99-0.6        
#> [10] AnnotationDbi_1.54.0 IRanges_2.26.0       S4Vectors_0.30.0    
#> [13] Biobase_2.52.0       BiocGenerics_0.38.0  msigdb_0.99.5       
#> 
#> loaded via a namespace (and not attached):
#>   [1] readxl_1.3.1                  backports_1.2.1              
#>   [3] AnnotationHub_3.0.0           BiocFileCache_2.0.0          
#>   [5] plyr_1.8.6                    GenomeInfoDb_1.28.0          
#>   [7] digest_0.6.27                 htmltools_0.5.1.1            
#>   [9] fansi_0.4.2                   magrittr_2.0.1               
#>  [11] memoise_2.0.0                 tm_0.7-8                     
#>  [13] openxlsx_4.2.3                Biostrings_2.60.0            
#>  [15] textshape_1.7.1               colorspace_2.0-1             
#>  [17] blob_1.2.1                    rappdirs_0.3.3               
#>  [19] ggrepel_0.9.1                 sylly_0.1-6                  
#>  [21] haven_2.4.1                   xfun_0.23                    
#>  [23] dplyr_1.0.6                   crayon_1.4.1                 
#>  [25] RCurl_1.98-1.3                jsonlite_1.7.2               
#>  [27] glue_1.4.2                    polyclip_1.10-0              
#>  [29] gtable_0.3.0                  zlibbioc_1.38.0              
#>  [31] XVector_0.32.0                scico_1.2.0                  
#>  [33] car_3.0-10                    abind_1.4-5                  
#>  [35] scales_1.1.1                  DBI_1.1.1                    
#>  [37] qdapRegex_0.7.2               rstatix_0.7.0                
#>  [39] Rcpp_1.0.6                    xtable_1.8-4                 
#>  [41] foreign_0.8-81                bit_4.0.4                    
#>  [43] textclean_0.9.3               httr_1.4.2                   
#>  [45] RColorBrewer_1.1-2            ggwordcloud_0.5.0            
#>  [47] ellipsis_0.3.2                pkgconfig_2.0.3              
#>  [49] farver_2.1.0                  sass_0.4.0                   
#>  [51] dbplyr_2.1.1                  utf8_1.2.1                   
#>  [53] tidyselect_1.1.1              labeling_0.4.2               
#>  [55] rlang_0.4.11                  reshape2_1.4.4               
#>  [57] later_1.2.0                   munsell_0.5.0                
#>  [59] BiocVersion_3.13.1            cellranger_1.1.0             
#>  [61] tools_4.1.0                   cachem_1.0.5                 
#>  [63] generics_0.1.0                RSQLite_2.2.7                
#>  [65] ExperimentHub_2.0.0           broom_0.7.6                  
#>  [67] evaluate_0.14                 stringr_1.4.0                
#>  [69] fastmap_1.1.0                 yaml_2.2.1                   
#>  [71] textstem_0.1.4                org.Hs.eg.db_3.13.0          
#>  [73] knitr_1.33                    bit64_4.0.5                  
#>  [75] zip_2.1.1                     purrr_0.3.4                  
#>  [77] KEGGREST_1.32.0               koRpus_0.13-8                
#>  [79] mime_0.10                     slam_0.1-48                  
#>  [81] xml2_1.3.2                    BiocStyle_2.20.0             
#>  [83] compiler_4.1.0                filelock_1.0.2               
#>  [85] curl_4.3.1                    png_0.1-7                    
#>  [87] interactiveDisplayBase_1.30.0 koRpus.lang.en_0.1-4         
#>  [89] ggsignif_0.6.1                syuzhet_1.0.6                
#>  [91] tibble_3.1.2                  tweenr_1.0.2                 
#>  [93] bslib_0.2.5.1                 stringi_1.6.2                
#>  [95] highr_0.9                     forcats_0.5.1                
#>  [97] lattice_0.20-44               vctrs_0.3.8                  
#>  [99] pillar_1.6.1                  lifecycle_1.0.0              
#> [101] BiocManager_1.30.15           jquerylib_0.1.4              
#> [103] cowplot_1.1.1                 data.table_1.14.0            
#> [105] bitops_1.0-7                  httpuv_1.6.1                 
#> [107] sylly.en_0.1-3                R6_2.5.0                     
#> [109] promises_1.2.0.1              gridExtra_2.3                
#> [111] rio_0.5.26                    lexicon_1.2.1                
#> [113] MASS_7.3-54                   assertthat_0.2.1             
#> [115] withr_2.4.2                   GenomeInfoDbData_1.2.6       
#> [117] hms_1.1.0                     grid_4.1.0                   
#> [119] prettydoc_0.4.1               tidyr_1.1.3                  
#> [121] rmarkdown_2.8                 carData_3.0-4                
#> [123] ggnewscale_0.4.5              ggforce_0.3.3                
#> [125] NLP_0.2-1                     shiny_1.6.0