Contents

0.1 Introduction

The adaptest R package can be used to perform data-mining and high-dimensional statistical tests that is common in differential expression studies. The package utilizes a two-stage procedure:

  1. The data-mining stage: reduce the dimension of biomarkers based on the associations of biomarkers with an exposure variable.

  2. The multiple testing stage: adjust for multiple testing to control false positives.

In this vignette, we illustrate how to use adaptest to perform such analysis, using a data set containing microarray expression measures.


0.2 Data-mining stage

First, we load the adaptest package and the (included) simpleArray data set:

library(adaptest)
data(simpleArray)
set.seed(1234)
Y <- simulated_array
A <- simulated_treatment

In order to construct targeted minimum loss-based estimates for the purpose of hypothesis testing with data-adaptive parameters, we need three separate data structures:

  1. W, baseline covariates that could potentially confound the association of biomarkers with the exposure of interest;
  2. A, the point exposure of interest; and
  3. Y, the biomarkers of interest.

All values in A ought to be binarized, in order to avoid practical violations of the assumption of positivity. To invoke the data-adaptive testing function (adaptest), we also need to specify the number of top biomarkers n_top to the data-mining algorithm, and the number of folds n_fold for cross- validation. The smaller n_top is, the more selective data-mining algorithm we have. The larger n_fold is, more folds are carried our in cross-validation.

The TMLE-based biomarker discovery process can be invoked using the adaptest function. The procedure is quite resource-intensive because it evaluates the association of each individual potential biomarker (of which there are \(1000\) in the included data set) with an exposure of interest, while accounting for potential confounding based on all other covariates included in the design matrix. We demonstrate the necessary syntax for calling adaptest below:

adaptest_out <- adaptest(Y = Y,
                         A = A,
                         W = NULL,
                         n_top = 35,
                         n_fold = 5,
                         learning_library = c("SL.glm", "SL.mean"),
                         parameter_wrapper = adaptest::rank_DE,
                         absolute = FALSE,
                         negative = FALSE)

The output of adaptest is an object of class data_adapt, containing the following major components:

  1. top_index: (integer vector) - indices for the biomarkers selected by way of data-mining.
  2. top_colname: (character vector) - names for the biomarkers selected by way of data-mining.
  3. top_colname_significant_q: (character vector) - names for the biomarkers selected by way of data-mining, which are significant after multiple testing stage.
  4. DE: (numeric vector) - differential expression effect sizes for the biomarkers in top_colname.
  5. p_value: (numeric vector) - p-values for the biomarkers in top_colname.
  6. q_value: (numeric vector) - q-values for the biomarkers in top_colname.
  7. significant_q: (integer vector) - indices of top_colname which is significant after multiple testing stage.
  8. mean_rank_top: (numeric vector) - average ranking across cross-validation folds for the biomarkers in top_colname.
  9. folds: (origami::folds class) - object of cross-validation folds.

After invoking adaptest, the resultant data_adapt object will have the slots described above completely populated. Note that simply calling objects() on an object of class data_adapt will return more slots than those described above – many of these are auxiliary slots containing information that is likely not of interest to the user. The \(9\) slots given above contain information that summarizes the findings of the data-adaptive hypothesis testing procedure. What’s more, even individually accessing these slots is inconvenient; thus, we provide a summary method to allow the statistical results of this procedure to be extracted easily. We demonstrate this below

