Last updated: 2024-05-24

Checks: 7 0

Knit directory: PPP/

This reproducible R Markdown analysis was created with workflowr (version 1.7.1). The Checks tab describes the reproducibility checks that were applied when the results were created. The Past versions tab lists the development history.


Great! Since the R Markdown file has been committed to the Git repository, you know the exact version of the code that produced these results.

Great job! The global environment was empty. Objects defined in the global environment can affect the analysis in your R Markdown file in unknown ways. For reproduciblity it’s best to always run the code in an empty environment.

The command set.seed(20240521) was run prior to running the code in the R Markdown file. Setting a seed ensures that any results that rely on randomness, e.g. subsampling or permutations, are reproducible.

Great job! Recording the operating system, R version, and package versions is critical for reproducibility.

Nice! There were no cached chunks for this analysis, so you can be confident that you successfully produced the results during this run.

Great job! Using relative paths to the files within your workflowr project makes it easier to run your code on other machines.

Great! You are using Git for version control. Tracking code development and connecting the code version to the results is critical for reproducibility.

The results in this page were generated with repository version fe48b9f. See the Past versions tab to see a history of the changes made to the R Markdown and HTML files.

Note that you need to be careful to ensure that all relevant files for the analysis have been committed to Git prior to generating the results (you can use wflow_publish or wflow_git_commit). workflowr only checks the R Markdown file, but you know if there are other scripts or data files that it depends on. Below is the status of the Git repository when the results were generated:


Ignored files:
    Ignored:    .DS_Store
    Ignored:    .RData
    Ignored:    .Rhistory
    Ignored:    data/.DS_Store
    Ignored:    data/viper/.DS_Store
    Ignored:    output/.DS_Store
    Ignored:    output/viper/.DS_Store
    Ignored:    output/viper/exprs/.DS_Store
    Ignored:    output/viper/regulon/.DS_Store

Untracked files:
    Untracked:  formatted_data.txt
    Untracked:  output/viper/expr_processed/

Unstaged changes:
    Modified:   output/viper/regul_object/hnsc.RDS
    Modified:   output/viper/regul_object/kirc.RDS
    Modified:   output/viper/regul_object/luad.RDS
    Modified:   output/viper/regul_object/lusc.RDS
    Modified:   output/viper/regul_object/paad.RDS
    Modified:   output/viper/regulon/regulonblca_SYMBOL.adj
    Modified:   output/viper/regulon/regulonbrca_SYMBOL.adj
    Modified:   output/viper/regulon/reguloncesc_SYMBOL.adj
    Modified:   output/viper/regulon/reguloncoad_SYMBOL.adj
    Modified:   output/viper/regulon/regulonesca_SYMBOL.adj
    Modified:   output/viper/regulon/regulongbm_SYMBOL.adj
    Modified:   output/viper/regulon/regulonhnsc_SYMBOL.adj
    Modified:   output/viper/regulon/regulonkirc_SYMBOL.adj
    Modified:   output/viper/regulon/regulonkirp_SYMBOL.adj
    Modified:   output/viper/regulon/regulonlaml_SYMBOL.adj
    Modified:   output/viper/regulon/regulonlihc_SYMBOL.adj
    Modified:   output/viper/regulon/regulonluad_SYMBOL.adj
    Modified:   output/viper/regulon/regulonlusc_SYMBOL.adj
    Modified:   output/viper/regulon/regulonnet_SYMBOL.adj
    Modified:   output/viper/regulon/regulonov_SYMBOL.adj
    Modified:   output/viper/regulon/regulonpaad_SYMBOL.adj
    Modified:   output/viper/regulon/regulonpcpg_SYMBOL.adj
    Modified:   output/viper/regulon/regulonprad_SYMBOL.adj
    Modified:   output/viper/regulon/regulonread_SYMBOL.adj
    Modified:   output/viper/regulon/regulonsarc_SYMBOL.adj
    Modified:   output/viper/regulon/regulonstad_SYMBOL.adj
    Modified:   output/viper/regulon/regulontgct_SYMBOL.adj
    Modified:   output/viper/regulon/regulonthca_SYMBOL.adj
    Modified:   output/viper/regulon/regulonthym_SYMBOL.adj
    Modified:   output/viper/regulon/regulonucec_SYMBOL.adj

