This page was generated on 2021-05-06 12:34:15 -0400 (Thu, 06 May 2021).
##############################################################################
##############################################################################
###
### Running command:
###
### /Library/Frameworks/R.framework/Versions/Current/Resources/bin/R CMD check --install=check:adaptest.install-out.txt --library=/Library/Frameworks/R.framework/Versions/Current/Resources/library --no-vignettes --timings adaptest_1.10.0.tar.gz
###
##############################################################################
##############################################################################
* using log directory ‘/Users/biocbuild/bbs-3.12-bioc/meat/adaptest.Rcheck’
* using R version 4.0.5 (2021-03-31)
* using platform: x86_64-apple-darwin17.0 (64-bit)
* using session charset: UTF-8
* using option ‘--no-vignettes’
* checking for file ‘adaptest/DESCRIPTION’ ... OK
* this is package ‘adaptest’ version ‘1.10.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... OK
* checking for portable file names ... OK
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘adaptest’ can be installed ... WARNING
Found the following significant warnings:
Warning: Package 'adaptest' is deprecated and will be removed from Bioconductor
See ‘/Users/biocbuild/bbs-3.12-bioc/meat/adaptest.Rcheck/00install.out’ for details.
* checking installed package size ... OK
* checking package directory ... OK
* checking ‘build’ directory ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking for left-over files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the package can be unloaded cleanly ... OK
* checking whether the namespace can be loaded with stated dependencies ... OK
* checking whether the namespace can be unloaded cleanly ... OK
* checking dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking contents of ‘data’ directory ... OK
* checking data for non-ASCII characters ... OK
* checking data for ASCII and uncompressed saves ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... ERROR
Running examples in ‘adaptest-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: adaptest
> ### Title: Data-adaptive Statistics for High-Dimensional Multiple Testing
> ### Aliases: adaptest
>
> ### ** Examples
>
> set.seed(1234)
> data(simpleArray)
> simulated_array <- simulated_array
> simulated_treatment <- simulated_treatment
>
> adaptest(Y = simulated_array,
+ A = simulated_treatment,
+ W = NULL,
+ n_top = 5,
+ n_fold = 3,
+ learning_library = 'SL.glm',
+ parameter_wrapper = adaptest::rank_DE,
+ absolute = FALSE,
+ negative = FALSE)
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
adaptest
--- call from context ---
adaptest(Y = simulated_array, A = simulated_treatment, W = NULL,
n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE,
absolute = FALSE, negative = FALSE)
--- call from argument ---
if (class(Y) == "adapTMLE") {
Y_in <- as.matrix(t(SummarizedExperiment::assay(Y)))
rownames(Y_in) <- colnames(Y_in) <- NULL
} else {
Y_in <- as.matrix(Y)
}
--- R stacktrace ---
where 1: adaptest(Y = simulated_array, A = simulated_treatment, W = NULL,
n_top = 5, n_fold = 3, learning_library = "SL.glm", parameter_wrapper = adaptest::rank_DE,
absolute = FALSE, negative = FALSE)
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE,
learning_library = c("SL.glm", "SL.step", "SL.glm.interaction",
"SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE,
p_cutoff = 0.05, q_cutoff = 0.05)
{
if (class(Y) == "adapTMLE") {
Y_in <- as.matrix(t(SummarizedExperiment::assay(Y)))
rownames(Y_in) <- colnames(Y_in) <- NULL
}
else {
Y_in <- as.matrix(Y)
}
data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top,
n_fold = n_fold, absolute = absolute, negative = negative,
parameter_wrapper = parameter_wrapper, learning_library = learning_library)
n_sim <- nrow(data_adapt$Y)
p_all <- ncol(data_adapt$Y)
if (is.null(data_adapt$W)) {
W <- as.matrix(rep(1, n_sim))
data_adapt$W <- W
}
sample_each_fold <- ceiling(n_sim/n_fold)
index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold),
n = n_sim))
table_n_per_fold <- table(index_for_folds)
rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all)
adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top)
folds <- origami::make_folds(n = n_sim, V = n_fold)
df_all <- data.frame(Y = Y_in, A = A, W = W)
Y_name <- grep("Y", colnames(df_all))
A_name <- grep("A", colnames(df_all))
W_name <- grep("W", colnames(df_all))
cv_results <- origami::cross_validate(cv_fun = cv_param_est,
folds = folds, data = df_all, parameter_wrapper = parameter_wrapper,
absolute = absolute, negative = negative, n_top = n_top,
learning_library = learning_library, Y_name = Y_name,
A_name = A_name, W_name = W_name)
rank_in_folds <- matrix(data = cv_results$data_adaptive_index,
nrow = n_fold, ncol = p_all, byrow = TRUE)
adapt_param_composition <- matrix(data = cv_results$index_grid,
nrow = n_fold, ncol = n_top, byrow = TRUE)
psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold,
ncol = n_top, byrow = TRUE)
EIC_est_final <- cv_results$EIC_est
Psi_output <- colMeans(psi_est_final)
inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff)
p_value <- inference_out[[1]]
upper <- inference_out[[2]]
lower <- inference_out[[3]]
sd_by_col <- inference_out[[4]]
adaptY_composition <- adapt_param_composition[, seq_len(n_top)]
if (class(adaptY_composition) == "integer") {
adaptY_composition <- matrix(adaptY_composition, ncol = 1)
adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition)))
}
else {
ls <- vector("list", ncol(adaptY_composition))
for (i in seq_len(ncol(adaptY_composition))) {
x <- adaptY_composition[, i]
ls[[i]] <- table(x)/sum(table(x))
}
adaptY_composition <- ls
}
q_value <- stats::p.adjust(p_value, method = "BH")
is_sig_q_value <- q_value <= q_cutoff
significant_q <- which(is_sig_q_value)
top_colname <- adaptY_composition
top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)]
mean_rank <- colMeans(rank_in_folds)
top_index <- sort(as.numeric(unique(unlist(lapply(top_colname,
names)))))
mean_rank_top <- mean_rank[top_index]
top_index <- top_index[order(mean_rank_top)]
mean_rank_top <- mean_rank[top_index]
not_top_index <- setdiff(seq_len(p_all), top_index)
mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) +
0
prob_in_top <- colMeans(mean_rank_in_top)
prob_in_top <- prob_in_top[top_index]
data_adapt$top_index <- top_index
data_adapt$top_colname <- top_colname
data_adapt$top_colname_significant_q <- top_colname_significant_q
data_adapt$DE <- Psi_output
data_adapt$p_value <- p_value
data_adapt$q_value <- q_value
data_adapt$significant_q <- significant_q
data_adapt$mean_rank_top <- mean_rank_top
data_adapt$prob_in_top <- prob_in_top
data_adapt$folds <- folds
return(data_adapt)
}
<bytecode: 0x7f91f11beb00>
<environment: namespace:adaptest>
--- function search by body ---
Function adaptest in namespace adaptest has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
Running ‘testthat.R’
ERROR
Running the tests in ‘tests/testthat.R’ failed.
Last 13 lines of output:
data_adapt$DE <- Psi_output
data_adapt$p_value <- p_value
data_adapt$q_value <- q_value
data_adapt$significant_q <- significant_q
data_adapt$mean_rank_top <- mean_rank_top
data_adapt$prob_in_top <- prob_in_top
data_adapt$folds <- folds
return(data_adapt)
}
<bytecode: 0x7f85f7b359b8>
<environment: namespace:adaptest>
--- function search by body ---
Function adaptest in namespace adaptest has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes in ‘inst/doc’ ... OK
* checking running R code from vignettes ... SKIPPED
* checking re-building of vignette outputs ... SKIPPED
* checking PDF version of manual ... OK
* DONE
Status: 2 ERRORs, 1 WARNING
See
‘/Users/biocbuild/bbs-3.12-bioc/meat/adaptest.Rcheck/00check.log’
for details.
R version 4.0.5 (2021-03-31) -- "Shake and Throw"
Copyright (C) 2021 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(testthat)
> library(adaptest)
Warning message:
Package 'adaptest' is deprecated and will be removed from Bioconductor
version 3.13
>
> Sys.setenv(R_TESTS = "")
> test_check("adaptest")
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
adaptest
--- call from context ---
adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4,
learning_library = c("SL.mean", "SL.glm", "SL.step"))
--- call from argument ---
if (class(Y) == "adapTMLE") {
Y_in <- as.matrix(t(SummarizedExperiment::assay(Y)))
rownames(Y_in) <- colnames(Y_in) <- NULL
} else {
Y_in <- as.matrix(Y)
}
--- R stacktrace ---
where 1: adaptest(Y = Y, A = A.sample.vec, n_top = p.true + 5, n_fold = 4,
learning_library = c("SL.mean", "SL.glm", "SL.step"))
where 2 at test-cv_origami.R#65: system.time(result_seq <- adaptest(Y = Y, A = A.sample.vec, n_top = p.true +
5, n_fold = 4, learning_library = c("SL.mean", "SL.glm",
"SL.step")))
where 3: eval(code, test_env)
where 4: eval(code, test_env)
where 5: withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error)
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
where 9: doTryCatch(return(expr), name, parentenv, handler)
where 10: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),
names[nh], parentenv, handlers[[nh]])
where 11: tryCatchList(expr, classes, parentenv, handlers)
where 12: tryCatch(withCallingHandlers({
eval(code, test_env)
if (!handled && !is.null(test)) {
skip_empty()
}
}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,
message = handle_message, error = handle_error), error = handle_fatal,
skip = function(e) {
})
where 13: test_code(NULL, exprs, env)
where 14: source_file(path, child_env(env), wrap = wrap)
where 15: FUN(X[[i]], ...)
where 16: lapply(test_paths, test_one_file, env = env, wrap = wrap)
where 17: force(code)
where 18: doWithOneRestart(return(expr), restart)
where 19: withOneRestart(expr, restarts[[1L]])
where 20: withRestarts(testthat_abort_reporter = function() NULL, force(code))
where 21: with_reporter(reporters$multi, lapply(test_paths, test_one_file,
env = env, wrap = wrap))
where 22: test_files(test_dir = test_dir, test_package = test_package,
test_paths = test_paths, load_helpers = load_helpers, reporter = reporter,
env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
wrap = wrap, load_package = load_package)
where 23: test_files(test_dir = path, test_paths = test_paths, test_package = package,
reporter = reporter, load_helpers = load_helpers, env = env,
stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,
wrap = wrap, load_package = load_package, parallel = parallel)
where 24: test_dir("testthat", package = package, reporter = reporter,
..., load_package = "installed")
where 25: test_check("adaptest")
--- value of length: 2 type: logical ---
[1] FALSE FALSE
--- function from context ---
function (Y, A, W = NULL, n_top, n_fold, parameter_wrapper = rank_DE,
learning_library = c("SL.glm", "SL.step", "SL.glm.interaction",
"SL.gam", "SL.earth"), absolute = FALSE, negative = FALSE,
p_cutoff = 0.05, q_cutoff = 0.05)
{
if (class(Y) == "adapTMLE") {
Y_in <- as.matrix(t(SummarizedExperiment::assay(Y)))
rownames(Y_in) <- colnames(Y_in) <- NULL
}
else {
Y_in <- as.matrix(Y)
}
data_adapt <- data_adapt(Y = Y_in, A = A, W = W, n_top = n_top,
n_fold = n_fold, absolute = absolute, negative = negative,
parameter_wrapper = parameter_wrapper, learning_library = learning_library)
n_sim <- nrow(data_adapt$Y)
p_all <- ncol(data_adapt$Y)
if (is.null(data_adapt$W)) {
W <- as.matrix(rep(1, n_sim))
data_adapt$W <- W
}
sample_each_fold <- ceiling(n_sim/n_fold)
index_for_folds <- sample(head(rep(seq_len(n_fold), each = sample_each_fold),
n = n_sim))
table_n_per_fold <- table(index_for_folds)
rank_in_folds <- matrix(0, nrow = n_fold, ncol = p_all)
adapt_param_composition <- matrix(0, nrow = n_fold, ncol = n_top)
folds <- origami::make_folds(n = n_sim, V = n_fold)
df_all <- data.frame(Y = Y_in, A = A, W = W)
Y_name <- grep("Y", colnames(df_all))
A_name <- grep("A", colnames(df_all))
W_name <- grep("W", colnames(df_all))
cv_results <- origami::cross_validate(cv_fun = cv_param_est,
folds = folds, data = df_all, parameter_wrapper = parameter_wrapper,
absolute = absolute, negative = negative, n_top = n_top,
learning_library = learning_library, Y_name = Y_name,
A_name = A_name, W_name = W_name)
rank_in_folds <- matrix(data = cv_results$data_adaptive_index,
nrow = n_fold, ncol = p_all, byrow = TRUE)
adapt_param_composition <- matrix(data = cv_results$index_grid,
nrow = n_fold, ncol = n_top, byrow = TRUE)
psi_est_final <- matrix(data = cv_results$psi_est, nrow = n_fold,
ncol = n_top, byrow = TRUE)
EIC_est_final <- cv_results$EIC_est
Psi_output <- colMeans(psi_est_final)
inference_out <- get_pval(Psi_output, EIC_est_final, alpha = p_cutoff)
p_value <- inference_out[[1]]
upper <- inference_out[[2]]
lower <- inference_out[[3]]
sd_by_col <- inference_out[[4]]
adaptY_composition <- adapt_param_composition[, seq_len(n_top)]
if (class(adaptY_composition) == "integer") {
adaptY_composition <- matrix(adaptY_composition, ncol = 1)
adaptY_composition <- list(table(adaptY_composition)/sum(table(adaptY_composition)))
}
else {
ls <- vector("list", ncol(adaptY_composition))
for (i in seq_len(ncol(adaptY_composition))) {
x <- adaptY_composition[, i]
ls[[i]] <- table(x)/sum(table(x))
}
adaptY_composition <- ls
}
q_value <- stats::p.adjust(p_value, method = "BH")
is_sig_q_value <- q_value <= q_cutoff
significant_q <- which(is_sig_q_value)
top_colname <- adaptY_composition
top_colname_significant_q <- adaptY_composition[which(is_sig_q_value)]
mean_rank <- colMeans(rank_in_folds)
top_index <- sort(as.numeric(unique(unlist(lapply(top_colname,
names)))))
mean_rank_top <- mean_rank[top_index]
top_index <- top_index[order(mean_rank_top)]
mean_rank_top <- mean_rank[top_index]
not_top_index <- setdiff(seq_len(p_all), top_index)
mean_rank_in_top <- (rank_in_folds <= data_adapt$n_top) +
0
prob_in_top <- colMeans(mean_rank_in_top)
prob_in_top <- prob_in_top[top_index]
data_adapt$top_index <- top_index
data_adapt$top_colname <- top_colname
data_adapt$top_colname_significant_q <- top_colname_significant_q
data_adapt$DE <- Psi_output
data_adapt$p_value <- p_value
data_adapt$q_value <- q_value
data_adapt$significant_q <- significant_q
data_adapt$mean_rank_top <- mean_rank_top
data_adapt$prob_in_top <- prob_in_top
data_adapt$folds <- folds
return(data_adapt)
}
<bytecode: 0x7f85f7b359b8>
<environment: namespace:adaptest>
--- function search by body ---
Function adaptest in namespace adaptest has this body.
----------- END OF FAILURE REPORT --------------
Fatal error: the condition has length > 1