summary(adaptest_out)
##    data-adaptive parameters Differential expression     p-values     q-values
## 1                         1              0.30095412 1.698597e-01 0.5285153664
## 2                         2              0.79480282 2.164880e-05 0.0003788539
## 3                         3              0.75370203 4.570491e-05 0.0005332239
## 4                         4              0.71811321 3.698357e-06 0.0001294425
## 5                         5              0.60633888 1.910868e-03 0.0167200936
## 6                         6              0.46755453 4.905026e-02 0.2861265285
## 7                         7              0.39585960 6.013769e-02 0.3006884373
## 8                         8              0.01016062 9.548336e-01 0.9548336165
## 9                         9              0.04462946 8.259302e-01 0.9548336165
## 10                       10              0.39796908 4.432317e-02 0.2861265285
## 11                       11             -0.02293014 8.948128e-01 0.9548336165
## 12                       12             -0.02400625 8.965461e-01 0.9548336165
## 13                       13              0.28379502 1.821221e-01 0.5285153664
## 14                       14             -0.03402457 8.711631e-01 0.9548336165
## 15                       15             -0.14764497 4.899710e-01 0.9396852861
## 16                       16              0.07573014 7.042931e-01 0.9548336165
## 17                       17             -0.03952019 8.514708e-01 0.9548336165
## 18                       18              0.04626276 8.236991e-01 0.9548336165
## 19                       19              0.02406428 9.134305e-01 0.9548336165
## 20                       20             -0.15571779 4.616044e-01 0.9396852861
## 21                       21              0.20334982 3.052298e-01 0.7122027975
## 22                       22              0.10925004 5.606748e-01 0.9396852861
## 23                       23              0.17976673 3.392108e-01 0.7420236149
## 24                       24              0.08361788 7.031373e-01 0.9548336165
## 25                       25              0.22663443 2.950351e-01 0.7122027975
## 26                       26             -0.13179812 5.263012e-01 0.9396852861
## 27                       27             -0.29503737 1.413545e-01 0.4947407814
## 28                       28              0.10706311 6.017082e-01 0.9548336165
## 29                       29              0.12005095 5.638112e-01 0.9396852861
## 30                       30              0.01729982 9.301742e-01 0.9548336165
## 31                       31              0.05117472 7.966440e-01 0.9548336165
## 32                       32             -0.30202789 1.314301e-01 0.4947407814
## 33                       33              0.09001974 6.580344e-01 0.9548336165
## 34                       34              0.31058958 8.461317e-02 0.3701826187
## 35                       35              0.24464223 1.963057e-01 0.5285153664

In the table above, each column provides information about the results of the data-adaptive hypothesis testing procedure. In particular, columns 2-4 provide effect sizes, p-values, and q-values (after multiple testing correction) that may be of interest in scientifically interpreting the findings of the procedure.

As our goal in this vignette is to describe the properties of the adaptest software package and its operation, we omit a discussion of the statistical methodology implemented in this R package. A fully detailed technical account of the data-adaptive multiple testing procedure is available in Cai, Hejazi, and Hubbard, presently available on the arxiv. For an introduction to statistical inference procedures using data-adaptive target parameters, the interested reader is directed to Hubbard, Kherad-Pajouh, and van der Laan (2016). For background on the Targeted Learning methodology, as well as recent advances, the canonical references are van der Laan and Rose (2011) and van der Laan and Rose (2018).


0.3 Interpret and Visualize Results

This package provides several interpretation methods that can be used to tabular and visualize the results of the data-adaptive tests.

The get_composition method for a adaptest object will produce a table of composition of each data-adaptive parameters that is significant after multiple testing stage:

get_composition(object = adaptest_out, type = "small")
## [[1]]
##     4   5  10   1   3   6 649 434 936
## 2 0.2 0.4 0.4 0.0 0.0 0.0 0.0 0.0 0.0
## 3 0.0 0.2 0.2 0.2 0.2 0.2 0.0 0.0 0.0
## 4 0.2 0.0 0.2 0.0 0.2 0.2 0.2 0.0 0.0
## 5 0.2 0.0 0.0 0.0 0.2 0.2 0.0 0.2 0.2
## 
## [[2]]
##     4   5  10   1   3   6 649 434 936     q-values
## 2 0.2 0.4 0.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0003788539
## 3 0.0 0.2 0.2 0.2 0.2 0.2 0.0 0.0 0.0 0.0005332239
## 4 0.2 0.0 0.2 0.0 0.2 0.2 0.2 0.0 0.0 0.0001294425
## 5 0.2 0.0 0.0 0.0 0.2 0.2 0.0 0.2 0.2 0.0167200936

Setting the argument type = "big" will instead produce a table of composition of each data-adaptive parameters before multiple testing stage, so that there are more columns. We omit running the code below since the output is large.

# NOT RUN
get_composition(object = adaptest_out, type = "big")

The plot method for a adaptest object will produce two plots that help user interpret the results. The first plot is a plot of sorted average CV-rank for all the biomarkers in the original data set (Y). The second plot is a plot of sorted q-values with labels corresponding to the indices of the data-adaptive parameter (as returned in get_composition)