Note that any generated files, e.g. HTML, png, CSS, etc., are not included in this status report because it is ok for generated content to have uncommitted changes.


These are the previous versions of the repository in which changes were made to the R Markdown (analysis/viper_3.Rmd) and HTML (docs/viper_3.html) files. If you’ve configured a remote Git repository (see ?wflow_git_remote), click on the hyperlinks in the table below to view the files as they were in that past version.

File Version Author Date Message
Rmd fe48b9f Zhen Zuo 2024-05-24 Publish files

Load packages

library(viper)

Generating the gene expression signatures

dset <- readRDS("output/viper/expr_processed/kirc.RDS")
signature <- rowTtest(dset, "description", "tumor", "normal")
signature <- (qnorm(signature$p.value/2, lower.tail = FALSE) * sign(signature$statistic))[, 1]

NULL model by sample permutations

nullmodel <- ttestNull(dset, "description", "tumor", "normal", per = 1000, repos = TRUE, verbose = FALSE)

msVIPER

regulon <- readRDS("output/viper/regul_object/kirc.RDS")
regulon
Object of class regulon with 3045 regulators, 9693 targets and 107201 interactions

Normalized Enrichment Score (NES)

mrs <- msviper(signature, regulon, nullmodel, verbose = FALSE)
summary(mrs)
        Regulon Size   NES  p.value    FDR
EGF         EGF   43 -3.66 2.48e-04 0.0307
STAP1     STAP1   35 -3.67 2.39e-04 0.0307
DMRT2     DMRT2  101 -3.68 2.33e-04 0.0307
FGF9       FGF9   53 -3.69 2.26e-04 0.0307
TMPRSS2 TMPRSS2   59 -3.74 1.85e-04 0.0307
KNG1       KNG1   57 -3.82 1.33e-04 0.0307
GCGR       GCGR   65 -3.84 1.23e-04 0.0307
FOXI1     FOXI1   83 -3.92 8.99e-05 0.0307
PIK3C2G PIK3C2G   32 -3.97 7.13e-05 0.0307
OXGR1     OXGR1   89 -4.04 5.34e-05 0.0307

Beyond msVIPER

Leading-edge analysis

msVIPER infers the relative activity of a regulatory gene based on the enrichment of its most closely regulated targets on a given GES, but does not identify which are the target genes enriched in the GES. Subramanian et al. proposed a method called leading-edge analysis to identify the genes driving the enrichment of a gene-set on a GES based on Gene Set Enrichment Analysis (GSEA). We implemented the leading-edge analysis in the ledge function of the viper package. The function only has a msviper' class object as argument and generates an updatedmsviper’ object that now includes a `ledge’ slot.

mrs <- ledge(mrs)
summary(mrs)
        Regulon Size   NES  p.value    FDR
EGF         EGF   43 -3.66 2.48e-04 0.0307
STAP1     STAP1   35 -3.67 2.39e-04 0.0307
DMRT2     DMRT2  101 -3.68 2.33e-04 0.0307
FGF9       FGF9   53 -3.69 2.26e-04 0.0307
TMPRSS2 TMPRSS2   59 -3.74 1.85e-04 0.0307
KNG1       KNG1   57 -3.82 1.33e-04 0.0307
GCGR       GCGR   65 -3.84 1.23e-04 0.0307
FOXI1     FOXI1   83 -3.92 8.99e-05 0.0307
PIK3C2G PIK3C2G   32 -3.97 7.13e-05 0.0307
OXGR1     OXGR1   89 -4.04 5.34e-05 0.0307
                                               Ledge
