Back to Long Tests report for BioC 3.22

This page was generated on 2026-02-21 23:55 -0500 (Sat, 21 Feb 2026).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4890
merida1macOS 12.7.6 Montereyx86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4680
Click on any hostname to see more info about the system (e.g. compilers)      (*) as reported by 'uname -p', except on Windows and Mac OS X

Package 17/31HostnameOS / ArchCHECK
DOtools 1.0.2  (landing page)
Mariano Ruz Jurado
Snapshot Date: 2026-02-21 09:55 -0500 (Sat, 21 Feb 2026)
git_url: https://git.bioconductor.org/packages/DOtools
git_branch: RELEASE_3_22
git_last_commit: 9a910aa
git_last_commit_date: 2026-02-16 07:39:16 -0500 (Mon, 16 Feb 2026)
nebbiolo2Linux (Ubuntu 24.04.3 LTS) / x86_64  ERROR  
merida1macOS 12.7.6 Monterey / x86_64  ERROR  


CHECK results for DOtools on merida1

To the developers/maintainers of the DOtools package:
- Use the following Renviron settings to reproduce errors and warnings.
- If 'R CMD check' started to fail recently on the Linux builder(s) over a missing dependency, add the missing dependency to 'Suggests:' in your DESCRIPTION file. See Renviron.bioc for more information.

raw results


Summary

Package: DOtools
Version: 1.0.2
Command: /Library/Frameworks/R.framework/Resources/bin/R CMD check --test-dir=longtests --no-stop-on-test-error --no-codoc --no-examples --no-manual --ignore-vignettes --check-subdirs=no DOtools_1.0.2.tar.gz
StartedAt: 2026-02-21 16:05:10 -0500 (Sat, 21 Feb 2026)
EndedAt: 2026-02-21 16:17:28 -0500 (Sat, 21 Feb 2026)
EllapsedTime: 738.2 seconds
RetCode: 1
Status:   ERROR  
CheckDir: DOtools.Rcheck
Warnings: NA

Tests output

DOtools.Rcheck/tests/test-DO.BarplotWilcox.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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.

> # Obsolete since DO.Barplot was created!
> # library(testthat)
> # library(Seurat)
> # library(ggplot2)
> # library(SingleCellExperiment)
> #
> # # Helper function to create test Seurat object
> # create_test_seurat <- function() {
> #   set.seed(42)
> #
> #   # Toy counts matrix: 10 genes x 12 cells
> #   mat <- matrix(rpois(120, lambda = 5), nrow = 10)
> #   rownames(mat) <- paste0("gene", 1:10)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   # Metadata: four conditions, three cells each
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3", "sample4"), each = 3),
> #     condition = rep(c("A", "B", "C", "D"), each = 3),
> #     cluster = rep(c("cluster1", "cluster2"), times = 6)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   # Create Seurat object - convert matrix to dgCMatrix to avoid warnings
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_obj <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_obj <- NormalizeData(seurat_obj)
> #
> #   # Add a metadata feature
> #   seurat_obj$metadata_feature <- rnorm(ncol(seurat_obj))
> #
> #   return(seurat_obj)
> # }
> #
> # # Helper function to create test SCE object
> # create_test_sce <- function() {
> #   set.seed(42)
> #
> #   # Toy counts matrix: 10 genes x 12 cells
> #   mat <- matrix(rpois(120, lambda = 5), nrow = 10)
> #   rownames(mat) <- paste0("gene", 1:10)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   # Create SingleCellExperiment
> #   sce <- SingleCellExperiment(
> #     assays = list(counts = mat, logcounts = log1p(mat)),
> #     colData = data.frame(
> #       orig.ident = rep(c("sample1", "sample2", "sample3", "sample4"), each = 3),
> #       condition = rep(c("A", "B", "C", "D"), each = 3),
> #       cluster = rep(c("cluster1", "cluster2"), times = 6)
> #     )
> #   )
> #
> #   return(sce)
> # }
> #
> # test_that("DO.BarplotWilcox returns ggplot and list correctly", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test 1: Default parameters (ggplot)
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     returnValues = FALSE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> #
> #   # Test 2: returnValues = TRUE (list with components)
> #   res <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     returnValues = TRUE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_type(res, "list")
> #   expect_named(res, c("plot", "df.melt", "df.melt.orig", "df.melt.sum", "stat.test"))
> #   expect_s3_class(res$plot, "ggplot")
> #   expect_true(is.data.frame(res$df.melt))
> #   expect_true(is.data.frame(res$df.melt.orig))
> #   expect_true(is.data.frame(res$df.melt.sum))
> # })
> #
> # test_that("DO.BarplotWilcox works with SingleCellExperiment objects", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   sce_obj <- create_test_sce()
> #
> #   # Test with SCE object
> #   p <- DO.BarplotWilcox(
> #     sce_object = sce_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox works with metadata features", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with metadata feature
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "metadata_feature",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     log1p_nUMI = FALSE
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles automatic ListTest generation", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with NULL ListTest and explicit ctrl condition
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = NULL,
> #     ctrl.condition = "A",  # Explicitly set control
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> #
> #   # Test with NULL ListTest and automatic ctrl detection
> #   # Create a test object with a condition that matches the pattern
> #   set.seed(42)
> #   mat <- matrix(rpois(60, lambda = 5), nrow = 5, ncol = 12)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3"), each = 4),
> #     condition = rep(c("CTRL", "disease1", "disease2"), each = 4)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_ctrl <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_ctrl <- NormalizeData(seurat_ctrl)
> #
> #   p2 <- DO.BarplotWilcox(
> #     sce_object = seurat_ctrl,
> #     Feature = "gene1",
> #     ListTest = NULL,
> #     ctrl.condition = NULL,  # Let it detect automatically
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p2, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles custom visual parameters", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with custom colors
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     bar_colours = c("red", "blue", "green", "yellow"),
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> #
> #   # Test with custom y-limits
> #   p2 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     y_limits = c(0, 10),
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p2, "ggplot")
> #
> #   # Test with x-label rotation
> #   p3 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     x_label_rotation = 90,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p3, "ggplot")
> #
> #   # Test with plotPvalue = TRUE (raw p-values instead of adjusted)
> #   p4 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     plotPvalue = TRUE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p4, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles log1p_nUMI parameter", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with log1p_nUMI = FALSE
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     log1p_nUMI = FALSE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> #
> #   # Test with log1p_nUMI = TRUE (default)
> #   p2 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     log1p_nUMI = TRUE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p2, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles different group.by parameters", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with different grouping variable
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("cluster1", "cluster2")),
> #     ctrl.condition = "cluster1",
> #     group.by = "cluster"
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles wilcox_test parameter", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with wilcox_test = FALSE (no statistical test)
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     wilcox_test = FALSE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> #
> #   # Test with wilcox_test = TRUE (default, with statistical test)
> #   p2 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     wilcox_test = TRUE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p2, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles stat_pos_mod and step_mod parameters", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with custom stat_pos_mod and step_mod
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B"), c("A","C")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     stat_pos_mod = 1.3,
> #     step_mod = 0.3
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles error conditions", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test error when feature not found
> #   expect_error(
> #     DO.BarplotWilcox(
> #       sce_object = seurat_obj,
> #       Feature = "nonexistent_gene",
> #       ListTest = list(c("A","B")),
> #       ctrl.condition = "A",
> #       group.by = "condition"
> #     ),
> #     "Feature not found in SCE Object!"
> #   )
> # })
> #
> # # FIXED: Completely rewrite the zero-mean conditions test to avoid Wilcoxon issues
> # test_that("DO.BarplotWilcox handles zero-mean conditions", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create a test object where some conditions have very low expression
> #   set.seed(42)
> #   mat <- matrix(0.1, nrow = 5, ncol = 12)  # Use small but non-zero values
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   # Set some higher values for condition A
> #   mat[1:3, 1:3] <- 5  # Condition A has expression
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3", "sample4"), each = 3),
> #     condition = rep(c("A", "B", "C", "D"), each = 3)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_obj <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_obj <- NormalizeData(seurat_obj)
> #
> #   # Test with wilcox_test = FALSE to avoid statistical test issues
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B"), c("B","C")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE  # Disable Wilcoxon to avoid errors
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox return values structure is correct", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   res <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     returnValues = TRUE,
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #
> #   # Check structure of returned list
> #   expect_named(res, c("plot", "df.melt", "df.melt.orig", "df.melt.sum", "stat.test"))
> #   expect_s3_class(res$plot, "ggplot")
> #   expect_true(is.data.frame(res$df.melt))
> #   expect_true(is.data.frame(res$df.melt.orig))
> #   expect_true(is.data.frame(res$df.melt.sum))
> #
> #   # Check that SEM is calculated correctly (non-negative)
> #   expect_true(all(res$df.melt.sum$SEM >= 0 | is.na(res$df.melt.sum$SEM)))
> # })
> #
> # test_that("DO.BarplotWilcox handles multiple comparisons", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with multiple comparisons - ensure sufficient sample size
> #   # Create a larger dataset for reliable Wilcoxon tests
> #   set.seed(42)
> #   mat <- matrix(rpois(200, lambda = 5), nrow = 5, ncol = 40)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:40)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3", "sample4", "sample5", "sample6", "sample7", "sample8"), each = 5),
> #     condition = rep(c("A", "B", "C", "D"), each = 10)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_large <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_large <- NormalizeData(seurat_large)
> #
> #   # Test with multiple comparisons
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_large,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B"), c("A","C"), c("B","D")),
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox plot elements are present", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition"
> #   )
> #
> #   # Check that essential plot elements are present
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox works with minimal parameters", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create a test object with a condition that matches the pattern for auto-detection
> #   set.seed(42)
> #   mat <- matrix(rpois(60, lambda = 5), nrow = 5, ncol = 12)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3"), each = 4),
> #     condition = rep(c("CTRL", "disease1", "disease2"), each = 4)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_obj <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_obj <- NormalizeData(seurat_obj)
> #
> #   # Test with minimal required parameters - ensure auto-detection works
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1"
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # test_that("DO.BarplotWilcox handles various parameter combinations", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with different parameter combinations
> #   p1 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     stat_pos_mod = 1.3,
> #     step_mod = 0.15,
> #     x_label_rotation = 0,
> #     plotPvalue = TRUE
> #   )
> #   expect_s3_class(p1, "ggplot")
> #
> #   p2 <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE,
> #     log1p_nUMI = FALSE
> #   )
> #   expect_s3_class(p2, "ggplot")
> # })
> #
> # # FIXED: Handle empty ListTest more carefully - disable Wilcoxon test
> # test_that("DO.BarplotWilcox handles empty ListTest gracefully", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   seurat_obj <- create_test_seurat()
> #
> #   # Test with empty ListTest - should use automatic generation
> #   # Disable Wilcoxon test to avoid the "p column not found" error
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE  # Disable Wilcoxon to avoid errors
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # # NEW: Test edge case with single condition
> # test_that("DO.BarplotWilcox handles single condition", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create object with only one condition
> #   set.seed(42)
> #   mat <- matrix(rpois(30, lambda = 5), nrow = 5, ncol = 6)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:6)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2"), each = 3),
> #     condition = rep("A", 6)  # Only one condition
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_single <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_single <- NormalizeData(seurat_single)
> #
> #   # This should work without statistical tests
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_single,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),  # Invalid comparison, should be handled
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE  # Disable Wilcoxon test to avoid issues
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # # NEW: Test with very small sample sizes
> # test_that("DO.BarplotWilcox handles small sample sizes", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create object with very few cells per condition
> #   set.seed(42)
> #   mat <- matrix(rpois(20, lambda = 5), nrow = 5, ncol = 4)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:4)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2"), each = 2),
> #     condition = rep(c("A", "B"), each = 2)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_small <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_small <- NormalizeData(seurat_small)
> #
> #   # Test with wilcox_test = FALSE to avoid small sample size issues
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_small,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # # NEW: Test with NULL ctrl.condition and automatic detection
> # test_that("DO.BarplotWilcox handles NULL ctrl.condition", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create object with clear control condition
> #   set.seed(42)
> #   mat <- matrix(rpois(90, lambda = 5), nrow = 5, ncol = 18)
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:18)
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3"), each = 6),
> #     condition = rep(c("CTRL", "treatment1", "treatment2"), each = 6)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_obj <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_obj <- NormalizeData(seurat_obj)
> #
> #   # Test with NULL ctrl.condition for auto-detection
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = NULL,
> #     ctrl.condition = NULL,  # Auto-detect
> #     group.by = "condition"
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> #
> # # NEW: Test the remove_zeros functionality specifically
> # test_that("DO.BarplotWilcox remove_zeros functionality works", {
> #   skip_if_not_installed("Seurat")
> #   skip_if_not_installed("ggplot2")
> #   skip_if_not_installed("rstatix")
> #
> #   # Create object where some conditions have zero means
> #   set.seed(42)
> #   mat <- matrix(0, nrow = 5, ncol = 12)  # All zeros initially
> #   rownames(mat) <- paste0("gene", 1:5)
> #   colnames(mat) <- paste0("cell", 1:12)
> #
> #   # Set condition A to have some expression
> #   mat[1, 1:3] <- 5  # Only condition A has expression
> #
> #   meta <- data.frame(
> #     orig.ident = rep(c("sample1", "sample2", "sample3", "sample4"), each = 3),
> #     condition = rep(c("A", "B", "C", "D"), each = 3)
> #   )
> #   rownames(meta) <- colnames(mat)
> #
> #   mat_sparse <- as(mat, "dgCMatrix")
> #   seurat_obj <- CreateSeuratObject(counts = mat_sparse, meta.data = meta)
> #   seurat_obj <- NormalizeData(seurat_obj)
> #
> #   # Test with wilcox_test = FALSE to avoid statistical test issues
> #   p <- DO.BarplotWilcox(
> #     sce_object = seurat_obj,
> #     Feature = "gene1",
> #     ListTest = list(c("A","B"), c("B","C"), c("C","D")),
> #     ctrl.condition = "A",
> #     group.by = "condition",
> #     wilcox_test = FALSE  # Disable Wilcoxon to avoid errors
> #   )
> #   expect_s3_class(p, "ggplot")
> # })
> 
> proc.time()
   user  system elapsed 
  0.190   0.066   0.233 

