Contents

1 Overview

Transcriptional networks are important tools to visualize complex biological systems that involve large groups of genes and multiple regulators. In a previous study, we have implemented the RTN R/Bioconductor package to reconstruct transcriptional regulatory networks (Fletcher et al. 2013). This package reconstructs regulons, consisting of a regulator and its target genes. A regulon can be further used to investigate, for example, the association of its expression on survival probabilities.

RTNsurvival is a tool for integrating regulons generated by the RTN package with survival information for the same set of samples used in the reconstruction of the transcriptional regulatory network. There are two main survival analysis pipelines: a Cox Proportional Hazards approach used to model regulons as predictors of survival time (Figure 1), and a Kaplan-Meier analysis showing the stratification of a cohort based on the regulon activity (Figure 2). For a given regulon, the 2-tailed GSEA approach is used to estimate regulon activity (differential Enrichment Score - dES) for each individual sample (Castro et al. 2016), and the dES distribution of all samples is then used to assess the survival statistics for the cohort. The plots can be fine-tuned to the user’s specifications.

2 Quick Start

2.1 Load regulons and survival data

This Vignette uses precomputed regulons available in the RTN package:

library(RTN)
data(stni, package="RTN")

The stni is a TNI-class object created from a subset of the expression data available in the Fletcher2013b package. The stni object contains a minimal toy reconstruction of 5 regulons (PGR, MYB, E2F2, FOXM1 and PTTG1).

More information about the parameters used to build the toy regulons can be viewed by calling the summary of the stni object.

summary <- tni.get(stni, what = "summary")

The RTNsurvival package provides a survival table for the samples in the stni object, including clinical data from the METABRIC study (Curtis et al. 2012) where the expression data was originally obtained.

library(RTNsurvival)
data(survival.data)

2.2 Preprocess input data

In order to run the analysis pipelines, the input data must be evaluated by the tnsPreprocess method in order to build a TNS-class object. Note that the survival table must be provided with time and event columns, and key covariates can also be specified for subsequent use in the Cox analysis.

rtns <- tni2tnsPreprocess(stni, survivalData = survival.data, time = 1, event = 2, endpoint = 120, keycovar = c("Grade","Age"))

2.3 Compute regulon activity

The survival analysis pipeline depends on the 2-tailed GSEA approach, which estimates regulon activity (dES) for all samples in the cohort. The tnsGSEA2 function calls the tni.gsea2 method available in the RTN package.

rtns <- tnsGSEA2(rtns)

2.4 Run the Cox analysis pipeline

Once the dES metric has been computed by tnsGSEA2 function, then it is possible to run the Cox analysis.

The tnsCox method runs a Cox multivariate regression analysis and shows the proportional hazards of each of the specified regulons and the provided key covariates, indicating the contribution of each variable to survival (Figure 1). The method uses the Bioconductor survival package to fit the Cox model.

rtns <- tnsCox(rtns)
tnsPlotCox(rtns)

title Figure 1 - The plot shows the Hazard Ratio for all key covariates and regulons. Lines that are completely to the right of the grey line, shown in red, are positively associated with hazard. This means that samples with high expression of this regulon have poor prognosis. The further to the right or left of the grey line, the more significant is the association.

2.5 Run the Kaplan-Meier analysis pipeline

The tnsKM method generates a Kaplan-Meier plot, which consists of three panels put together: a ranked dES plot for the cohort, a status of key attributes plot (optional) and a Kaplan-Meier plot, showing survival curves for lower and higher dES samples (Figure 2).

rtns <- tnsKM(rtns, sections = 2)
tnsPlotKM(rtns, regs="FOXM1", attribs = list(c("ER+","ER-"),c("PR+","PR-"),c("G1","G2","G3"),"HT"))

title Figure 2 - The Kaplan-Meier plot for FOXM1 shows that samples with high regulon activity (red and pink) have poorer prognosis, as their survival probability is lower than the samples that have low regulon activity (light and dark blue).

3 Plot 2-tailed GSEA for individual samples

Individual sample differential enrichment analysis can be investigated using the tnsPlotGSEA2 function. This will generate a 2-tailed GSEA plot for the differential expression of both positive and negative targets of a regulon (Figure 3). This step takes a little longer because the GSEA is recomputed for a selected regulon, and because tnsPlotGSEA2 is a wrapper for the RTN function tna.plot.gsea2, which generates the GSEA plot.

tnsPlotGSEA2(rtns, "MB-5115", regs = "FOXM1")

title Figure 3 - The 2-tailed GSEA plot for the MB-5116 sample. It shows that the positive targets of the FOXM1 regulator are positively enriched, while the negative targets are negatively enriched.

4 Plot regulon activity for all samples

An overview of regulon activity can be obtained by plotting a heatmap with all evaluated samples and regulons. First, we need to obtain the matrix of dES values from the TNS object. Then, we can plot the heatmap using the pheatmap function from the pheatmap package. In this example, we also illustrate how to incorporate sample features from the survival data.

library(pheatmap)
enrichmentScores <- tnsGet(rtns, "regulonActivity")
survival.data <- tnsGet(rtns, "survivalData")
annotation_col <- survival.data[,c("ER+", "ER-")]
pheatmap(t(enrichmentScores$dif), 
         annotation_col = annotation_col,
         show_colnames = FALSE, 
         annotation_legend = FALSE)