EGF               DCLK1, SKA3, GNG7, TTR, + 34 genes
STAP1             KCNE1, LY9, CHAC1, KIT, + 25 genes
DMRT2     PART1, TPD52L1, CKMT2, C6orf52, + 88 genes
FGF9    ADRB1, TUBB2A, PRR15L, LINC01587, + 44 genes
TMPRSS2     C1orf168, GRHL1, WSCD2, RPF2, + 48 genes
KNG1       TDRD5, SNX33, ZCCHC16, PTPN13, + 49 genes
GCGR      HELZ2, NDRG2, TMSB15B, COL28A1, + 56 genes
FOXI1    COQ3, PTPN3, APOBEC3F, C1orf168, + 61 genes
PIK3C2G     ALDH1A2, CLUL1, STAP1, CEP55, + 27 genes
OXGR1   C9orf84, LZTS1, ADRB1, LINC01587, + 77 genes

Bootstrap msVIPER

signature <- bootstrapTtest(dset, "description", "tumor", "normal", per = 1000, verbose = FALSE)
mrs <- msviper(signature, regulon, nullmodel, verbose = FALSE)
mrs <- bootstrapmsviper(mrs, "mode")
summary(mrs)
        Regulon Size   NES  p.value    FDR
STAP1     STAP1   35 -3.65 2.57e-04 0.0325
DMRT2     DMRT2  101 -3.66 2.57e-04 0.0325
EGF         EGF   43 -3.66 2.52e-04 0.0325
FGF9       FGF9   53 -3.67 2.40e-04 0.0325
TMPRSS2 TMPRSS2   59 -3.70 2.17e-04 0.0325
KNG1       KNG1   57 -3.81 1.40e-04 0.0325
GCGR       GCGR   65 -3.81 1.37e-04 0.0325
FOXI1     FOXI1   83 -3.89 9.89e-05 0.0325
PIK3C2G PIK3C2G   32 -3.96 7.39e-05 0.0325
OXGR1     OXGR1   89 -4.02 5.75e-05 0.0325

Shadow analysis

mrshadow <- shadow(mrs, regulators = 25, verbose = FALSE)
summary(mrshadow)
$msviper.results
        Regulon Size   NES  p.value    FDR
EGF         EGF   36 -3.63 2.83e-04 0.0124
NRL         NRL   63 -3.67 2.43e-04 0.0124
STAP1     STAP1   28 -3.70 2.12e-04 0.0124
ASB5       ASB5   30 -3.72 2.02e-04 0.0124
KNG1       KNG1   39 -3.72 1.97e-04 0.0124
TMPRSS2 TMPRSS2   45 -3.79 1.48e-04 0.0124
OXGR1     OXGR1   70 -3.81 1.37e-04 0.0124
GCGR       GCGR   53 -3.87 1.10e-04 0.0124
FOXI1     FOXI1   67 -3.88 1.04e-04 0.0124
PIK3C2G PIK3C2G   29 -3.98 7.02e-05 0.0124

$Shadow.pairs
[1] "OXGR1 -> FGF9"    "OXGR1 -> DMRT2"   "OXGR1 -> NR0B2"   "PIK3C2G -> DMRT2"
[5] "FOXI1 -> KNG1"    "GCGR -> DMRT2"   

Synergy analysis

mrs <- msviperCombinatorial(mrs, verbose = FALSE)
mrs <- msviperSynergy(mrs, verbose = FALSE)
summary(mrs)
                      Regulon Size   NES  p.value      FDR  Synergy
VGLL1--ABCG1     VGLL1--ABCG1   30 12.71 5.42e-37 7.39e-34 4.18e-25
PDLIM1--SRGAP3 PDLIM1--SRGAP3   27 12.46 1.23e-35 8.39e-33 3.49e-07
DMRT2--BMP7       DMRT2--BMP7   30  4.57 4.94e-06 2.24e-03 7.32e-04
PAK6--VGLL1       PAK6--VGLL1   30  4.46 8.31e-06 2.83e-03 2.94e-04
BMP7--VGLL1       BMP7--VGLL1   41  4.32 1.53e-05 3.82e-03 1.87e-06
PRDM16--VGLL1   PRDM16--VGLL1   29  4.28 1.87e-05 3.82e-03 5.95e-04
GPC3--VGLL1       GPC3--VGLL1   25  4.27 1.96e-05 3.82e-03 7.52e-04
ADGRF1--SRGAP3 ADGRF1--SRGAP3   27  4.03 5.65e-05 8.37e-03 4.18e-05
TFAP2B--VGLL1   TFAP2B--VGLL1   39  4.01 6.14e-05 8.37e-03 3.22e-06
OXGR1                   OXGR1   89 -4.02 5.75e-05 8.37e-03       NA