DOtools.Rcheck/tests/test-DO.Dotplot.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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.

> # tests/testthat/test-DO.Dotplot-full.R
> library(testthat)
> library(Seurat)
Loading required package: SeuratObject
Loading required package: sp
'SeuratObject' was built under R 4.5.1 but the current version is
4.5.2; it is recomended that you reinstall 'SeuratObject' as the ABI
for R may have changed

Attaching package: 'SeuratObject'

The following objects are masked from 'package:base':

    intersect, t

> library(SingleCellExperiment)
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: generics

Attaching package: 'generics'

The following objects are masked from 'package:base':

    as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
    setequal, union


Attaching package: 'BiocGenerics'

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
    mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
    rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
    unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:utils':

    findMatches

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:sp':

    %over%

Loading required package: Seqinfo
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'Biobase'

The following object is masked from 'package:MatrixGenerics':

    rowMedians

The following objects are masked from 'package:matrixStats':

    anyMissing, rowMedians


Attaching package: 'SummarizedExperiment'

The following object is masked from 'package:Seurat':

    Assays

The following object is masked from 'package:SeuratObject':

    Assays

> library(DOtools)
> library(Matrix)

Attaching package: 'Matrix'

The following object is masked from 'package:S4Vectors':

    expand

> library(ggplot2)
> 
> safe_dotplot <- function(...) suppressWarnings(suppressMessages(DO.Dotplot(...)))
> 
> # Helper function to create consistent test data
> create_test_seurat <- function() {
+   set.seed(1234)
+   n_genes <- 200
+   n_cells <- 60
+   synthetic_genes <- paste0("SGENE", seq_len(n_genes))
+ 
+   # Create matrix with correct dimensions: n_genes x n_cells
+   counts_matrix <- matrix(
+     rpois(n_genes * n_cells, lambda = 1),
+     nrow = n_genes,
+     ncol = n_cells,
+     dimnames = list(synthetic_genes, paste0("Cell", seq_len(n_cells)))
+   )
+ 
+   # Convert to dgCMatrix
+   counts <- as(counts_matrix, "dgCMatrix")
+ 
+   clusters <- c(rep("C1", 30), rep("C2", 30))
+   conditions <- c(rep(c("healthy","disease"), each = 15), rep(c("healthy","disease"), each = 15))
+   origidents <- rep(c("sample1","sample2","sample3","sample4"), length.out = n_cells)
+ 
+   # Create some expression patterns
+   counts["SGENE10", clusters == "C1" & conditions == "healthy"] <- rpois(15, 80)
+   counts["SGENE10", clusters == "C1" & conditions == "disease"] <- rpois(15, 2)
+   counts["SGENE20", clusters == "C2" & conditions == "disease"] <- rpois(15, 70)
+   counts["SGENE20", clusters == "C2" & conditions == "healthy"] <- rpois(15, 1)
+   counts["SGENE30",] <- rpois(n_cells, 5)  # Low expression gene
+   counts["SGENE40",] <- 0  # Zero expression gene
+ 
+   suppressWarnings({
+     seu <- CreateSeuratObject(counts = counts, assay = "RNA")
+   })
+   seu$cluster <- clusters
+   seu$condition <- conditions
+   seu$orig.ident <- origidents
+   seu <- NormalizeData(seu, verbose = FALSE)
+   return(seu)
+ }
> 
> # Define PercentAbove function
> PercentAbove <- function(x, threshold = 0) {
+   if (length(x) == 0) return(0)  # Handle empty vector case
+   return(length(x = x[x > threshold]) / length(x = x))
+ }
> 
> # ---- Tests for branches ----
> 
> test_that("SingleCellExperiment conversion works", {
+   seu <- create_test_seurat()
+ 
+   # Convert to SCE and test - suppress the scale.data warning
+   suppressWarnings({
+     sce <- as.SingleCellExperiment(seu)
+   })
+   p <- safe_dotplot(sce, Feature = c("SGENE10", "SGENE20"), group.by.x = "condition")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("error handling for invalid Feature types", {
+   seu <- create_test_seurat()
+ 
+   # Test non-vector, non-dataframe input
+   expect_error(DO.Dotplot(seu, Feature = list("SGENE10", "SGENE20"), group.by.x = "condition"))
+ })
Test passed with 1 success 🥳.
> 
> test_that("cluster name detection in data frame works with various column names", {
+   seu <- create_test_seurat()
+ 
+   # Test different cluster column names
+   features_df_cluster <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   p1 <- safe_dotplot(seu, Feature = features_df_cluster, group.by.x = "condition")
+   expect_s3_class(p1, "ggplot")
+ 
+ 
+ })
Test passed with 1 success 🥳.
> 
> test_that("gene name detection in data frame works with various column names", {
+   seu <- create_test_seurat()
+ 
+   # Test gene column named "feature"
+   features_df_feature <- data.frame(
+     feature = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   p <- safe_dotplot(seu, Feature = features_df_feature, group.by.x = "condition")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("error handling for invalid data frame columns", {
+   seu <- create_test_seurat()
+ 
+   features_df_invalid <- data.frame(
+     invalid_col1 = c("SGENE10", "SGENE20"),
+     invalid_col2 = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   expect_error(safe_dotplot(seu, Feature = features_df_invalid, group.by.x = "condition"))
+ })
Test passed with 1 success 🥳.
> 
> test_that("group.by.x only case with identical id and xaxis", {
+   seu <- create_test_seurat()
+ 
+   # Test case where id and xaxis become identical
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20", "SGENE30"),
+     cluster = c("C1", "C2", "C1"),
+     stringsAsFactors = FALSE
+   )
+ 
+   p <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("hide_zero functionality with complete cases", {
+   seu <- create_test_seurat()
+ 
+   # Test hide_zero = FALSE keeps zeros
+   df_show <- safe_dotplot(seu, Feature = "SGENE40", group.by.x = "condition",
+                           hide_zero = FALSE, returnValue = TRUE)
+   # Should have entries even for zero expression
+   expect_true(nrow(df_show) > 0)
+ })
Test passed with 1 success 🥳.
> 
> test_that("pseudobulk functionality with edge cases", {
+   seu <- create_test_seurat()
+ 
+   # Test pseudobulk with single group
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", across.group.by.x = TRUE)
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test pseudobulk with group.by.y but no group.by.y2
+   p2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      across.group.by.y = TRUE)
+   expect_s3_class(p2, "ggplot")
+ })
Test passed with 2 successes 😀.
> 
> test_that("expression scaling and transformation combinations", {
+   seu <- create_test_seurat()
+ 
+   # Test all combinations of scale_gene and log1p_nUMI
+   combinations <- list(
+     c(FALSE, FALSE),
+     c(FALSE, TRUE),
+     c(TRUE, FALSE),
+     c(TRUE, TRUE)
+   )
+ 
+   for (combo in combinations) {
+     scale_gene <- combo[1]
+     log1p_nUMI <- combo[2]
+ 
+     p <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                       group.by.x = "condition",
+                       scale_gene = scale_gene,
+                       log1p_nUMI = log1p_nUMI)
+     expect_s3_class(p, "ggplot")
+   }
+ })
Test passed with 4 successes 🥳.
> 
> test_that("aesthetic mapping selection logic", {
+   seu <- create_test_seurat()
+ 
+   # Test case where id and xaxis are identical with vector Feature
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"), group.by.x = "condition")
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test case where id and xaxis are identical with dataframe Feature
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   p2 <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition")
+   expect_s3_class(p2, "ggplot")
+ 
+   # Test case with group.by.y (different id and xaxis)
+   p3 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster")
+   expect_s3_class(p3, "ggplot")
+ })
Test passed with 3 successes 😀.
> 
> test_that("color scale branches", {
+   seu <- create_test_seurat()
+ 
+   # Test the main branch with 2 colors (default)
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"), group.by.x = "condition")
+   expect_s3_class(p1, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("facetting and plot type branches", {
+   seu <- create_test_seurat()
+ 
+   # Test across.group.by.x branch
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", across.group.by.x = TRUE)
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test across.group.by.y branch
+   p2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      across.group.by.y = TRUE)
+   expect_s3_class(p2, "ggplot")
+ 
+   # Test identical id/xaxis branch with dataframe
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   p3 <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition")
+   expect_s3_class(p3, "ggplot")
+ 
+   # Test default branch (group.by.y case)
+   p4 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster")
+   expect_s3_class(p4, "ggplot")
+ })
Test passed with 4 successes 😀.
> 
> test_that("annotation_x with coord_flip scenario", {
+   seu <- create_test_seurat()
+ 
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test without expecting warning
+   p <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition",
+                     annotation_x = TRUE, coord_flip = TRUE)
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("statistical significance star plotting", {
+   seu <- create_test_seurat()
+ 
+   # Test with stats_x = TRUE
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      stats_x = TRUE)
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test with stats_y = TRUE
+   p2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      stats_y = TRUE)
+   expect_s3_class(p2, "ggplot")
+ 
+   # Test with both stats TRUE
+   p3 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      stats_x = TRUE, stats_y = TRUE)
+   expect_s3_class(p3, "ggplot")
+ })
Test passed with 3 successes 😀.
> 
> test_that("scale_size_continuous with different scenarios", {
+   seu <- create_test_seurat()
+ 
+   # Test with normal data
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"), group.by.x = "condition")
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test with single group (different size scaling branch)
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+   p2 <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition")
+   expect_s3_class(p2, "ggplot")
+ })
Test passed with 2 successes 🥳.
> 
> test_that("statistical tests with genes that have results", {
+   seu <- create_test_seurat()
+ 
+   # Use genes that definitely have expression and will produce statistical results
+   p <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                     group.by.x = "condition", group.by.y = "cluster",
+                     stats_x = TRUE)
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 😀.
> 
> test_that("factor level ordering with sort_x", {
+   seu <- create_test_seurat()
+ 
+   # Test sort_x with group.by.y
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      sort_x = c("disease", "healthy"))
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test sort_x without group.by.y
+   p2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", sort_x = c("SGENE20", "SGENE10"))
+   expect_s3_class(p2, "ggplot")
+ })
Test passed with 2 successes 😀.
> 
> test_that("pseudobulk level ordering", {
+   seu <- create_test_seurat()
+ 
+   # Test pseudobulk level ordering for x-axis
+   p1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", across.group.by.x = TRUE)
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test pseudobulk level ordering for y-axis without group.by.y2
+   p2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      across.group.by.y = TRUE)
+   expect_s3_class(p2, "ggplot")
+ 
+   # Test pseudobulk level ordering for y-axis with group.by.y2
+   p3 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      group.by.y2 = "orig.ident", across.group.by.y = TRUE)
+   expect_s3_class(p3, "ggplot")
+ })
Test passed with 3 successes 😀.
> 
> test_that("edge cases with proper data preparation", {
+   # Test with very small dataset
+   set.seed(123)
+   tiny_counts <- matrix(rpois(5 * 10, lambda = 1), nrow = 5, ncol = 10,
+                         dimnames = list(paste0("G", 1:5), paste0("C", 1:10)))
+ 
+   # Convert to dgCMatrix to avoid warning
+   tiny_counts <- as(tiny_counts, "dgCMatrix")
+ 
+   suppressWarnings({
+     tiny_seu <- CreateSeuratObject(counts = tiny_counts)
+   })
+   tiny_seu$group <- rep(c("A", "B"), each = 5)
+   tiny_seu <- NormalizeData(tiny_seu, verbose = FALSE)  # Add normalization
+ 
+   p <- safe_dotplot(tiny_seu, Feature = c("G1", "G2"), group.by.x = "group")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🌈.
> 
> test_that("error conditions for statistical tests", {
+   seu <- create_test_seurat()
+ 
+   # Test that no error occurs with valid inputs
+   expect_silent(safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                              group.by.x = "condition", stats_x = FALSE, stats_y = FALSE))
+ })
Test passed with 1 success 🥳.
> 
> test_that("guide customization layers", {
+   seu <- create_test_seurat()
+ 
+   # Test that guide layers are properly applied
+   p <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"), group.by.x = "condition")
+ 
+   # Check that the plot has guides
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("PercentAbove function edge cases", {
+   # Test PercentAbove with various inputs
+   expect_equal(PercentAbove(c(0, 0, 0), threshold = 0), 0)
+   expect_equal(PercentAbove(c(1, 2, 3), threshold = 0), 1)
+   expect_equal(PercentAbove(c(1, 2, 3), threshold = 2), 1/3)
+   expect_equal(PercentAbove(numeric(0), threshold = 0), 0) # Handle empty vector
+ })
Test passed with 4 successes 😸.
> 
> test_that("data frame manipulation with dplyr functions", {
+   seu <- create_test_seurat()
+ 
+   # Test that the dplyr manipulations work correctly
+   df <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                      group.by.x = "condition", group.by.y = "cluster",
+                      across.group.by.y = TRUE, returnValue = TRUE)
+ 
+   expect_true(is.data.frame(df))
+   expect_true(all(c("gene", "id", "xaxis", "avg.exp", "pct.exp") %in% colnames(df)))
+ })
Test passed with 2 successes 😀.
> 
> test_that("conditional factor level setting", {
+   seu <- create_test_seurat()
+ 
+   # Test with annotation_x_rev = TRUE
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20", "SGENE30"),
+     cluster = c("C1", "C2", "C1"),
+     stringsAsFactors = FALSE
+   )
+ 
+   p <- safe_dotplot(seu, Feature = features_df, group.by.x = "condition",
+                     annotation_x = TRUE, annotation_x_rev = TRUE)
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> # ---- Integration tests with complex scenarios ----
> 
> test_that("complex multi-parameter scenarios without conflicting options", {
+   seu <- create_test_seurat()
+ 
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20", "SGENE30"),
+     cluster = c("C1", "C2", "C1"),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test complex scenario but don't set both pseudobulk options
+   p1 <- safe_dotplot(seu, Feature = features_df,
+                      group.by.x = "condition",
+                      group.by.y = "cluster",
+                      across.group.by.y = TRUE,  # Only one pseudobulk option
+                      scale_gene = TRUE,
+                      log1p_nUMI = FALSE,
+                      stats_x = TRUE,
+                      stats_y = TRUE,
+                      annotation_x = TRUE,
+                      coord_flip = TRUE,
+                      hide_zero = FALSE,
+                      dot.size = c(2, 8),
+                      point_stroke = 0.5,
+                      limits_colorscale = c(0, 10),
+                      sig_size = 8,
+                      nudge_x = 0.5,
+                      nudge_y = 0.5)
+   expect_s3_class(p1, "ggplot")
+ 
+   # Test another complex scenario with the other pseudobulk option
+   p2 <- safe_dotplot(seu, Feature = features_df,
+                      group.by.x = "condition",
+                      group.by.y = "cluster",
+                      across.group.by.x = TRUE,  # Only one pseudobulk option
+                      scale_gene = FALSE,
+                      log1p_nUMI = TRUE,
+                      stats_x = FALSE,  # Disable stats to avoid subset issues
+                      stats_y = FALSE,  # Disable stats to avoid subset issues
+                      annotation_x = FALSE,
+                      coord_flip = FALSE,
+                      hide_zero = TRUE,
+                      dot.size = c(1, 6),
+                      point_stroke = 0.2)
+   expect_s3_class(p2, "ggplot")
+ })
Test passed with 2 successes 😀.
> 
> test_that("complex scenario with group.by.y2 but careful statistical testing", {
+   seu <- create_test_seurat()
+ 
+   features_df <- data.frame(
+     gene = c("SGENE10", "SGENE20"),
+     cluster = c("C1", "C2"),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Use group.by.y2 but avoid statistical tests that cause subset issues
+   p <- safe_dotplot(seu, Feature = features_df,
+                     group.by.x = "condition",
+                     group.by.y = "cluster",
+                     group.by.y2 = "orig.ident",
+                     across.group.by.y = TRUE,
+                     stats_x = FALSE,  # Disable to avoid "No cells found" error
+                     stats_y = FALSE,  # Disable to avoid "No cells found" error
+                     scale_gene = TRUE,
+                     log1p_nUMI = TRUE)
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> # ---- Additional edge case tests ----
> 
> test_that("empty gene list handling", {
+   seu <- create_test_seurat()
+ 
+   # Test with empty gene list (should error)
+   expect_error(safe_dotplot(seu, Feature = character(0), group.by.x = "condition"))
+ })
Test passed with 1 success 🥳.
> 
> test_that("single cell edge cases", {
+   seu <- create_test_seurat()
+ 
+   # Test with single gene, single group
+   p <- safe_dotplot(seu, Feature = "SGENE10", group.by.x = "condition")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("metadata column edge cases", {
+   seu <- create_test_seurat()
+ 
+   # Test with numeric metadata
+   seu$numeric_meta <- as.numeric(factor(seu$condition))
+   p <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"), group.by.x = "numeric_meta")
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("plot margin and theme parameters", {
+   seu <- create_test_seurat()
+ 
+   # Test different margin settings
+   p <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                     group.by.x = "condition", plot.margin = c(0.5, 0.5, 0.5, 0.5))
+   expect_s3_class(p, "ggplot")
+ })
Test passed with 1 success 🥳.
> 
> test_that("various parameter combinations that should work", {
+   seu <- create_test_seurat()
+ 
+   # Test different combinations of parameters that are less likely to cause errors
+   test_combinations <- list(
+     list(group.by.x = "condition", dot.size = c(1, 3)),
+     list(group.by.x = "condition", point_stroke = 0.1),
+     list(group.by.x = "condition", midpoint = 0.8),
+     list(group.by.x = "condition", limits_colorscale = c(0, 2)),
+     list(group.by.x = "condition", sig_size = 4, nudge_x = 0.1, nudge_y = 0.1)
+   )
+ 
+   for (params in test_combinations) {
+     p <- do.call(safe_dotplot, c(list(sce_object = seu, Feature = c("SGENE10", "SGENE20")), params))
+     expect_s3_class(p, "ggplot")
+   }
+ })
Test passed with 5 successes 🥳.
> 
> test_that("data frame return structure verification", {
+   seu <- create_test_seurat()
+ 
+   # Test various returnValue scenarios
+   df1 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                       group.by.x = "condition", returnValue = TRUE)
+   expect_true(is.data.frame(df1))
+   expect_true(nrow(df1) > 0)
+ 
+   df2 <- safe_dotplot(seu, Feature = c("SGENE10", "SGENE20"),
+                       group.by.x = "condition", group.by.y = "cluster",
+                       returnValue = TRUE)
+   expect_true(is.data.frame(df2))
+   expect_true(nrow(df2) > 0)
+ })
Test passed with 4 successes 😀.
> 
> 
> proc.time()
   user  system elapsed 
 58.785   1.557  60.586 

DOtools.Rcheck/tests/test-DO.MultiDGE.Rout


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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(DOtools)
> library(Seurat)
Loading required package: SeuratObject
Loading required package: sp
'SeuratObject' was built under R 4.5.1 but the current version is
4.5.2; it is recomended that you reinstall 'SeuratObject' as the ABI
for R may have changed

Attaching package: 'SeuratObject'

The following objects are masked from 'package:base':

    intersect, t

> library(SingleCellExperiment)
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: generics

Attaching package: 'generics'

The following objects are masked from 'package:base':

    as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
    setequal, union


Attaching package: 'BiocGenerics'

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
    mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
    rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
    unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:utils':

    findMatches

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:sp':

    %over%

Loading required package: Seqinfo
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'Biobase'

The following object is masked from 'package:MatrixGenerics':

    rowMedians

The following objects are masked from 'package:matrixStats':

    anyMissing, rowMedians


Attaching package: 'SummarizedExperiment'

The following object is masked from 'package:Seurat':

    Assays

The following object is masked from 'package:SeuratObject':

    Assays

> 
> test_that("DO.MultiDGE returns merged dataframe with SC and PB results", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+   expect_true(any(grepl("SC_wilcox", colnames(result))))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> test_that("DO.MultiDGE works with SingleCellExperiment input", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE stops when ident_ctrl not found", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   expect_error(
+     DO.MultiDGE(
+       sce_object = sce_data,
+       sample_col = "orig.ident",
+       method_sc = "wilcox",
+       annotation_col = "annotation",
+       ident_ctrl = "nonexistent_condition"
+     ),
+     "was not found in meta data"
+   )
+ })
── Warning: DO.MultiDGE stops when ident_ctrl not found ────────────────────────
2 arguments not used by format '%s was not found in meta data under the specified '
Backtrace:
    ▆
 1. ├─testthat::expect_error(...)
 2. │ └─testthat:::quasi_capture(...)
 3. │   ├─testthat (local) .capture(...)
 4. │   │ └─base::withCallingHandlers(...)
 5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
 6. └─DOtools::DO.MultiDGE(...)
 7.   ├─base::stop(...)
 8.   └─base::sprintf(...)
Test passed with 1 success 🌈.
> 
> test_that("DO.MultiDGE works with different method_sc", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # Test with different methods
+   methods_to_test <- c("wilcox", "t")
+ 
+   for(method in methods_to_test) {
+     result <- DO.MultiDGE(
+       sce_object = sce_data,
+       sample_col = "orig.ident",
+       method_sc = method,
+       annotation_col = "annotation",
+       ident_ctrl = "healthy"
+     )
+ 
+     expect_true(any(grepl(paste0("SC_", method), colnames(result))))
+   }
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> test_that("DO.MultiDGE handles min_pct and logfc_threshold parameters", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy",
+     min_pct = 0.1,
+     logfc_threshold = 0.25
+   )
+ 
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE works with only_pos = TRUE", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy",
+     only_pos = TRUE
+   )
+ 
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles cell count filtering", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy",
+     min_cells_group = 5
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE works with different assays", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   seurat_obj <- as.Seurat(sce_data)
+ 
+   result <- DO.MultiDGE(
+     sce_object = seurat_obj,
+     assay = "RNA",
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE returns proper column structure", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expected_base_cols <- c("gene", "pct.1", "pct.2", "celltype", "condition")
+   expect_true(all(expected_base_cols %in% colnames(result)))
+   expect_true(any(grepl("SC_wilcox", colnames(result))))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> test_that("DO.MultiDGE works with additional FindMarkers parameters", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy",
+     min.cells.feature = 3,
+     verbose = FALSE
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles different group_by columns", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   if ("condition" %in% colnames(sce_data@colData)) {
+     result <- DO.MultiDGE(
+       sce_object = sce_data,
+       group_by = "condition",
+       sample_col = "orig.ident",
+       method_sc = "wilcox",
+       annotation_col = "annotation",
+       ident_ctrl = "healthy"
+     )
+ 
+     expect_s3_class(result, "data.frame")
+   }
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> 
> test_that("DO.MultiDGE handles the internal .suppressDeprecationWarnings", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles the PB_ident creation and usage", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE column renaming works correctly", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   sc_cols <- grep("SC_", colnames(result), value = TRUE)
+   expect_true(length(sc_cols) > 0)
+   expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> test_that("DO.MultiDGE handles the left join operation correctly", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ 
+   if (nrow(result) > 0) {
+     expect_false(any(is.na(result$gene)))
+     expect_false(any(is.na(result$celltype)))
+     expect_false(any(is.na(result$condition)))
+   }
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 4 successes 😀.
> 
> test_that("DO.MultiDGE logging doesn't interfere with execution", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE works with minimal parameters", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE pseudo-bulk aggregation works", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> # TESTS FOR SPECIFIC FUNCTIONAL PATHS THAT ARE SAFE
> 
> test_that("DO.MultiDGE handles the AggregateExpression pathway", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # This tests the pseudo-bulk creation without triggering empty results
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",  # This is critical for aggregation
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles annotation name consistency check", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # This tests the annotation name consistency logic
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",  # Use standard annotation column
+     ident_ctrl = "healthy"
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles the comparison loop structure", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # Test with a control condition that exists
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   # handle the comparison loops without error
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles the cell count validation", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # Test with reasonable min_cells_group
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy",
+     min_cells_group = 3  # Default value
+   )
+ 
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> test_that("DO.MultiDGE handles the result collection and merging", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   # Test the final merged result structure
+   expect_s3_class(result, "data.frame")
+   if (nrow(result) > 0) {
+     # key columns for the merge
+     expect_true(all(c("gene", "celltype", "condition") %in% colnames(result)))
+   }
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> # TEST FOR THE DESeq2 PSEUDO-BULK PATHWAY
> test_that("DO.MultiDGE DESeq2 pseudo-bulk analysis completes", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",  # Required for pseudo-bulk
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   # should complete the DESeq2 pseudo-bulk pathway
+   expect_s3_class(result, "data.frame")
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 1 success 😀.
> 
> # TEST FOR THE SINGLE-CELL ANALYSIS PATHWAY
> test_that("DO.MultiDGE single-cell analysis completes", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   result <- DO.MultiDGE(
+     sce_object = sce_data,
+     sample_col = "orig.ident",
+     method_sc = "wilcox",
+     annotation_col = "annotation",
+     ident_ctrl = "healthy"
+   )
+ 
+   # Should complete single-cell analysis pathway
+   expect_s3_class(result, "data.frame")
+   expect_true(any(grepl("SC_wilcox", colnames(result))))
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 2 successes 😀.
> 
> # COMPREHENSIVE TEST COVERING MULTIPLE PARAMETERS
> test_that("DO.MultiDGE comprehensive parameter test", {
+   sce_data <- readRDS(system.file("extdata", "sce_data.rds", package = "DOtools"))
+ 
+   # Test multiple parameter combinations that are known to work
+   test_combinations <- list(
+     list(method_sc = "wilcox", only_pos = FALSE),
+     list(method_sc = "wilcox", only_pos = TRUE),
+     list(method_sc = "t", only_pos = FALSE)
+   )
+ 
+   for (params in test_combinations) {
+     result <- DO.MultiDGE(
+       sce_object = sce_data,
+       sample_col = "orig.ident",
+       method_sc = params$method_sc,
+       annotation_col = "annotation",
+       ident_ctrl = "healthy",
+       only_pos = params$only_pos
+     )
+ 
+     expect_s3_class(result, "data.frame")
+     if (nrow(result) > 0) {
+       expect_true(any(grepl(paste0("SC_", params$method_sc), colnames(result))))
+     }
+   }
+ })

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |======================================================================| 100%

  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |======================================================================| 100%
Test passed with 6 successes 😀.
> 
> proc.time()
   user  system elapsed 
204.587   3.664 216.868 

DOtools.Rcheck/tests/test-DO.scVI.Rout.fail


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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(mockery)
> library(Seurat)
Loading required package: SeuratObject
Loading required package: sp
'SeuratObject' was built under R 4.5.1 but the current version is
4.5.2; it is recomended that you reinstall 'SeuratObject' as the ABI
for R may have changed

Attaching package: 'SeuratObject'

The following objects are masked from 'package:base':

    intersect, t

> library(SingleCellExperiment)
Loading required package: SummarizedExperiment
Loading required package: MatrixGenerics
Loading required package: matrixStats

Attaching package: 'MatrixGenerics'

The following objects are masked from 'package:matrixStats':

    colAlls, colAnyNAs, colAnys, colAvgsPerRowSet, colCollapse,
    colCounts, colCummaxs, colCummins, colCumprods, colCumsums,
    colDiffs, colIQRDiffs, colIQRs, colLogSumExps, colMadDiffs,
    colMads, colMaxs, colMeans2, colMedians, colMins, colOrderStats,
    colProds, colQuantiles, colRanges, colRanks, colSdDiffs, colSds,
    colSums2, colTabulates, colVarDiffs, colVars, colWeightedMads,
    colWeightedMeans, colWeightedMedians, colWeightedSds,
    colWeightedVars, rowAlls, rowAnyNAs, rowAnys, rowAvgsPerColSet,
    rowCollapse, rowCounts, rowCummaxs, rowCummins, rowCumprods,
    rowCumsums, rowDiffs, rowIQRDiffs, rowIQRs, rowLogSumExps,
    rowMadDiffs, rowMads, rowMaxs, rowMeans2, rowMedians, rowMins,
    rowOrderStats, rowProds, rowQuantiles, rowRanges, rowRanks,
    rowSdDiffs, rowSds, rowSums2, rowTabulates, rowVarDiffs, rowVars,
    rowWeightedMads, rowWeightedMeans, rowWeightedMedians,
    rowWeightedSds, rowWeightedVars

Loading required package: GenomicRanges
Loading required package: stats4
Loading required package: BiocGenerics
Loading required package: generics

Attaching package: 'generics'

The following objects are masked from 'package:base':

    as.difftime, as.factor, as.ordered, intersect, is.element, setdiff,
    setequal, union


Attaching package: 'BiocGenerics'

The following objects are masked from 'package:stats':

    IQR, mad, sd, var, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, aperm, append,
    as.data.frame, basename, cbind, colnames, dirname, do.call,
    duplicated, eval, evalq, get, grep, grepl, is.unsorted, lapply,
    mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int,
    rank, rbind, rownames, sapply, saveRDS, table, tapply, unique,
    unsplit, which.max, which.min

Loading required package: S4Vectors

Attaching package: 'S4Vectors'

The following object is masked from 'package:utils':

    findMatches

The following objects are masked from 'package:base':

    I, expand.grid, unname

Loading required package: IRanges

Attaching package: 'IRanges'

The following object is masked from 'package:sp':

    %over%

Loading required package: Seqinfo
Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.


Attaching package: 'Biobase'

The following object is masked from 'package:MatrixGenerics':

    rowMedians

The following objects are masked from 'package:matrixStats':

    anyMissing, rowMedians


Attaching package: 'SummarizedExperiment'

The following object is masked from 'package:Seurat':

    Assays

The following object is masked from 'package:SeuratObject':

    Assays

> library(Matrix)

Attaching package: 'Matrix'

The following object is masked from 'package:S4Vectors':

    expand

> 
> SCE_obj <- readRDS(
+   system.file("extdata",
+               "sce_data.rds",
+               package = "DOtools")
+ )
> 
> # ------------------------------
> # Improved Helper functions for test objects
> # ------------------------------
> setup_minimal_seurat <- function() {
+   set.seed(42)
+   counts_matrix <- as(
+     matrix(rpois(20*10, lambda = 10), nrow = 20, ncol = 10), "dgCMatrix"
+     )
+   rownames(counts_matrix) <- paste0("Gene", 1:20)
+   colnames(counts_matrix) <- paste0("Cell", 1:10)
+ 
+   seurat_obj <- CreateSeuratObject(counts = counts_matrix)
+   seurat_obj <- NormalizeData(seurat_obj, verbose = FALSE)
+   seurat_obj <- ScaleData(seurat_obj, verbose = FALSE)
+ 
+   seurat_obj$orig.ident <- rep(c("A", "B"), each = 5)
+   VariableFeatures(seurat_obj) <- rownames(seurat_obj)[1:10]
+   seurat_obj
+ }
> 
> setup_minimal_sce <- function() {
+   set.seed(42)
+   counts_matrix <- as(
+     matrix(rpois(20*10, lambda = 10), nrow = 20, ncol = 10), "dgCMatrix"
+     )
+   rownames(counts_matrix) <- paste0("Gene", 1:20)
+   colnames(counts_matrix) <- paste0("Cell", 1:10)
+ 
+   sce <- SingleCellExperiment(
+     assays = list(
+       counts = counts_matrix,
+       logcounts = log1p(counts_matrix)
+     )
+   )
+   colData(sce)$orig.ident <- rep(c("A", "B"), each = 5)
+   sce
+ }
> 
> # Global mock for basiliskRun to avoid Python execution
> mock_basilisk_run <- function(env, fun, args) {
+   # Return a simple matrix as the scVI embedding
+   embedding <- matrix(
+     runif(ncol(args$sce_object) * 5), nrow = ncol(args$sce_object), ncol = 5
+     )
+   rownames(embedding) <- colnames(args$sce_object)
+   embedding
+ }
> 
> # ------------------------------
> # Enhanced Tests with Real Data
> # ------------------------------
> 
> test_that("DO.scVI works with real SCE data", {
+   skip_if_not(exists("SCE_obj"), "Real SCE data not available")
+ 
+   # Ensure the object has the required structure
+   expect_s4_class(SCE_obj, "SingleCellExperiment")
+   expect_true("counts" %in% assayNames(SCE_obj))
+ 
+   # Add batch information if not present
+   if (!"orig.ident" %in% colnames(colData(SCE_obj))) {
+     colData(SCE_obj)$orig.ident <- rep(c("A", "B"), length.out = ncol(SCE_obj))
+   }
+ 
+   mock_as_seurat <- function(x) {
+     # Create a minimal Seurat object that mimics conversion from real SCE
+     counts_matrix <- assay(x, "counts")
+     seurat_obj <- CreateSeuratObject(counts = counts_matrix)
+     seurat_obj <- NormalizeData(seurat_obj, verbose = FALSE)
+     VariableFeatures(seurat_obj) <-
+       rownames(seurat_obj)[1:min(2000, nrow(seurat_obj))]
+     seurat_obj$orig.ident <- colData(x)$orig.ident
+     seurat_obj
+   }
+ 
+   testthat::with_mocked_bindings(
+     basiliskRun = mock_basilisk_run,
+     code = {
+       mockery::stub(DO.scVI, "as.Seurat", mock_as_seurat)
+       result <- DO.scVI(SCE_obj, batch_key = "orig.ident")
+     },
+     .package = "basilisk"
+   )
+ 
+   expect_s4_class(result, "SingleCellExperiment")
+   expect_true("scVI" %in% reducedDimNames(result))
+ })
── Error: DO.scVI works with real SCE data ─────────────────────────────────────
Error in `eval(code, test_env)`: object 'DO.scVI' not found
Backtrace:
    ▆
 1. ├─testthat::with_mocked_bindings(...)
 2. └─mockery::stub(DO.scVI, "as.Seurat", mock_as_seurat)
 3.   └─mockery:::build_function_tree(test_env, where, where_name, depth)
Error:
! Test failed with 1 failure and 2 successes.
Backtrace:
    ▆
 1. └─testthat::test_that(...)
 2.   └─testthat:::test_code(code, parent.frame())
 3.     ├─withr (local) `<fn>`()
 4.     └─reporter$end_test(context = reporter$.context, test = test)
 5.       └─cli::cli_abort(...)
 6.         └─rlang::abort(...)
Execution halted

DOtools.Rcheck/tests/test-DO.SplitBarGSEA.Rout.fail


R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20

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(DOtools)
> 
> test_that("DO.SplitBarGSEA executes successfully on mock GSEA data", {
+   set.seed(123)
+ 
+   # Create a mock GSEA data frame with proper structure
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(c("enriched", "depleted"), 10),
+     celltype = rep(c("CT1", "CT2"), each = 10),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test that the function runs without errors
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         cutoff = 30,
+         log10_transform = FALSE,
+         figsize = c(8,6),
+         topN = 5,
+         colors_pairs = c("red", "blue"),
+         alpha_colors = 0.5,
+         path = NULL,
+         spacing = 5,
+         txt_size = 10,
+         filename = "test.svg",
+         title = "Test Split Bar Plot",
+         showP = FALSE,
+         celltype = "all"
+       )
+     }),
+     NA  # Expect no error
+   )
+ })
Using Python: /Users/biocbuild/.pyenv/versions/3.11.14/bin/python3.11
Creating virtual environment '/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env' ... 
Done!
Installing packages: pip, wheel, setuptools
Requirement already satisfied: pip in /private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages (24.0)
Collecting pip
  Using cached pip-26.0.1-py3-none-any.whl.metadata (4.7 kB)
Collecting wheel
  Using cached wheel-0.46.3-py3-none-any.whl.metadata (2.4 kB)
Requirement already satisfied: setuptools in /private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages (79.0.1)
Collecting setuptools
  Using cached setuptools-82.0.0-py3-none-any.whl.metadata (6.6 kB)
Collecting packaging>=24.0 (from wheel)
  Using cached packaging-26.0-py3-none-any.whl.metadata (3.3 kB)
Using cached pip-26.0.1-py3-none-any.whl (1.8 MB)
Using cached wheel-0.46.3-py3-none-any.whl (30 kB)
Using cached setuptools-82.0.0-py3-none-any.whl (1.0 MB)
Using cached packaging-26.0-py3-none-any.whl (74 kB)
Installing collected packages: setuptools, pip, packaging, wheel
  Attempting uninstall: setuptools
    Found existing installation: setuptools 79.0.1
    Uninstalling setuptools-79.0.1:
      Successfully uninstalled setuptools-79.0.1
  Attempting uninstall: pip
    Found existing installation: pip 24.0
    Uninstalling pip-24.0:
      Successfully uninstalled pip-24.0
Successfully installed packaging-26.0 pip-26.0.1 setuptools-82.0.0 wheel-0.46.3
Installing packages: 'scvi-tools==1.3.0', 'celltypist==1.6.3', 'scanpro==0.3.2', 'scipy==1.15.3', 'scib==1.1.7'
Collecting scvi-tools==1.3.0
  Using cached scvi_tools-1.3.0-py3-none-any.whl.metadata (19 kB)
Collecting celltypist==1.6.3
  Using cached celltypist-1.6.3-py3-none-any.whl.metadata (43 kB)
Collecting scanpro==0.3.2
  Using cached scanpro-0.3.2-py3-none-any.whl
Collecting scipy==1.15.3
  Using cached scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl.metadata (61 kB)
Collecting scib==1.1.7
  Downloading scib-1.1.7-1-py3-none-any.whl.metadata (9.8 kB)
Collecting anndata>=0.11 (from scvi-tools==1.3.0)
  Using cached anndata-0.12.10-py3-none-any.whl.metadata (9.9 kB)
Collecting docrep>=0.3.2 (from scvi-tools==1.3.0)
  Using cached docrep-0.3.2-py3-none-any.whl
Collecting flax (from scvi-tools==1.3.0)
  Downloading flax-0.12.4-py3-none-any.whl.metadata (11 kB)
Collecting jax<=0.4.35 (from scvi-tools==1.3.0)
  Using cached jax-0.4.35-py3-none-any.whl.metadata (22 kB)
Collecting jaxlib<=0.4.35 (from scvi-tools==1.3.0)
  Using cached jaxlib-0.4.35-cp311-cp311-macosx_10_14_x86_64.whl.metadata (983 bytes)
Collecting lightning>=2.0 (from scvi-tools==1.3.0)
  Downloading lightning-2.6.1-py3-none-any.whl.metadata (44 kB)
Collecting ml-collections>=0.1.1 (from scvi-tools==1.3.0)
  Using cached ml_collections-1.1.0-py3-none-any.whl.metadata (22 kB)
Collecting mudata>=0.1.2 (from scvi-tools==1.3.0)
  Downloading mudata-0.3.3-py3-none-any.whl.metadata (10 kB)
Collecting numba>=0.60.0 (from scvi-tools==1.3.0)
  Downloading numba-0.64.0.tar.gz (2.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.8/2.8 MB 48.1 MB/s  0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting numpy (from scvi-tools==1.3.0)
  Using cached numpy-2.4.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (6.6 kB)
Collecting numpyro>=0.12.1 (from scvi-tools==1.3.0)
  Downloading numpyro-0.20.0-py3-none-any.whl.metadata (37 kB)
Collecting optax (from scvi-tools==1.3.0)
  Downloading optax-0.2.7-py3-none-any.whl.metadata (7.9 kB)
Collecting pandas (from scvi-tools==1.3.0)
  Using cached pandas-3.0.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (79 kB)
Collecting pyro-ppl>=1.6.0 (from scvi-tools==1.3.0)
  Using cached pyro_ppl-1.9.1-py3-none-any.whl.metadata (7.8 kB)
Collecting rich>=12.0.0 (from scvi-tools==1.3.0)
  Using cached rich-14.3.3-py3-none-any.whl.metadata (18 kB)
Collecting scikit-learn>=0.21.2 (from scvi-tools==1.3.0)
  Using cached scikit_learn-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (11 kB)
Collecting sparse>=0.14.0 (from scvi-tools==1.3.0)
  Downloading sparse-0.18.0-py2.py3-none-any.whl.metadata (5.3 kB)
Collecting tensorboard>=2.0 (from scvi-tools==1.3.0)
  Using cached tensorboard-2.20.0-py3-none-any.whl.metadata (1.8 kB)
Collecting torch (from scvi-tools==1.3.0)
  Using cached torch-2.2.2-cp311-none-macosx_10_9_x86_64.whl.metadata (25 kB)
Collecting torchmetrics>=0.11.0 (from scvi-tools==1.3.0)
  Using cached torchmetrics-1.8.2-py3-none-any.whl.metadata (22 kB)
Collecting tqdm (from scvi-tools==1.3.0)
  Using cached tqdm-4.67.3-py3-none-any.whl.metadata (57 kB)
Collecting xarray>=2023.2.0 (from scvi-tools==1.3.0)
  Downloading xarray-2026.2.0-py3-none-any.whl.metadata (12 kB)
Collecting openpyxl>=3.0.4 (from celltypist==1.6.3)
  Using cached openpyxl-3.1.5-py2.py3-none-any.whl.metadata (2.5 kB)
Collecting click>=7.1.2 (from celltypist==1.6.3)
  Using cached click-8.3.1-py3-none-any.whl.metadata (2.6 kB)
Collecting requests>=2.23.0 (from celltypist==1.6.3)
  Using cached requests-2.32.5-py3-none-any.whl.metadata (4.9 kB)
Collecting scanpy>=1.7.0 (from celltypist==1.6.3)
  Using cached scanpy-1.11.5-py3-none-any.whl.metadata (9.3 kB)
Collecting leidenalg>=0.9.0 (from celltypist==1.6.3)
  Using cached leidenalg-0.11.0-cp38-abi3-macosx_10_9_x86_64.whl.metadata (10 kB)
Collecting statsmodels (from scanpro==0.3.2)
  Using cached statsmodels-0.14.6-cp311-cp311-macosx_10_9_x86_64.whl.metadata (9.5 kB)
Collecting matplotlib (from scanpro==0.3.2)
  Using cached matplotlib-3.10.8-cp311-cp311-macosx_10_12_x86_64.whl.metadata (52 kB)
Collecting numpy (from scvi-tools==1.3.0)
  Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl.metadata (61 kB)
Collecting seaborn (from scanpro==0.3.2)
  Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Collecting patsy (from scanpro==0.3.2)
  Using cached patsy-1.0.2-py2.py3-none-any.whl.metadata (3.6 kB)
Collecting h5py (from scib==1.1.7)
  Using cached h5py-3.15.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (3.0 kB)
Collecting scikit-misc (from scib==1.1.7)
  Downloading scikit_misc-0.5.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (5.0 kB)
Collecting umap-learn (from scib==1.1.7)
  Using cached umap_learn-0.5.11-py3-none-any.whl.metadata (26 kB)
Collecting pydot (from scib==1.1.7)
  Using cached pydot-4.0.1-py3-none-any.whl.metadata (11 kB)
Collecting igraph>=0.10 (from scib==1.1.7)
  Using cached igraph-1.0.0-cp39-abi3-macosx_10_15_x86_64.whl.metadata (4.4 kB)
Collecting llvmlite (from scib==1.1.7)
  Downloading llvmlite-0.46.0.tar.gz (193 kB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting deprecated (from scib==1.1.7)
  Using cached deprecated-1.3.1-py2.py3-none-any.whl.metadata (5.9 kB)
Collecting ml-dtypes>=0.4.0 (from jax<=0.4.35->scvi-tools==1.3.0)
  Using cached ml_dtypes-0.5.4-cp311-cp311-macosx_10_9_universal2.whl.metadata (8.9 kB)
Collecting opt-einsum (from jax<=0.4.35->scvi-tools==1.3.0)
  Using cached opt_einsum-3.4.0-py3-none-any.whl.metadata (6.3 kB)
Collecting array-api-compat>=1.7.1 (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached array_api_compat-1.13.0-py3-none-any.whl.metadata (2.5 kB)
Collecting legacy-api-wrap (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached legacy_api_wrap-1.5-py3-none-any.whl.metadata (2.2 kB)
Collecting natsort (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached natsort-8.4.0-py3-none-any.whl.metadata (21 kB)
Requirement already satisfied: packaging>=24.2 in /private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages (from anndata>=0.11->scvi-tools==1.3.0) (26.0)
Collecting pandas (from scvi-tools==1.3.0)
  Using cached pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl.metadata (91 kB)
Collecting zarr!=3.0.*,>=2.18.7 (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached zarr-3.1.5-py3-none-any.whl.metadata (10 kB)
Collecting python-dateutil>=2.8.2 (from pandas->scvi-tools==1.3.0)
  Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz>=2020.1 (from pandas->scvi-tools==1.3.0)
  Using cached pytz-2025.2-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas->scvi-tools==1.3.0)
  Using cached tzdata-2025.3-py2.py3-none-any.whl.metadata (1.4 kB)
Collecting six (from docrep>=0.3.2->scvi-tools==1.3.0)
  Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
Collecting texttable>=1.6.2 (from igraph>=0.10->scib==1.1.7)
  Using cached texttable-1.7.0-py2.py3-none-any.whl.metadata (9.8 kB)
Collecting PyYAML<8.0,>5.4 (from lightning>=2.0->scvi-tools==1.3.0)
  Using cached pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl.metadata (2.4 kB)
Collecting fsspec<2028.0,>=2022.5.0 (from fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached fsspec-2026.2.0-py3-none-any.whl.metadata (10 kB)
Collecting lightning-utilities<2.0,>=0.10.0 (from lightning>=2.0->scvi-tools==1.3.0)
  Using cached lightning_utilities-0.15.2-py3-none-any.whl.metadata (5.7 kB)
Collecting typing-extensions<6.0,>4.5.0 (from lightning>=2.0->scvi-tools==1.3.0)
  Using cached typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)
Collecting pytorch-lightning (from lightning>=2.0->scvi-tools==1.3.0)
  Downloading pytorch_lightning-2.6.1-py3-none-any.whl.metadata (21 kB)
Collecting aiohttp!=4.0.0a0,!=4.0.0a1 (from fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached aiohttp-3.13.3-cp311-cp311-macosx_10_9_x86_64.whl.metadata (8.1 kB)
Requirement already satisfied: setuptools in /private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages (from lightning-utilities<2.0,>=0.10.0->lightning>=2.0->scvi-tools==1.3.0) (82.0.0)
Collecting filelock (from torch->scvi-tools==1.3.0)
  Downloading filelock-3.24.3-py3-none-any.whl.metadata (2.0 kB)
Collecting sympy (from torch->scvi-tools==1.3.0)
  Using cached sympy-1.14.0-py3-none-any.whl.metadata (12 kB)
Collecting networkx (from torch->scvi-tools==1.3.0)
  Using cached networkx-3.6.1-py3-none-any.whl.metadata (6.8 kB)
Collecting jinja2 (from torch->scvi-tools==1.3.0)
  Using cached jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)
Collecting aiohappyeyeballs>=2.5.0 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached aiohappyeyeballs-2.6.1-py3-none-any.whl.metadata (5.9 kB)
Collecting aiosignal>=1.4.0 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached aiosignal-1.4.0-py3-none-any.whl.metadata (3.7 kB)
Collecting attrs>=17.3.0 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached attrs-25.4.0-py3-none-any.whl.metadata (10 kB)
Collecting frozenlist>=1.1.1 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (20 kB)
Collecting multidict<7.0,>=4.5 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (5.3 kB)
Collecting propcache>=0.2.0 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (13 kB)
Collecting yarl<2.0,>=1.17.0 (from aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (75 kB)
Collecting idna>=2.0 (from yarl<2.0,>=1.17.0->aiohttp!=4.0.0a0,!=4.0.0a1->fsspec[http]<2028.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached idna-3.11-py3-none-any.whl.metadata (8.4 kB)
Collecting absl-py (from ml-collections>=0.1.1->scvi-tools==1.3.0)
  Downloading absl_py-2.4.0-py3-none-any.whl.metadata (3.3 kB)
Collecting session-info2 (from mudata>=0.1.2->scvi-tools==1.3.0)
  Using cached session_info2-0.4-py3-none-any.whl.metadata (3.5 kB)
INFO: pip is looking at multiple versions of numpyro to determine which version is compatible with other requirements. This could take a while.
Collecting numpyro>=0.12.1 (from scvi-tools==1.3.0)
  Using cached numpyro-0.19.0-py3-none-any.whl.metadata (37 kB)
Collecting multipledispatch (from numpyro>=0.12.1->scvi-tools==1.3.0)
  Using cached multipledispatch-1.0.0-py3-none-any.whl.metadata (3.8 kB)
Collecting et-xmlfile (from openpyxl>=3.0.4->celltypist==1.6.3)
  Using cached et_xmlfile-2.0.0-py3-none-any.whl.metadata (2.7 kB)
Collecting pyro-api>=0.1.1 (from pyro-ppl>=1.6.0->scvi-tools==1.3.0)
  Using cached pyro_api-0.1.2-py3-none-any.whl.metadata (2.5 kB)
Collecting charset_normalizer<4,>=2 (from requests>=2.23.0->celltypist==1.6.3)
  Using cached charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl.metadata (37 kB)
Collecting urllib3<3,>=1.21.1 (from requests>=2.23.0->celltypist==1.6.3)
  Using cached urllib3-2.6.3-py3-none-any.whl.metadata (6.9 kB)
Collecting certifi>=2017.4.17 (from requests>=2.23.0->celltypist==1.6.3)
  Downloading certifi-2026.1.4-py3-none-any.whl.metadata (2.5 kB)
Collecting markdown-it-py>=2.2.0 (from rich>=12.0.0->scvi-tools==1.3.0)
  Using cached markdown_it_py-4.0.0-py3-none-any.whl.metadata (7.3 kB)
Collecting pygments<3.0.0,>=2.13.0 (from rich>=12.0.0->scvi-tools==1.3.0)
  Using cached pygments-2.19.2-py3-none-any.whl.metadata (2.5 kB)
Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich>=12.0.0->scvi-tools==1.3.0)
  Using cached mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)
Collecting joblib (from scanpy>=1.7.0->celltypist==1.6.3)
  Using cached joblib-1.5.3-py3-none-any.whl.metadata (5.5 kB)
Collecting pynndescent>=0.5.13 (from scanpy>=1.7.0->celltypist==1.6.3)
  Using cached pynndescent-0.6.0-py3-none-any.whl.metadata (6.9 kB)
Collecting contourpy>=1.0.1 (from matplotlib->scanpro==0.3.2)
  Using cached contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl.metadata (5.5 kB)
Collecting cycler>=0.10 (from matplotlib->scanpro==0.3.2)
  Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib->scanpro==0.3.2)
  Using cached fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (114 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib->scanpro==0.3.2)
  Using cached kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl.metadata (6.3 kB)
Collecting pillow>=8 (from matplotlib->scanpro==0.3.2)
  Using cached pillow-12.1.1-cp311-cp311-macosx_10_10_x86_64.whl.metadata (8.8 kB)
Collecting pyparsing>=3 (from matplotlib->scanpro==0.3.2)
  Using cached pyparsing-3.3.2-py3-none-any.whl.metadata (5.8 kB)
Collecting threadpoolctl>=3.2.0 (from scikit-learn>=0.21.2->scvi-tools==1.3.0)
  Using cached threadpoolctl-3.6.0-py3-none-any.whl.metadata (13 kB)
Collecting grpcio>=1.48.2 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Downloading grpcio-1.78.1-cp311-cp311-macosx_11_0_universal2.whl.metadata (3.8 kB)
Collecting markdown>=2.6.8 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Downloading markdown-3.10.2-py3-none-any.whl.metadata (5.1 kB)
Collecting protobuf!=4.24.0,>=3.19.6 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Downloading protobuf-6.33.5-cp39-abi3-macosx_10_9_universal2.whl.metadata (593 bytes)
Collecting tensorboard-data-server<0.8.0,>=0.7.0 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Using cached tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl.metadata (1.1 kB)
Collecting werkzeug>=1.0.1 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Downloading werkzeug-3.1.6-py3-none-any.whl.metadata (4.0 kB)
Collecting markupsafe>=2.1.1 (from werkzeug>=1.0.1->tensorboard>=2.0->scvi-tools==1.3.0)
  Using cached markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl.metadata (2.7 kB)
Collecting donfig>=0.8 (from zarr!=3.0.*,>=2.18.7->anndata>=0.11->scvi-tools==1.3.0)
  Using cached donfig-0.8.1.post1-py3-none-any.whl.metadata (5.0 kB)
Collecting google-crc32c>=1.5 (from zarr!=3.0.*,>=2.18.7->anndata>=0.11->scvi-tools==1.3.0)
  Downloading google_crc32c-1.8.0-cp311-cp311-macosx_12_0_x86_64.whl.metadata (1.7 kB)
Collecting numcodecs>=0.14 (from zarr!=3.0.*,>=2.18.7->anndata>=0.11->scvi-tools==1.3.0)
  Using cached numcodecs-0.16.5-cp311-cp311-macosx_10_13_x86_64.whl.metadata (3.4 kB)
Collecting wrapt<3,>=1.10 (from deprecated->scib==1.1.7)
  Using cached wrapt-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (7.4 kB)
INFO: pip is looking at multiple versions of flax to determine which version is compatible with other requirements. This could take a while.
Collecting flax (from scvi-tools==1.3.0)
  Downloading flax-0.12.3-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.12.2-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.12.1-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.12.0-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.11.2-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.11.1-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.11.0-py3-none-any.whl.metadata (11 kB)
INFO: pip is still looking at multiple versions of flax to determine which version is compatible with other requirements. This could take a while.
  Using cached flax-0.10.7-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.10.6-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.10.5-py3-none-any.whl.metadata (11 kB)
  Using cached flax-0.10.4-py3-none-any.whl.metadata (11 kB)
Collecting msgpack (from flax->scvi-tools==1.3.0)
  Using cached msgpack-1.1.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (8.1 kB)
Collecting orbax-checkpoint (from flax->scvi-tools==1.3.0)
  Downloading orbax_checkpoint-0.11.33-py3-none-any.whl.metadata (2.7 kB)
Collecting tensorstore (from flax->scvi-tools==1.3.0)
  Downloading tensorstore-0.1.81-cp311-cp311-macosx_10_14_x86_64.whl.metadata (3.3 kB)
Collecting treescope>=0.1.7 (from flax->scvi-tools==1.3.0)
  Using cached treescope-0.1.10-py3-none-any.whl.metadata (6.6 kB)
INFO: pip is looking at multiple versions of optax to determine which version is compatible with other requirements. This could take a while.
Collecting optax (from scvi-tools==1.3.0)
  Using cached optax-0.2.6-py3-none-any.whl.metadata (7.6 kB)
Collecting chex>=0.1.87 (from optax->scvi-tools==1.3.0)
  Using cached chex-0.1.91-py3-none-any.whl.metadata (18 kB)
Collecting optax (from scvi-tools==1.3.0)
  Using cached optax-0.2.5-py3-none-any.whl.metadata (7.5 kB)
INFO: pip is looking at multiple versions of chex to determine which version is compatible with other requirements. This could take a while.
Collecting chex>=0.1.87 (from optax->scvi-tools==1.3.0)
  Using cached chex-0.1.90-py3-none-any.whl.metadata (18 kB)
Collecting toolz>=0.9.0 (from chex>=0.1.87->optax->scvi-tools==1.3.0)
  Using cached toolz-1.1.0-py3-none-any.whl.metadata (5.1 kB)
Collecting etils[epath,epy] (from orbax-checkpoint->flax->scvi-tools==1.3.0)
  Using cached etils-1.13.0-py3-none-any.whl.metadata (6.5 kB)
INFO: pip is looking at multiple versions of orbax-checkpoint to determine which version is compatible with other requirements. This could take a while.
Collecting orbax-checkpoint (from flax->scvi-tools==1.3.0)
  Downloading orbax_checkpoint-0.11.32-py3-none-any.whl.metadata (2.5 kB)
  Downloading orbax_checkpoint-0.11.31-py3-none-any.whl.metadata (2.5 kB)
  Using cached orbax_checkpoint-0.11.30-py3-none-any.whl.metadata (2.5 kB)
  Using cached orbax_checkpoint-0.11.28-py3-none-any.whl.metadata (2.4 kB)
  Using cached orbax_checkpoint-0.11.27-py3-none-any.whl.metadata (2.4 kB)
  Using cached orbax_checkpoint-0.11.26-py3-none-any.whl.metadata (2.4 kB)
  Using cached orbax_checkpoint-0.11.25-py3-none-any.whl.metadata (2.3 kB)
INFO: pip is still looking at multiple versions of orbax-checkpoint to determine which version is compatible with other requirements. This could take a while.
  Using cached orbax_checkpoint-0.11.24-py3-none-any.whl.metadata (2.3 kB)
  Using cached orbax_checkpoint-0.11.23-py3-none-any.whl.metadata (2.3 kB)
  Using cached orbax_checkpoint-0.11.22-py3-none-any.whl.metadata (2.3 kB)
  Using cached orbax_checkpoint-0.11.21-py3-none-any.whl.metadata (2.3 kB)
  Using cached orbax_checkpoint-0.11.20-py3-none-any.whl.metadata (2.3 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached orbax_checkpoint-0.11.19-py3-none-any.whl.metadata (2.2 kB)
  Using cached orbax_checkpoint-0.11.18-py3-none-any.whl.metadata (2.2 kB)
  Using cached orbax_checkpoint-0.11.17-py3-none-any.whl.metadata (2.2 kB)
  Using cached orbax_checkpoint-0.11.16-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.15-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.14-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.13-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.12-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.11-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.10-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.9-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.8-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.7-py3-none-any.whl.metadata (2.0 kB)
  Using cached orbax_checkpoint-0.11.6-py3-none-any.whl.metadata (1.9 kB)
  Using cached orbax_checkpoint-0.11.5-py3-none-any.whl.metadata (1.9 kB)
Collecting nest_asyncio (from orbax-checkpoint->flax->scvi-tools==1.3.0)
  Using cached nest_asyncio-1.6.0-py3-none-any.whl.metadata (2.8 kB)
Collecting humanize (from orbax-checkpoint->flax->scvi-tools==1.3.0)
  Downloading humanize-4.15.0-py3-none-any.whl.metadata (7.8 kB)
Collecting simplejson>=3.16.0 (from orbax-checkpoint->flax->scvi-tools==1.3.0)
  Using cached simplejson-3.20.2-cp311-cp311-macosx_10_9_x86_64.whl.metadata (3.4 kB)
Collecting importlib_resources (from etils[epath,epy]->orbax-checkpoint->flax->scvi-tools==1.3.0)
  Using cached importlib_resources-6.5.2-py3-none-any.whl.metadata (3.9 kB)
Collecting zipp (from etils[epath,epy]->orbax-checkpoint->flax->scvi-tools==1.3.0)
  Using cached zipp-3.23.0-py3-none-any.whl.metadata (3.6 kB)
Collecting mpmath<1.4,>=1.1.0 (from sympy->torch->scvi-tools==1.3.0)
  Using cached mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)
Using cached scvi_tools-1.3.0-py3-none-any.whl (503 kB)
Using cached celltypist-1.6.3-py3-none-any.whl (7.3 MB)
Using cached scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl (38.7 MB)
Downloading scib-1.1.7-1-py3-none-any.whl (84 kB)
Using cached jax-0.4.35-py3-none-any.whl (2.2 MB)
Using cached jaxlib-0.4.35-cp311-cp311-macosx_10_14_x86_64.whl (87.9 MB)
Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl (20.6 MB)
Using cached anndata-0.12.10-py3-none-any.whl (176 kB)
Using cached pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl (11.6 MB)
Using cached array_api_compat-1.13.0-py3-none-any.whl (58 kB)
Using cached click-8.3.1-py3-none-any.whl (108 kB)
Using cached h5py-3.15.1-cp311-cp311-macosx_10_9_x86_64.whl (3.4 MB)
Using cached igraph-1.0.0-cp39-abi3-macosx_10_15_x86_64.whl (2.3 MB)
Using cached leidenalg-0.11.0-cp38-abi3-macosx_10_9_x86_64.whl (2.3 MB)
Downloading lightning-2.6.1-py3-none-any.whl (853 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 853.6/853.6 kB 15.4 MB/s  0:00:00
Downloading fsspec-2026.2.0-py3-none-any.whl (202 kB)
Using cached lightning_utilities-0.15.2-py3-none-any.whl (29 kB)
Using cached pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl (185 kB)
Using cached torch-2.2.2-cp311-none-macosx_10_9_x86_64.whl (150.8 MB)
Using cached torchmetrics-1.8.2-py3-none-any.whl (983 kB)
Using cached tqdm-4.67.3-py3-none-any.whl (78 kB)
Using cached typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Using cached aiohttp-3.13.3-cp311-cp311-macosx_10_9_x86_64.whl (499 kB)
Using cached multidict-6.7.1-cp311-cp311-macosx_10_9_x86_64.whl (44 kB)
Using cached yarl-1.22.0-cp311-cp311-macosx_10_9_x86_64.whl (94 kB)
Using cached aiohappyeyeballs-2.6.1-py3-none-any.whl (15 kB)
Using cached aiosignal-1.4.0-py3-none-any.whl (7.5 kB)
Using cached attrs-25.4.0-py3-none-any.whl (67 kB)
Using cached frozenlist-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl (50 kB)
Using cached idna-3.11-py3-none-any.whl (71 kB)
Using cached ml_collections-1.1.0-py3-none-any.whl (76 kB)
Using cached ml_dtypes-0.5.4-cp311-cp311-macosx_10_9_universal2.whl (679 kB)
Downloading mudata-0.3.3-py3-none-any.whl (43 kB)
Using cached numpyro-0.19.0-py3-none-any.whl (370 kB)
Using cached openpyxl-3.1.5-py2.py3-none-any.whl (250 kB)
Using cached propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl (45 kB)
Using cached pyro_ppl-1.9.1-py3-none-any.whl (755 kB)
Using cached opt_einsum-3.4.0-py3-none-any.whl (71 kB)
Using cached pyro_api-0.1.2-py3-none-any.whl (11 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached pytz-2025.2-py2.py3-none-any.whl (509 kB)
Using cached requests-2.32.5-py3-none-any.whl (64 kB)
Using cached charset_normalizer-3.4.4-cp311-cp311-macosx_10_9_universal2.whl (206 kB)
Downloading urllib3-2.6.3-py3-none-any.whl (131 kB)
Downloading certifi-2026.1.4-py3-none-any.whl (152 kB)
Using cached rich-14.3.3-py3-none-any.whl (310 kB)
Using cached pygments-2.19.2-py3-none-any.whl (1.2 MB)
Using cached markdown_it_py-4.0.0-py3-none-any.whl (87 kB)
Using cached mdurl-0.1.2-py3-none-any.whl (10.0 kB)
Using cached scanpy-1.11.5-py3-none-any.whl (2.1 MB)
Using cached legacy_api_wrap-1.5-py3-none-any.whl (10 kB)
Using cached matplotlib-3.10.8-cp311-cp311-macosx_10_12_x86_64.whl (8.3 MB)
Using cached contourpy-1.3.3-cp311-cp311-macosx_10_9_x86_64.whl (288 kB)
Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Using cached fonttools-4.61.1-cp311-cp311-macosx_10_9_x86_64.whl (2.4 MB)
Using cached kiwisolver-1.4.9-cp311-cp311-macosx_10_9_x86_64.whl (66 kB)
Using cached networkx-3.6.1-py3-none-any.whl (2.1 MB)
Using cached patsy-1.0.2-py2.py3-none-any.whl (233 kB)
Using cached pillow-12.1.1-cp311-cp311-macosx_10_10_x86_64.whl (5.3 MB)
Using cached pynndescent-0.6.0-py3-none-any.whl (73 kB)
Using cached joblib-1.5.3-py3-none-any.whl (309 kB)
Using cached pyparsing-3.3.2-py3-none-any.whl (122 kB)
Using cached scikit_learn-1.8.0-cp311-cp311-macosx_10_9_x86_64.whl (8.6 MB)
Using cached seaborn-0.13.2-py3-none-any.whl (294 kB)
Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
Downloading sparse-0.18.0-py2.py3-none-any.whl (151 kB)
Using cached statsmodels-0.14.6-cp311-cp311-macosx_10_9_x86_64.whl (10.1 MB)
Using cached tensorboard-2.20.0-py3-none-any.whl (5.5 MB)
Using cached tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl (4.8 MB)
Downloading absl_py-2.4.0-py3-none-any.whl (135 kB)
Downloading grpcio-1.78.1-cp311-cp311-macosx_11_0_universal2.whl (11.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.8/11.8 MB 60.4 MB/s  0:00:00
Downloading markdown-3.10.2-py3-none-any.whl (108 kB)
Downloading protobuf-6.33.5-cp39-abi3-macosx_10_9_universal2.whl (427 kB)
Using cached texttable-1.7.0-py2.py3-none-any.whl (10 kB)
Using cached threadpoolctl-3.6.0-py3-none-any.whl (18 kB)
Using cached tzdata-2025.3-py2.py3-none-any.whl (348 kB)
Using cached umap_learn-0.5.11-py3-none-any.whl (90 kB)
Downloading werkzeug-3.1.6-py3-none-any.whl (225 kB)
Using cached markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl (11 kB)
Downloading xarray-2026.2.0-py3-none-any.whl (1.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 30.5 MB/s  0:00:00
Using cached zarr-3.1.5-py3-none-any.whl (284 kB)
Using cached donfig-0.8.1.post1-py3-none-any.whl (21 kB)
Downloading google_crc32c-1.8.0-cp311-cp311-macosx_12_0_x86_64.whl (30 kB)
Using cached numcodecs-0.16.5-cp311-cp311-macosx_10_13_x86_64.whl (1.6 MB)
Using cached deprecated-1.3.1-py2.py3-none-any.whl (11 kB)
Downloading wrapt-2.1.1-cp311-cp311-macosx_10_9_x86_64.whl (60 kB)
Using cached et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
Downloading filelock-3.24.3-py3-none-any.whl (24 kB)
Using cached flax-0.10.4-py3-none-any.whl (451 kB)
Using cached treescope-0.1.10-py3-none-any.whl (182 kB)
Using cached jinja2-3.1.6-py3-none-any.whl (134 kB)
Using cached msgpack-1.1.2-cp311-cp311-macosx_10_9_x86_64.whl (82 kB)
Using cached multipledispatch-1.0.0-py3-none-any.whl (12 kB)
Using cached natsort-8.4.0-py3-none-any.whl (38 kB)
Using cached optax-0.2.5-py3-none-any.whl (354 kB)
Using cached chex-0.1.90-py3-none-any.whl (101 kB)
Using cached toolz-1.1.0-py3-none-any.whl (58 kB)
Using cached orbax_checkpoint-0.11.5-py3-none-any.whl (342 kB)
Using cached simplejson-3.20.2-cp311-cp311-macosx_10_9_x86_64.whl (75 kB)
Downloading tensorstore-0.1.81-cp311-cp311-macosx_10_14_x86_64.whl (16.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.5/16.5 MB 33.6 MB/s  0:00:00
Using cached etils-1.13.0-py3-none-any.whl (170 kB)
Downloading humanize-4.15.0-py3-none-any.whl (132 kB)
Using cached importlib_resources-6.5.2-py3-none-any.whl (37 kB)
Using cached nest_asyncio-1.6.0-py3-none-any.whl (5.2 kB)
Using cached pydot-4.0.1-py3-none-any.whl (37 kB)
Downloading pytorch_lightning-2.6.1-py3-none-any.whl (857 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 857.3/857.3 kB 20.1 MB/s  0:00:00
Downloading scikit_misc-0.5.2-cp311-cp311-macosx_10_9_x86_64.whl (163 kB)
Using cached session_info2-0.4-py3-none-any.whl (17 kB)
Using cached sympy-1.14.0-py3-none-any.whl (6.3 MB)
Using cached mpmath-1.3.0-py3-none-any.whl (536 kB)
Using cached zipp-3.23.0-py3-none-any.whl (10 kB)
Building wheels for collected packages: numba, llvmlite
  Building wheel for numba (pyproject.toml): started
  Building wheel for numba (pyproject.toml): finished with status 'done'
  Created wheel for numba: filename=numba-0.64.0-cp311-cp311-macosx_11_0_x86_64.whl size=2685272 sha256=aa46892597ea433e09197dd8c0a522db3f220ffeb637fe2d730e658775a7a95b
  Stored in directory: /Users/biocbuild/Library/Caches/pip/wheels/fd/75/18/6549c10655d03f64a853cfc77b31e8d233c96e5a5bcda80f51
  Building wheel for llvmlite (pyproject.toml): started
  Building wheel for llvmlite (pyproject.toml): finished with status 'error'
  error: subprocess-exited-with-error
  
  × Building wheel for llvmlite (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [42 lines of output]
      /private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/_vendor/wheel/bdist_wheel.py:4: FutureWarning: The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command, and will be removed in a future release. Please update to setuptools v70.1 or later which contains an integrated version of this command.
        warn(
      running bdist_wheel
      Traceback (most recent call last):
        File "/private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/cache/basilisk/1.22.0/DOtools/1.0.2/DOtools_env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel
          return _build_backend().build_wheel(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 441, in build_wheel
          return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 429, in _build
          return self._build_with_temp_dir(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 410, in _build_with_temp_dir
          self.run_setup()
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 520, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 187, in <module>
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 117, in setup
          return distutils.core.setup(**attrs)  # type: ignore[return-value]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 186, in setup
          return run_commands(dist)
                 ^^^^^^^^^^^^^^^^^^
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 202, in run_commands
          dist.run_commands()
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1000, in run_commands
          self.run_command(cmd)
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1107, in run_command
          super().run_command(command)
        File "/private/tmp/pip-build-env-hhlnwa93/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 1019, in run_command
          cmd_obj.run()
        File "<string>", line 149, in run
        File "<string>", line 67, in build_library_files
      TypeError: spawn() got an unexpected keyword argument 'dry_run'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llvmlite
Successfully built numba
Failed to build llvmlite
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> llvmlite
── Failure: DO.SplitBarGSEA executes successfully on mock GSEA data ────────────
`suppressMessages(...)` threw an error.
Message: Error installing package(s): "'scvi-tools==1.3.0'", "'celltypist==1.6.3'", "'scanpro==0.3.2'", "'scipy==1.15.3'", "'scib==1.1.7'"
Class:   simpleError/error/condition
Backtrace:
     ▆
  1. ├─testthat::expect_error(...)
  2. │ └─testthat:::quasi_capture(...)
  3. │   ├─testthat (local) .capture(...)
  4. │   │ └─base::withCallingHandlers(...)
  5. │   └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
  6. ├─base::suppressMessages(...)
  7. │ └─base::withCallingHandlers(...)
  8. └─DOtools::DO.SplitBarGSEA(...)
  9.   └─basilisk::basiliskRun(...)
 10.     └─basilisk::basiliskStart(...)
 11.       └─basilisk::obtainEnvironmentPath(env)
 12.         └─basilisk::setupBasiliskEnv(...)
 13.           └─reticulate::virtualenv_create(...)
 14.             └─reticulate:::pip_install(python, packages)
Error:
! Test failed with 1 failure and 0 successes.
Backtrace:
    ▆
 1. └─testthat::test_that(...)
 2.   └─testthat:::test_code(code, parent.frame())
 3.     ├─withr (local) `<fn>`()
 4.     └─reporter$end_test(context = reporter$.context, test = test)
 5.       └─cli::cli_abort(...)
 6.         └─rlang::abort(...)
Execution halted

'R CMD check' output

##############################################################################
##############################################################################
###
### Running command:
###
###   /Library/Frameworks/R.framework/Resources/bin/R CMD check --test-dir=longtests --no-stop-on-test-error --no-codoc --no-examples --no-manual --ignore-vignettes --check-subdirs=no DOtools_1.0.2.tar.gz
###
##############################################################################
##############################################################################


* using log directory ‘/Users/biocbuild/bbs-3.22-bioc-longtests/meat/DOtools.Rcheck’
* using R version 4.5.2 (2025-10-31)
* using platform: x86_64-apple-darwin20
* R was compiled by
    Apple clang version 14.0.0 (clang-1400.0.29.202)
    GNU Fortran (GCC) 14.2.0
* running under: macOS Monterey 12.7.6
* using session charset: UTF-8
* using options ‘--no-codoc --no-examples --no-manual --ignore-vignettes --no-stop-on-test-error’
* checking for file ‘DOtools/DESCRIPTION’ ... OK
* this is package ‘DOtools’ version ‘1.0.2’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... INFO
Imports includes 36 non-default packages.
Importing from so many packages makes the package vulnerable to any of
them becoming unavailable.  Move as many as possible to Suggests and
use conditionally.
* checking if this is a source package ... OK
* checking if there is a namespace ... OK
* checking for hidden files and directories ... NOTE
Found the following hidden files and directories:
  .BBSoptions
These were most likely included in error. See section ‘Package
structure’ in the ‘Writing R Extensions’ manual.
* checking for portable file names ... WARNING
Found the following files with non-portable file names:
  vignettes/DOtools_files/figure-html/Clustering and UMAP-1.png
  vignettes/DOtools_files/figure-html/Clustering and UMAP-2.png
  vignettes/DOtools_files/figure-html/Manual annotation-1.png
  vignettes/DOtools_files/figure-html/Manual annotation-2.png
  vignettes/DOtools_files/figure-html/cell populations-1.png
These are not fully portable file names.
See section ‘Package structure’ in the ‘Writing R Extensions’ manual.
* checking for sufficient/correct file permissions ... OK
* checking whether package ‘DOtools’ can be installed ... OK
* 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 ... 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 whether startup messages can be suppressed ... 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 ... NOTE
.kBET_fct: no visible global function definition for ‘is’
.kBET_fct : ptnorm: no visible global function definition for ‘pnorm’
.kBET_fct : bisect: no visible global function definition for ‘dist’
.kBET_fct : bisect : <anonymous>: no visible global function definition
  for ‘dist’
.kBET_fct: no visible binding for global variable ‘multiNom’
.kBET_fct : <anonymous>: no visible binding for global variable
  ‘multiNom’
DO.Dotplot: no visible binding for global variable ‘id’
Undefined global functions or variables:
  dist id is multiNom pnorm
Consider adding
  importFrom("methods", "is")
  importFrom("stats", "dist", "pnorm")
to your NAMESPACE file (and ensure that your DESCRIPTION Imports field
contains 'methods').
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... SKIPPED
* checking Rd \usage sections ... OK
* checking Rd contents ... OK
* checking for unstated dependencies in examples ... OK
* checking line endings in shell scripts ... OK
* checking files in ‘vignettes’ ... SKIPPED
* checking examples ... SKIPPED
* checking for unstated dependencies in ‘longtests’ ... OK
* checking tests in ‘longtests’ ...
  Running ‘test-DO.BarplotWilcox.R’
  Running ‘test-DO.Dotplot.R’
  Running ‘test-DO.MultiDGE.R’
  Running ‘test-DO.SplitBarGSEA.R’
  Running ‘test-DO.scVI.R’
 ERROR
Running the tests in ‘longtests/test-DO.SplitBarGSEA.R’ failed.
Last 13 lines of output:
   11.       └─basilisk::obtainEnvironmentPath(env)
   12.         └─basilisk::setupBasiliskEnv(...)
   13.           └─reticulate::virtualenv_create(...)
   14.             └─reticulate:::pip_install(python, packages)
  Error:
  ! Test failed with 1 failure and 0 successes.
  Backtrace:
      ▆
   1. └─testthat::test_that(...)
   2.   └─testthat:::test_code(code, parent.frame())
   3.     ├─withr (local) `<fn>`()
   4.     └─reporter$end_test(context = reporter$.context, test = test)
   5.       └─cli::cli_abort(...)
   6.         └─rlang::abort(...)
  Execution halted
Running the tests in ‘longtests/test-DO.scVI.R’ failed.
Last 13 lines of output:
      ▆
   1. ├─testthat::with_mocked_bindings(...)
   2. └─mockery::stub(DO.scVI, "as.Seurat", mock_as_seurat)
   3.   └─mockery:::build_function_tree(test_env, where, where_name, depth)
  Error:
  ! Test failed with 1 failure and 2 successes.
  Backtrace:
      ▆
   1. └─testthat::test_that(...)
   2.   └─testthat:::test_code(code, parent.frame())
   3.     ├─withr (local) `<fn>`()
   4.     └─reporter$end_test(context = reporter$.context, test = test)
   5.       └─cli::cli_abort(...)
   6.         └─rlang::abort(...)
  Execution halted
* DONE

Status: 1 ERROR, 1 WARNING, 2 NOTEs
See
  ‘/Users/biocbuild/bbs-3.22-bioc-longtests/meat/DOtools.Rcheck/00check.log’
for details.


Installation output

DOtools.Rcheck/00install.out

* installing *source* package ‘DOtools’ ...
** this is package ‘DOtools’ version ‘1.0.2’
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
*** copying figures
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (DOtools)