Contents

1 Introduction

The netboost package, implements a three-step dimension reduction technique. First, a boosting-based filter is combined with the topological overlap measure to identify the essential edges of the network. Second, sparse hierarchical clustering is applied on the selected edges to identify modules and finally module information is aggregated by the first principal components. The primary analysis is then carried out on these summary measures instead of the original data.

2 Loading an example dataset

The package comes with an example dataset included. We import the acute myeloid leukemia patient data from The Cancer Genome Atlas public domain database. The dataset consists of one thousand DNA methylation sites and gene expression levels on chromosome 18 for 80 patients.

require("netboost")
## Loading required package: netboost
## 
## netboost 1.2.2 loadedDefault CPU cores: 1
data("tcga_aml_meth_rna_chr18", package = "netboost")
dim(tcga_aml_meth_rna_chr18)
## [1]   80 1000

The netboost() function integrates all major analysis steps and generates multiple plots. In this step we also set analysis parameters:

stepno defines the number of boosting steps taken

soft_power (if null, automatically chosen) the exponent in the transformation of the correlation

min_cluster_size the minimal size of clusters, n_pc the number of maximally computed principal components

scale if data should be scaled and centered prior to analysis

ME_diss_thres defines the merging threshold for identified clusters.

For details on the options please see ?netboost and the corresponding paper Schlosser et al. 2019 (under review).

results <- netboost(datan = tcga_aml_meth_rna_chr18, stepno = 20L, 
soft_power = 3L, min_cluster_size = 10L, n_pc = 2, scale = TRUE, ME_diss_thres = 0.25) 
## idx: 1 (0.1%) - Wed Nov 27 23:36:58 2019

## 
## Netboost extracted 16 modules (including background) with an average size of 28.3333333333333 (excluding background) from Tree 1.
## 
## Netboost detected 15 modules and 1 background modules in 1 trees resulting in 25 aggreagate measures.
## Average size of the modules was 28.3333333333333.
## 575 of 1000 features (57.5%) were not assigned to modules.

For each detected independent tree in the dataset (here one) the first graph shows a dendrogram of initial modules and at which level they are merged, the second graph a module dendrogram after merging and the third the dendrogram of features including the module-color-code.

results contains the dendrograms (dendros), feature identifier (names) matched to module assignment (colors), the aggregated dataset (MEs), the rotation matrix to compute the aggregated dataset (rotation) and the proportion of variance explained by the aggregate measures (var_explained). Dependent on the minimum proportion of variance explained set in the netboost() call (default 0.5) up to n_pc principal components are exported.

names(results)
## [1] "dendros"       "names"         "colors"        "MEs"          
## [5] "rotation"      "var_explained" "filter"
colnames(results$MEs)
##  [1] "ME0_1_pc1" "ME0_1_pc2" "ME4_pc1"   "ME14_pc1"  "ME14_pc2"  "ME6_pc1"  
##  [7] "ME6_pc2"   "ME7_pc1"   "ME11_pc1"  "ME11_pc2"  "ME9_pc1"   "ME9_pc2"  
## [13] "ME8_pc1"   "ME13_pc1"  "ME13_pc2"  "ME2_pc1"   "ME12_pc1"  "ME15_pc1" 
## [19] "ME15_pc2"  "ME1_pc1"   "ME1_pc2"   "ME5_pc1"   "ME10_pc1"  "ME3_pc1"  
## [25] "ME3_pc2"

As you see for most modules the first principal component already explained more than 50% of the variance in the original features of this module. ME0_X_pcY denotes the background module (unclustered features) of the independent tree X.

Explained variance is reported by a matrix for the first n_pc principal components. Here we list the first 5 modules:

results$var_explained[,1:5]
##          ME0_1        ME4      ME14       ME6        ME7
## PC1 0.07681420 0.50125421 0.4419347 0.4777013 0.52079949
## PC2 0.05416773 0.06023611 0.1443083 0.1266931 0.07778952

results$colors use a numeric coding for the modules which matches their module name. To list features of module ME10 we can extract them by:

results$names[results$colors==10]
##  [1] "cg00018044" "cg00081465" "cg00142378" "cg00335802" "cg00602115"
##  [6] "cg00732383" "cg01074921" "cg01875596" "cg02351804" "cg02490253"
## [11] "cg02711020" "cg02976900" "cg03116030" "cg03686067" "cg03778258"