Virtual Inference of Protein-activity by Enriched Regulon analysis (VIPER)

vpres <- viper(dset, regulon, verbose = FALSE)
tmp <- rowTtest(vpres, "description", "tumor", "normal")
data.frame(Gene = rownames(tmp$p.value), t = round(tmp$statistic, 2), "p-value" = signif(tmp$p.value, 3))[order(tmp$p.value)[1:10], ]
           Gene      t   p.value
KNG1       KNG1 -60.76 1.25e-118
FOXI1     FOXI1 -59.71 2.25e-117
DMRT2     DMRT2 -59.57 3.28e-117
TMPRSS2 TMPRSS2 -58.73 3.41e-116
FGF9       FGF9 -58.31 1.12e-115
GCGR       GCGR -57.31 1.91e-114
OXGR1     OXGR1 -57.27 2.12e-114
PIK3C2G PIK3C2G -56.97 5.15e-114
EGF         EGF -56.94 5.62e-114
PAK5       PAK5 -56.59 1.53e-113

sessionInfo()
R version 4.4.0 (2024-04-24)
Platform: aarch64-apple-darwin20
Running under: macOS Sonoma 14.5

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] viper_1.38.0        Biobase_2.64.0      BiocGenerics_0.50.0
[4] workflowr_1.7.1    

loaded via a namespace (and not attached):
 [1] gtable_0.3.5       xfun_0.44          bslib_0.7.0        ggplot2_3.5.1     
 [5] htmlwidgets_1.6.4  processx_3.8.4     lattice_0.22-6     callr_3.7.6       
 [9] vctrs_0.6.5        tools_4.4.0        ps_1.7.6           generics_0.1.3    
[13] parallel_4.4.0     tibble_3.2.1       proxy_0.4-27       fansi_1.0.6       
[17] pkgconfig_2.0.3    Matrix_1.7-0       KernSmooth_2.23-24 data.table_1.15.4 
[21] lifecycle_1.0.4    compiler_4.4.0     stringr_1.5.1      git2r_0.33.0      
[25] mixtools_2.0.0     munsell_0.5.1      getPass_0.2-4      httpuv_1.6.15     
[29] htmltools_0.5.8.1  class_7.3-22       sass_0.4.9         yaml_2.3.8        
[33] lazyeval_0.2.2     plotly_4.10.4      later_1.3.2        pillar_1.9.0      
[37] jquerylib_0.1.4    whisker_0.4.1      tidyr_1.3.1        MASS_7.3-60.2     
[41] cachem_1.1.0       nlme_3.1-164       tidyselect_1.2.1   digest_0.6.35     
[45] stringi_1.8.4      kernlab_0.9-32     dplyr_1.1.4        purrr_1.0.2       
[49] splines_4.4.0      rprojroot_2.0.4    fastmap_1.2.0      grid_4.4.0        
[53] colorspace_2.1-0   cli_3.6.2          magrittr_2.0.3     survival_3.6-4    
[57] utf8_1.2.4         e1071_1.7-14       scales_1.3.0       promises_1.3.0    
[61] segmented_2.1-0    rmarkdown_2.27     httr_1.4.7         evaluate_0.23     
[65] knitr_1.46         viridisLite_0.4.2  rlang_1.1.3        Rcpp_1.0.12       
[69] glue_1.7.0         rstudioapi_0.16.0  jsonlite_1.8.8     R6_2.5.1          
[73] fs_1.6.4