- using R version 4.5.2 Patched (2026-01-31 r89382)
- using platform: aarch64-apple-darwin20
- R was compiled by
Apple clang version 16.0.0 (clang-1600.0.26.6)
GNU Fortran (GCC) 14.2.0
- running under: macOS Ventura 13.7.8
- using session charset: UTF-8
- checking for file ‘scTenifoldNet/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘scTenifoldNet’ version ‘1.4.3’
- 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 executable files ... OK
- checking for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘scTenifoldNet’ can be installed ... [3s/3s] OK
See the install log for details.
- checking installed package size ... OK
- checking package 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 code files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] 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 ... [3s/3s] OK
- checking Rd files ... [0s/0s] 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 examples ... [1s/1s] OK
- checking for unstated dependencies in ‘tests’ ... OK
- checking tests ... [3s/2s] ERROR
Running ‘testthat.R’ [2s/2s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> library(testthat)
> library(scTenifoldNet)
>
> test_check("scTenifoldNet")
*** caught segfault ***
address 0x110, cause 'invalid permissions'
*** caught segfault ***
address 0x110, cause 'invalid permissions'
Traceback:
1: FUN(X[[i]], ...)
2: lapply(X = S, FUN = FUN, ...)
3: doTryCatch(return(expr), name, parentenv, handler)
4: tryCatchOne(expr, names, parentenv, handlers[[1L]])
5: tryCatchList(expr, classes, parentenv, handlers)
6: tryCatch(expr, error = function(e) { call <- conditionCall(e) if (!is.null(call)) { if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L) dcall <- deparse(call, nlines = 1L) prefix <- paste("Error in", dcall, ": ") LONG <- 75L sm <- strsplit(conditionMessage(e), "\n")[[1L]] w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w") if (is.na(w)) w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], type = "b") if (w > LONG) prefix <- paste0(prefix, "\n ") } else prefix <- "Error : " msg <- paste0(prefix, conditionMessage(e), "\n") .Internal(seterrmessage(msg[1L])) if (!silent && isTRUE(getOption("show.error.messages"))) { cat(msg, file = outFile) .Internal(printDeferredWarnings()) } invisible(structure(msg, class = "try-error", condition = e))})
7: try(lapply(X = S, FUN = FUN, ...), silent = TRUE)
8: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))
9: FUN(X[[i]], ...)
10:
Traceback:
lapply(seq_len(cores), inner.do)
1: 11: FUN(X[[i]], ...)parallel::mclapply(gene_blocks, coefficient_rows, Z = Z, d = d,
nComp = nComp, secular_weights = secular_weights, mc.cores = nCores, 2: mc.preschedule = TRUE)lapply(X = S, FUN = FUN, ...)
12: 3: .pcNetCoefficients(basis$Z, basis$d, nComp, nCores)doTryCatch(return(expr), name, parentenv, handler)
13: pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2) 4:
tryCatchOne(expr, names, parentenv, handlers[[1L]])
14: 5: eval_bare(expr, quo_get_env(quo))
tryCatchList(expr, classes, parentenv, handlers)15:
quasi_label(enquo(object), label) 6:
tryCatch(expr, error = function(e) {16: call <- conditionCall(e)expect_equal(pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2), if (!is.null(call)) { pcNet(X, nComp = nComp, verbose = FALSE)) if (identical(call[[1L]], quote(doTryCatch))) call <- sys.call(-4L)
dcall <- deparse(call, nlines = 1L)17: prefix <- paste("Error in", dcall, ": ")eval(code, test_env) LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]18: w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")eval(code, test_env) if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L], 19: type = "b")withCallingHandlers({ if (w > LONG) eval(code, test_env) prefix <- paste0(prefix, "\n ") new_expectations <- the$test_expectations > starting_expectations } if (snapshot_skipped) { else prefix <- "Error : " skip("On CRAN") msg <- paste0(prefix, conditionMessage(e), "\n") } .Internal(seterrmessage(msg[1L])) else if (!new_expectations && skip_on_empty) { if (!silent && isTRUE(getOption("show.error.messages"))) { skip_empty() cat(msg, file = outFile) }}, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { .Internal(printDeferredWarnings()) skip(paste0("{", e$package, "} is not installed.")) } } invisible(structure(msg, class = "try-error", condition = e))}, snapshot_on_cran = function(cnd) {}) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot") 7: }, skip = handle_skip, warning = handle_warning, message = handle_message, try(lapply(X = S, FUN = FUN, ...), silent = TRUE) error = handle_error, interrupt = handle_interrupt)
8: 20: sendMaster(try(lapply(X = S, FUN = FUN, ...), silent = TRUE))doTryCatch(return(expr), name, parentenv, handler)
9: 21: FUN(X[[i]], ...)tryCatchOne(expr, names, parentenv, handlers[[1L]])
10: 22: tryCatchList(expr, classes, parentenv, handlers)lapply(seq_len(cores), inner.do)
23: 11: tryCatch(withCallingHandlers({parallel::mclapply(gene_blocks, coefficient_rows, Z = Z, d = d, eval(code, test_env) nComp = nComp, secular_weights = secular_weights, mc.cores = nCores, new_expectations <- the$test_expectations > starting_expectations mc.preschedule = TRUE) if (snapshot_skipped) {
skip("On CRAN")12: }.pcNetCoefficients(basis$Z, basis$d, nComp, nCores) else if (!new_expectations && skip_on_empty) {
skip_empty()13: }pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2)
}, expectation = handle_expectation, packageNotFoundError = function(e) {14: if (on_cran()) {eval_bare(expr, quo_get_env(quo)) skip(paste0("{", e$package, "} is not installed."))
}}, snapshot_on_cran = function(cnd) {15: quasi_label(enquo(object), label) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")16: }, skip = handle_skip, warning = handle_warning, message = handle_message, expect_equal(pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2), error = handle_error, interrupt = handle_interrupt), error = handle_fatal) pcNet(X, nComp = nComp, verbose = FALSE))
24: 17: doWithOneRestart(return(expr), restart)eval(code, test_env)
25:
withOneRestart(expr, restarts[[1L]])18:
eval(code, test_env)26:
withRestarts(tryCatch(withCallingHandlers({ eval(code, test_env)19: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) {withCallingHandlers({ skip("On CRAN") eval(code, test_env) } new_expectations <- the$test_expectations > starting_expectations else if (!new_expectations && skip_on_empty) { if (snapshot_skipped) { skip_empty() } skip("On CRAN")}, expectation = handle_expectation, packageNotFoundError = function(e) { } if (on_cran()) { else if (!new_expectations && skip_on_empty) { skip(paste0("{", e$package, "} is not installed.")) } skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {}, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUE if (on_cran()) { invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip(paste0("{", e$package, "} is not installed.")) end_test = function() { }}, snapshot_on_cran = function(cnd) { }) snapshot_skipped <<- TRUE
invokeRestart("muffle_cran_snapshot")27: }, skip = handle_skip, warning = handle_warning, message = handle_message, test_code(code, parent.frame()) error = handle_error, interrupt = handle_interrupt)
28:
test_that("pcNet matches per-gene SVD principal component regression", 20: {doTryCatch(return(expr), name, parentenv, handler) nCells <- 200 nGenes <- 100
nComp <- 321: set.seed(42)tryCatchOne(expr, names, parentenv, handlers[[1L]]) X <- matrix(rnbinom(n = nGenes * nCells, size = 20, prob = 0.98),
nrow = nGenes, ncol = nCells)22: rownames(X) <- paste0("Gene", seq_len(nGenes))tryCatchList(expr, classes, parentenv, handlers)
X_std <- scale(Matrix::t(X)) reference <- matrix(0, nGenes, nGenes)23: tryCatch(withCallingHandlers({ for (K in seq_len(nGenes)) { eval(code, test_env) design_matrix <- X_std[, -K] new_expectations <- the$test_expectations > starting_expectations principal_components <- svd(design_matrix, nu = 0, nv = nComp)$v if (snapshot_skipped) { pc_scores <- design_matrix %*% principal_components skip("On CRAN") pc_coefficients <- colSums(X_std[, K] * pc_scores)/colSums(pc_scores^2) } reference[K, -K] <- principal_components %*% pc_coefficients } else if (!new_expectations && skip_on_empty) { xNet <- pcNet(X, nComp = nComp, scaleScores = FALSE, skip_empty() verbose = FALSE) } expect_equal(unname(as.matrix(xNet)), reference, tolerance = 1e-08)}, expectation = handle_expectation, packageNotFoundError = function(e) { expect_equal(pcNet(X, nComp = nComp, verbose = FALSE, if (on_cran()) { nCores = 2), pcNet(X, nComp = nComp, verbose = FALSE)) skip(paste0("{", e$package, "} is not installed.")) }) }
}, snapshot_on_cran = function(cnd) {29: snapshot_skipped <<- TRUEeval(code, test_env)
30: invokeRestart("muffle_cran_snapshot")eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message,
error = handle_error, interrupt = handle_interrupt), error = handle_fatal)31:
withCallingHandlers({24: eval(code, test_env)doWithOneRestart(return(expr), restart) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {25: skip("On CRAN")withOneRestart(expr, restarts[[1L]]) }
else if (!new_expectations && skip_on_empty) {26: skip_empty()withRestarts(tryCatch(withCallingHandlers({ } eval(code, test_env)}, expectation = handle_expectation, packageNotFoundError = function(e) { new_expectations <- the$test_expectations > starting_expectations if (on_cran()) { if (snapshot_skipped) { skip(paste0("{", e$package, "} is not installed.")) skip("On CRAN") } }}, snapshot_on_cran = function(cnd) { else if (!new_expectations && skip_on_empty) { skip_empty() snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot") }}, skip = handle_skip, warning = handle_warning, message = handle_message, }, expectation = handle_expectation, packageNotFoundError = function(e) { error = handle_error, interrupt = handle_interrupt) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed."))32: }doTryCatch(return(expr), name, parentenv, handler)}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE33: invokeRestart("muffle_cran_snapshot")tryCatchOne(expr, names, parentenv, handlers[[1L]])}, skip = handle_skip, warning = handle_warning, message = handle_message,
34: error = handle_error, interrupt = handle_interrupt), error = handle_fatal), end_test = function() {tryCatchList(expr, classes, parentenv, handlers) })
35:
tryCatch(withCallingHandlers({27: eval(code, test_env)test_code(code, parent.frame()) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {28: skip("On CRAN")test_that("pcNet matches per-gene SVD principal component regression", { } nCells <- 200 else if (!new_expectations && skip_on_empty) { nGenes <- 100 skip_empty() nComp <- 3 }}, expectation = handle_expectation, packageNotFoundError = function(e) { set.seed(42) if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) X <- matrix(rnbinom(n = nGenes * nCells, size = 20, prob = 0.98), } nrow = nGenes, ncol = nCells)}, snapshot_on_cran = function(cnd) { rownames(X) <- paste0("Gene", seq_len(nGenes)) snapshot_skipped <<- TRUE X_std <- scale(Matrix::t(X)) invokeRestart("muffle_cran_snapshot") reference <- matrix(0, nGenes, nGenes)}, skip = handle_skip, warning = handle_warning, message = handle_message, for (K in seq_len(nGenes)) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal) design_matrix <- X_std[, -K]
36: doWithOneRestart(return(expr), restart) principal_components <- svd(design_matrix, nu = 0,
nv = nComp)$v37: withOneRestart(expr, restarts[[1L]]) pc_scores <- design_matrix %*% principal_components
38: pc_coefficients <- colSums(X_std[, K] * pc_scores)/colSums(pc_scores^2)withRestarts(tryCatch(withCallingHandlers({ reference[K, -K] <- principal_components %*% pc_coefficients eval(code, test_env) } xNet <- pcNet(X, nComp = nComp, scaleScores = FALSE, verbose = FALSE) new_expectations <- the$test_expectations > starting_expectations expect_equal(unname(as.matrix(xNet)), reference, tolerance = 1e-08) expect_equal(pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2), pcNet(X, nComp = nComp, verbose = FALSE)) if (snapshot_skipped) { }) skip("On CRAN")
29: }eval(code, test_env) else if (!new_expectations && skip_on_empty) {
skip_empty()30: }}, expectation = handle_expectation, packageNotFoundError = function(e) {eval(code, test_env) if (on_cran()) {
skip(paste0("{", e$package, "} is not installed.")) }31: }, snapshot_on_cran = function(cnd) { snapshot_skipped <<- TRUEwithCallingHandlers({ invokeRestart("muffle_cran_snapshot") eval(code, test_env)}, skip = handle_skip, warning = handle_warning, message = handle_message, new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { error = handle_error, interrupt = handle_interrupt), error = handle_fatal), skip("On CRAN") end_test = function() { } }) else if (!new_expectations && skip_on_empty) {
skip_empty() }}, expectation = handle_expectation, packageNotFoundError = function(e) {39: if (on_cran()) {test_code(code = exprs, env = env, reporter = get_reporter() %||% skip(paste0("{", e$package, "} is not installed.")) StopReporter$new()) }
}, snapshot_on_cran = function(cnd) {40: source_file(path, env = env(env), desc = desc, shuffle = shuffle, snapshot_skipped <<- TRUE error_call = error_call) invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, error = handle_error, interrupt = handle_interrupt)
41: 32: FUN(X[[i]], ...)doTryCatch(return(expr), name, parentenv, handler)
42: 33: tryCatchOne(expr, names, parentenv, handlers[[1L]])
34: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, tryCatchList(expr, classes, parentenv, handlers)
35: error_call = error_call)tryCatch(withCallingHandlers({
eval(code, test_env)43: new_expectations <- the$test_expectations > starting_expectations if (snapshot_skipped) { skip("On CRAN")doTryCatch(return(expr), name, parentenv, handler) } else if (!new_expectations && skip_on_empty) { skip_empty()
}44: }, expectation = handle_expectation, packageNotFoundError = function(e) { if (on_cran()) { skip(paste0("{", e$package, "} is not installed.")) }tryCatchOne(expr, names, parentenv, handlers[[1L]])}, snapshot_on_cran = function(cnd) {
snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")45: }, skip = handle_skip, warning = handle_warning, message = handle_message, tryCatchList(expr, classes, parentenv, handlers) error = handle_error, interrupt = handle_interrupt), error = handle_fatal)
36: 46: doWithOneRestart(return(expr), restart)tryCatch(code, testthat_abort_reporter = function(cnd) {
37: withOneRestart(expr, restarts[[1L]])
38: cat(conditionMessage(cnd), "\n")withRestarts(tryCatch(withCallingHandlers({ NULL eval(code, test_env)}) new_expectations <- the$test_expectations > starting_expectations
if (snapshot_skipped) {47: skip("On CRAN") }with_reporter(reporters$multi, lapply(test_paths, test_one_file, else if (!new_expectations && skip_on_empty) { env = env, desc = desc, shuffle = shuffle, error_call = error_call)) skip_empty()
}48: }, expectation = handle_expectation, packageNotFoundError = function(e) {test_files_serial(test_dir = test_dir, test_package = test_package, if (on_cran()) { test_paths = test_paths, load_helpers = load_helpers, reporter = reporter, env = env, stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, desc = desc, load_package = load_package, shuffle = shuffle, skip(paste0("{", e$package, "} is not installed.")) error_call = error_call)
}49: }, snapshot_on_cran = function(cnd) {test_files(test_dir = path, test_paths = test_paths, test_package = package, snapshot_skipped <<- TRUE invokeRestart("muffle_cran_snapshot")}, skip = handle_skip, warning = handle_warning, message = handle_message, reporter = reporter, load_helpers = load_helpers, env = env, error = handle_error, interrupt = handle_interrupt), error = handle_fatal), stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning, end_test = function() { load_package = load_package, parallel = parallel, shuffle = shuffle) })
39: 50: test_code(code = exprs, env = env, reporter = get_reporter() %||% test_dir("testthat", package = package, reporter = reporter, StopReporter$new()) ..., load_package = "installed")
40:
source_file(path, env = env(env), desc = desc, shuffle = shuffle, 51: error_call = error_call)test_check("scTenifoldNet")
41: An irrecoverable exception occurred. R is aborting now ...
FUN(X[[i]], ...)
42: lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call)
43: doTryCatch(return(expr), name, parentenv, handler)
44: tryCatchOne(expr, names, parentenv, handlers[[1L]])
45: tryCatchList(expr, classes, parentenv, handlers)
46: tryCatch(code, testthat_abort_reporter = function(cnd) { cat(conditionMessage(cnd), "\n") NULL})
47: with_reporter(reporters$multi, lapply(test_paths, test_one_file, env = env, desc = desc, shuffle = shuffle, error_call = error_call))
48: test_files_serial(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, desc = desc, load_package = load_package, shuffle = shuffle, error_call = error_call)
49: 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, load_package = load_package, parallel = parallel, shuffle = shuffle)
50: test_dir("testthat", package = package, reporter = reporter, ..., load_package = "installed")
51: test_check("scTenifoldNet")
An irrecoverable exception occurred. R is aborting now ...
Saving _problems/test-pcNet-89.R
[ FAIL 1 | WARN 1 | SKIP 0 | PASS 66 ]
══ Failed tests ════════════════════════════════════════════════════════════════
── Error ('test-pcNet.R:88:3'): pcNet matches per-gene SVD principal component regression ──
Error in `.pcNetCoefficients(basis$Z, basis$d, nComp, nCores)`: Parallel computation failed:
Backtrace:
▆
1. ├─testthat::expect_equal(...) at test-pcNet.R:88:3
2. │ └─testthat::quasi_label(enquo(object), label)
3. │ └─rlang::eval_bare(expr, quo_get_env(quo))
4. └─scTenifoldNet::pcNet(X, nComp = nComp, verbose = FALSE, nCores = 2)
5. └─scTenifoldNet:::.pcNetCoefficients(basis$Z, basis$d, nComp, nCores)
[ FAIL 1 | WARN 1 | SKIP 0 | PASS 66 ]
Error:
! Test failures.
Execution halted
- checking PDF version of manual ... [4s/4s] OK
- DONE
Status: 1 ERROR