EnMCB

Xin Yu

2020-09-21

Introduction

This package is designed to help you to create the methylation correlated blocks using methylation profiles. A stacked ensemble of machine learning models, which combined the Cox regression, support vector regression and elastic-net regression model, can be constructed using this package1. You also can choose one of them to build DNA methylation signatures associated with disease progression.

Note: This package is still under developing. Some of the functions may change.

Followings are brief insturctions for using this package:

You can install and test our package by downloading source package.

Installation

#if(!requireNamespace("BiocManager", quietly = TRUE))
#    install.packages("BiocManager")
# BiocManager::install("EnMCB")

Useage

First, you need a methylation data set, currently only most common platform ‘Illumina Infinium Human Methylation 450K’ is supported.

You can use your own datasets,or use our demo data.

You can automatically run following:

library(EnMCB)

methylation_dataset<-create_demo()

res<-IdentifyMCB(methylation_dataset)

IdentfyMCB() function will calculated Pearson correlation coefficients between the any two CpGs. A value of Pearson correlation coefficients which under the threshold was used to identify boundaries between any two adjacent markers indicating uncorrelated methylation. Markers not separated by a boundary were combined into the MCB.You can extract the MCB information,

MCB<-res$MCBinformation

and select some of MCBs for further modeling.

MCB<-MCB[MCB[,"CpGs_num"]>2,]

In order to build models, one may run following:

# sample the dataset into training set and testing set
trainingset<-colnames(methylation_dataset) %in% sample(colnames(methylation_dataset),0.6*length(colnames(methylation_dataset)))

testingset<-!trainingset

#build the models
library(survival)
data(demo_survival_data)

models<-metricMCB(MCB,
                    training_set = methylation_dataset[,trainingset],
                    Surv = demo_survival_data[trainingset],
                    Method = "cox")

#select the best
onemodel<-models$best_cox_model[[2]]

Then, you can predict the risk by the model you build:

prediction_results<-predict(onemodel,
                            as.data.frame(t(methylation_dataset[,testingset]))
                            )

In order to build ensemble model, one may run following function ensemble_model():

# You can choose one of MCBs:
select_single_one=1

em<-ensemble_model(t(MCB[select_single_one,]),
                    training_set=methylation_dataset[,trainingset],
                    Surv_training=demo_survival_data[trainingset])

Note that this function only can be used for single MCB only, otherwise the precessing time could be very long.

Then, you can predict the risk by the model you build by function ensemble_prediction() :

em_prediction_results<-ensemble_prediction(ensemble_model = em,
                    predition_data = methylation_dataset[,testingset])

This function will return the single vector with risk scores predicted by ensemble model.

For detailed information, you can find at our references.

Session Info

sessionInfo()
## R version 4.0.2 (2020-06-22)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.4 LTS
## 
## Matrix products: default
## BLAS:   /home/biocbuild/bbs-3.11-bioc/R/lib/libRblas.so
## LAPACK: /home/biocbuild/bbs-3.11-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] stats4    parallel  stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] survival_3.2-3                                    
##  [2] IlluminaHumanMethylation450kanno.ilmn12.hg19_0.6.0
##  [3] minfi_1.34.0                                      
##  [4] bumphunter_1.30.0                                 
##  [5] locfit_1.5-9.4                                    
##  [6] iterators_1.0.12                                  
##  [7] foreach_1.5.0                                     
##  [8] Biostrings_2.56.0                                 
##  [9] XVector_0.28.0                                    
## [10] SummarizedExperiment_1.18.2                       
## [11] DelayedArray_0.14.1                               
## [12] matrixStats_0.56.0                                
## [13] Biobase_2.48.0                                    
## [14] GenomicRanges_1.40.0                              
## [15] GenomeInfoDb_1.24.2                               
## [16] IRanges_2.22.2                                    
## [17] S4Vectors_0.26.1                                  
## [18] BiocGenerics_0.34.0                               
## [19] EnMCB_1.0.11                                      
## 
## loaded via a namespace (and not attached):
##   [1] colorspace_1.4-1          ellipsis_0.3.1           
##   [3] siggenes_1.62.0           mclust_5.4.6             
##   [5] base64_2.0                bit64_4.0.5              
##   [7] AnnotationDbi_1.50.3      xml2_1.3.2               
##   [9] codetools_0.2-16          splines_4.0.2            
##  [11] doParallel_1.0.15         scrime_1.3.5             
##  [13] knitr_1.29                Rsamtools_2.4.0          
##  [15] annotate_1.66.0           dbplyr_1.4.4             
##  [17] HDF5Array_1.16.1          readr_1.3.1              
##  [19] compiler_4.0.2            httr_1.4.2               
##  [21] assertthat_0.2.1          Matrix_1.2-18            
##  [23] limma_3.44.3              htmltools_0.5.0          
##  [25] prettyunits_1.1.1         tools_4.0.2              
##  [27] gtable_0.3.0              glue_1.4.2               
##  [29] GenomeInfoDbData_1.2.3    dplyr_1.0.2              
##  [31] rappdirs_0.3.1            doRNG_1.8.2              
##  [33] Rcpp_1.0.5                vctrs_0.3.4              
##  [35] multtest_2.44.0           preprocessCore_1.50.0    
##  [37] nlme_3.1-149              rtracklayer_1.48.0       
##  [39] DelayedMatrixStats_1.10.1 xfun_0.17                
##  [41] stringr_1.4.0             lifecycle_0.2.0          
##  [43] rngtools_1.5              XML_3.99-0.5             
##  [45] beanplot_1.2              zlibbioc_1.34.0          
##  [47] MASS_7.3-53               scales_1.1.1             
##  [49] hms_0.5.3                 rhdf5_2.32.2             
##  [51] GEOquery_2.56.0           RColorBrewer_1.1-2       
##  [53] yaml_2.2.1                curl_4.3                 
##  [55] memoise_1.1.0             ggplot2_3.3.2            
##  [57] biomaRt_2.44.1            reshape_0.8.8            
##  [59] stringi_1.5.3             RSQLite_2.2.0            
##  [61] genefilter_1.70.0         GenomicFeatures_1.40.1   
##  [63] BiocParallel_1.22.0       shape_1.4.5              
##  [65] rlang_0.4.7               pkgconfig_2.0.3          
##  [67] bitops_1.0-6              nor1mix_1.3-0            
##  [69] pracma_2.2.9              evaluate_0.14            
##  [71] lattice_0.20-41           purrr_0.3.4              
##  [73] Rhdf5lib_1.10.1           survivalROC_1.0.3        
##  [75] GenomicAlignments_1.24.0  bit_4.0.4                
##  [77] tidyselect_1.1.0          plyr_1.8.6               
##  [79] magrittr_1.5              R6_2.4.1                 
##  [81] generics_0.0.2            DBI_1.1.0                
##  [83] pillar_1.4.6              RCurl_1.98-1.2           
##  [85] tibble_3.0.3              crayon_1.3.4             
##  [87] BiocFileCache_1.12.1      rmarkdown_2.3            
##  [89] progress_1.2.2            grid_4.0.2               
##  [91] data.table_1.13.0         blob_1.2.1               
##  [93] digest_0.6.25             xtable_1.8-4             
##  [95] tidyr_1.1.2               illuminaio_0.30.0        
##  [97] glmnet_4.0-2              munsell_0.5.0            
##  [99] openssl_1.4.3             survivalsvm_0.0.5        
## [101] askpass_1.1               quadprog_1.5-8

References


  1. Xin Yu et al. 2019 Predicting disease progression in lung adenocarcinoma patients based on methylation correlated blocks using ensemble machine learning classifiers (under review)