The final dendrogram including all trees can be plotted including labels (results$names) for individual features. colorsrandom controls if module-color matching should be randomized to get a clearly differentiable pattern of the potentially many modules. Labels are only suitable in applications with few features or with a appropriately large pdf device.

set.seed(123)
nb_plot_dendro(nb_summary = results, labels = FALSE, colorsrandom = TRUE)

Next the primary analysis on the aggregated dataset (results$MEs) can be computed. We also implemented a convenience function to transfer a clustering to a new dataset. Here, we transfer the clustering to the same dataset resulting in identical aggregate measures.

    ME_transfer <- nb_transfer(nb_summary = results, 
    new_data = tcga_aml_meth_rna_chr18, scale = TRUE)
    all(round(results$MEs, 12) == round(ME_transfer, 12))
## [1] TRUE

3 Session Info

sessionInfo()
## R version 3.6.1 (2019-07-05)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.10-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.10-bioc/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C              
##  [3] LC_TIME=en_US.UTF-8        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] netboost_1.2.2   BiocStyle_2.14.0
## 
## loaded via a namespace (and not attached):
##  [1] matrixStats_0.55.0    robust_0.4-18.1       fit.models_0.5-14    
##  [4] bit64_0.9-7           doParallel_1.0.15     RColorBrewer_1.1-2   
##  [7] dynamicTreeCut_1.63-1 tools_3.6.1           backports_1.1.5      
## [10] R6_2.4.1              rpart_4.1-15          Hmisc_4.3-0          
## [13] DBI_1.0.0             lazyeval_0.2.2        BiocGenerics_0.32.0  
## [16] colorspace_1.4-1      nnet_7.3-12           tidyselect_0.2.5     
## [19] gridExtra_2.3         bit_1.1-14            compiler_3.6.1       
## [22] preprocessCore_1.48.0 WGCNA_1.68            Biobase_2.46.0       
## [25] htmlTable_1.13.2      bookdown_0.16         scales_1.1.0         
## [28] checkmate_1.9.4       DEoptimR_1.0-8        mvtnorm_1.0-11       
## [31] robustbase_0.93-5     stringr_1.4.0         digest_0.6.23        
## [34] foreign_0.8-72        rmarkdown_1.18        R.utils_2.9.0        
## [37] rrcov_1.4-9           base64enc_0.1-3       pkgconfig_2.0.3      
## [40] htmltools_0.4.0       htmlwidgets_1.5.1     rlang_0.4.2          
## [43] rstudioapi_0.10       RSQLite_2.1.2         impute_1.60.0        
## [46] acepack_1.4.1         dplyr_0.8.3           R.oo_1.23.0          
## [49] magrittr_1.5          GO.db_3.10.0          Formula_1.2-3        
## [52] Matrix_1.2-18         Rcpp_1.0.3            munsell_0.5.0        
## [55] S4Vectors_0.24.0      lifecycle_0.1.0       R.methodsS3_1.7.1    
## [58] stringi_1.4.3         yaml_2.2.0            MASS_7.3-51.4        
## [61] grid_3.6.1            blob_1.2.0            parallel_3.6.1       
## [64] crayon_1.3.4          lattice_0.20-38       splines_3.6.1        
## [67] zeallot_0.1.0         knitr_1.26            pillar_1.4.2         
## [70] fastcluster_1.1.25    codetools_0.2-16      stats4_3.6.1         
## [73] glue_1.3.1            evaluate_0.14         latticeExtra_0.6-28  
## [76] data.table_1.12.6     BiocManager_1.30.10   RcppParallel_4.4.4   
## [79] vctrs_0.2.0           foreach_1.4.7         gtable_0.3.0         
## [82] purrr_0.3.3           assertthat_0.2.1      ggplot2_3.2.1        
## [85] xfun_0.11             survival_3.1-7        pcaPP_1.9-73         
## [88] tibble_2.1.3          iterators_1.0.12      AnnotationDbi_1.48.0 
## [91] memoise_1.1.0         IRanges_2.20.1        cluster_2.1.0
warnings()