plot(adaptest_out)


0.4 Bioconductor Integration with SummarizedExperiment

Now, let’s try to acquire a taste for how we would use these algorithmic tools with objects common in computational biology – we’ll do this by performing the same analysis we did above, but using the core SummarizedExperiment container object and the popular airway data set as an example.

To start, let’s load the required packages:

library(SummarizedExperiment)
library(airway)
data(airway)

For simplicity, we’ll restrict ourselves to just a random subset of the genes or transcripts available from the airway data set.

genes_sub <- order(sample(seq_len(1000)))
air_reduced <- airway[genes_sub, ]

Generally, finding data-adaptive target parameters is a computationally and data-intensive procedure, requiring a fairly large sample size. To work with the relatively small airway data set, we’ll simply augment the data by artificially doubling it in size in a naive manner:

simple_air <- cbind(air_reduced, air_reduced)

We’ll now extract the variable of interest – a factor label for whether the unit received treatment or not – and coerce it to a binary numeric vector:

# use a binary treatment variable (must be 0/1 only)
dex_var = as.numeric(as.matrix(colData(simple_air))[, 3] - 1)

Now, we can perform the same data-adaptive analysis we discussed above on this simplified version of the airway data set, simply by calling the bioadaptest wrapper function:

airway_out <- bioadaptest(data_in = simple_air,
                          var_int = dex_var,
                          cntrl_set = NULL,
                          n_top = 5,
                          n_fold = 2,
                          parameter_wrapper = rank_DE)

0.5 Session Information

## R Under development (unstable) (2019-12-14 r77569)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Ubuntu 18.04.3 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] parallel  stats4    stats     graphics  grDevices utils     datasets 
## [8] methods   base     
## 
## other attached packages:
##  [1] airway_1.7.0                SummarizedExperiment_1.17.1
##  [3] DelayedArray_0.13.1         BiocParallel_1.21.2        
##  [5] matrixStats_0.55.0          Biobase_2.47.2             
##  [7] GenomicRanges_1.39.1        GenomeInfoDb_1.23.1        
##  [9] IRanges_2.21.2              S4Vectors_0.25.8           
## [11] BiocGenerics_0.33.0         nnls_1.4                   
## [13] adaptest_1.7.1              BiocStyle_2.15.3           
## 
## loaded via a namespace (and not attached):
##  [1] Rcpp_1.0.3             compiler_4.0.0         BiocManager_1.30.10   
##  [4] XVector_0.27.0         iterators_1.0.12       bitops_1.0-6          
##  [7] tools_4.0.0            zlibbioc_1.33.0        digest_0.6.23         
## [10] tmle_1.4.0.1           evaluate_0.14          lattice_0.20-38       
## [13] rlang_0.4.2            foreach_1.4.7          Matrix_1.2-18         
## [16] origami_1.0.1          yaml_2.2.0             xfun_0.11             
## [19] GenomeInfoDbData_1.2.2 SuperLearner_2.0-26    stringr_1.4.0         
## [22] knitr_1.26             globals_0.12.5         glmnet_3.0-2          
## [25] grid_4.0.0             data.table_1.12.8      calibrate_1.7.5       
## [28] listenv_0.8.0          future.apply_1.3.0     rmarkdown_2.0         
## [31] bookdown_0.16          magrittr_1.5           codetools_0.2-16      
## [34] htmltools_0.4.0        MASS_7.3-51.5          abind_1.4-5           
## [37] shape_1.4.4            future_1.15.1          stringi_1.4.3         
## [40] RCurl_1.95-4.12

References

Cai, Weixin, Nima S Hejazi, and Alan E Hubbard. “Data-Adaptive Statistics for Multiple Hypothesis Testing in High-Dimensional Settings.” https://arxiv.org/abs/1704.07008.

Hubbard, Alan E, Sara Kherad-Pajouh, and Mark J van der Laan. 2016. “Statistical Inference for Data Adaptive Target Parameters.” The International Journal of Biostatistics 12 (1):3–19.

van der Laan, Mark J, and Sherri Rose. 2011. Targeted Learning: Causal Inference for Observational and Experimental Data. Springer Science & Business Media.

———. 2018. Targeted Learning in Data Science: Causal Inference for Complex Longitudinal Studies. Springer Science & Business Media.