title Figure 4 - Regulon activity of individual tumour samples. This heatmap shows two regulon clusters. The PGR and MYB regulons are repressed in the ER- samples and activated in ER+ samples. The PTTG1, E2F2 and FOXM1 regulons, on the other hand, are activated in ER- samples and repressed in ER+ samples.

5 Session information

## 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] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
## [1] RTNsurvival_1.16.0 RTNduals_1.16.0    RTN_2.16.0         BiocStyle_2.20.0  
## 
## loaded via a namespace (and not attached):
##   [1] segmented_1.3-4             bitops_1.0-7               
##   [3] matrixStats_0.58.0          RColorBrewer_1.1-2         
##   [5] GenomeInfoDb_1.28.0         tools_4.1.0                
##   [7] bslib_0.2.5.1               utf8_1.2.1                 
##   [9] R6_2.5.0                    KernSmooth_2.23-20         
##  [11] DBI_1.1.1                   BiocGenerics_0.38.0        
##  [13] colorspace_2.0-1            gridExtra_2.3              
##  [15] tidyselect_1.1.1            curl_4.3.1                 
##  [17] compiler_4.1.0              Biobase_2.52.0             
##  [19] DelayedArray_0.18.0         bookdown_0.22              
##  [21] sass_0.4.0                  scales_1.1.1               
##  [23] proxy_0.4-25                stringr_1.4.0              
##  [25] digest_0.6.27               foreign_0.8-81             
##  [27] mixtools_1.2.0              rmarkdown_2.8              
##  [29] rio_0.5.26                  XVector_0.32.0             
##  [31] pkgconfig_2.0.3             htmltools_0.5.1.1          
##  [33] MatrixGenerics_1.4.0        highr_0.9                  
##  [35] dunn.test_1.3.5             limma_3.48.0               
##  [37] pwr_1.3-0                   rlang_0.4.11               
##  [39] readxl_1.3.1                jquerylib_0.1.4            
##  [41] generics_0.1.0              jsonlite_1.7.2             
##  [43] viper_1.26.0                dplyr_1.0.6                
##  [45] zip_2.1.1                   car_3.0-10                 
##  [47] RCurl_1.98-1.3              magrittr_2.0.1             
##  [49] GenomeInfoDbData_1.2.6      Matrix_1.3-3               
##  [51] Rcpp_1.0.6                  munsell_0.5.0              
##  [53] S4Vectors_0.30.0            fansi_0.4.2                
##  [55] abind_1.4-5                 lifecycle_1.0.0            
##  [57] minet_3.50.0                stringi_1.6.2              
##  [59] yaml_2.2.1                  carData_3.0-4              
##  [61] MASS_7.3-54                 SummarizedExperiment_1.22.0
##  [63] zlibbioc_1.38.0             grid_4.1.0                 
##  [65] parallel_4.1.0              forcats_0.5.1              
##  [67] crayon_1.4.1                egg_0.4.5                  
##  [69] lattice_0.20-44             haven_2.4.1                
##  [71] splines_4.1.0               hms_1.1.0                  
##  [73] magick_2.7.2                knitr_1.33                 
##  [75] pillar_1.6.1                igraph_1.2.6               
##  [77] GenomicRanges_1.44.0        stats4_4.1.0               
##  [79] glue_1.4.2                  evaluate_0.14              
##  [81] data.table_1.14.0           BiocManager_1.30.15        
##  [83] vctrs_0.3.8                 cellranger_1.1.0           
##  [85] purrr_0.3.4                 gtable_0.3.0               
##  [87] assertthat_0.2.1            kernlab_0.9-29             
##  [89] ggplot2_3.3.3               xfun_0.23                  
##  [91] openxlsx_4.2.3              e1071_1.7-6                
##  [93] RedeR_1.40.0                class_7.3-19               
##  [95] survival_3.2-11             tibble_3.1.2               
##  [97] snow_0.4-3                  pheatmap_1.0.12            
##  [99] IRanges_2.26.0              ellipsis_0.3.2

References

Castro, Mauro, Ines de Santiago, Thomas Campbell, Courtney Vaughn, Theresa Hickey, Edith Ross, Wayne Tilley, Florian Markowetz, Bruce Ponder, and Kerstin Meyer. 2016. “Regulators of Genetic Risk of Breast Cancer Identified by Integrative Network Analysis.” Nature Genetics 48 (1): 12–21. https://doi.org/10.1038/ng.3458.

Curtis, Christina, Sohrab P. Shah, Suet-Feung Chin, Gulisa Turashvili, Oscar M. Rueda, Mark J. Dunning, Doug Speed, et al. 2012. “The Genomic and Transcriptomic Architecture of 2,000 Breast Tumours Reveals Novel Subgroups.” Nature 486: 346–52. https://doi.org/10.1038/nature10983.

Fletcher, Michael, Mauro Castro, Suet-Feung Chin, Oscar Rueda, Xin Wang, Carlos Caldas, Bruce Ponder, Florian Markowetz, and Kerstin Meyer. 2013. “Master Regulators of FGFR2 Signalling and Breast Cancer Risk.” Nature Communications 4: 2464. https://doi.org/10.1038/ncomms3464.