Back to Long Tests report for BioC 3.22

This page was generated on 2025-12-06 23:55 -0500 (Sat, 06 Dec 2025).

HostnameOSArch (*)R versionInstalled pkgs
nebbiolo2Linux (Ubuntu 24.04.3 LTS)x86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4879
merida1macOS 12.7.6 Montereyx86_644.5.2 (2025-10-31) -- "[Not] Part in a Rumble" 4668
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.0  (landing page)
Mariano Ruz Jurado
Snapshot Date: 2025-12-06 09:55 -0500 (Sat, 06 Dec 2025)
git_url: https://git.bioconductor.org/packages/DOtools
git_branch: RELEASE_3_22
git_last_commit: 95a2404
git_last_commit_date: 2025-10-29 11:38:46 -0500 (Wed, 29 Oct 2025)
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.0
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.0.tar.gz
StartedAt: 2025-12-06 16:05:17 -0500 (Sat, 06 Dec 2025)
EndedAt: 2025-12-06 16:20:08 -0500 (Sat, 06 Dec 2025)
EllapsedTime: 891.2 seconds
RetCode: 1
Status:   ERROR  
CheckDir: DOtools.Rcheck
Warnings: NA

Tests output

DOtools.Rcheck/tests/test-DO.BarplotWilcox.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(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
'SeuratObject' was built with package 'Matrix' 1.7.3 but the current
version is 1.7.4; it is recomended that you reinstall 'SeuratObject' as
the ABI for 'Matrix' may have changed

Attaching package: 'SeuratObject'

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

    intersect, t

> library(ggplot2)
> 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

> 
> # 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))
+ })
Performing log-normalization
0%   10   20   30   40   50   60   70   80   90   100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
── Error: DO.BarplotWilcox returns ggplot and list correctly ───────────────────
Error in `DO.BarplotWilcox(sce_object = seurat_obj, Feature = "gene1", ListTest = list(c("A", "B")), returnValues = FALSE, ctrl.condition = "A", group.by = "condition")`: could not find function "DO.BarplotWilcox"
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

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
'SeuratObject' was built with package 'Matrix' 1.7.3 but the current
version is 1.7.4; it is recomended that you reinstall 'SeuratObject' as
the ABI for 'Matrix' 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 
 60.123   1.373  63.343 

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
'SeuratObject' was built with package 'Matrix' 1.7.3 but the current
version is 1.7.4; it is recomended that you reinstall 'SeuratObject' as
the ABI for 'Matrix' 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 
202.248   3.882 212.416 

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
'SeuratObject' was built with package 'Matrix' 1.7.3 but the current
version is 1.7.4; it is recomended that you reinstall 'SeuratObject' as
the ABI for 'Matrix' 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


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.0/DOtools_env' ... 
Done!
Installing packages: pip, wheel, setuptools
Requirement already satisfied: pip in /private/var/cache/basilisk/1.22.0/DOtools/1.0.0/DOtools_env/lib/python3.11/site-packages (24.0)
Collecting pip
  Using cached pip-25.3-py3-none-any.whl.metadata (4.7 kB)
Collecting wheel
  Using cached wheel-0.45.1-py3-none-any.whl.metadata (2.3 kB)
Requirement already satisfied: setuptools in /private/var/cache/basilisk/1.22.0/DOtools/1.0.0/DOtools_env/lib/python3.11/site-packages (79.0.1)
Collecting setuptools
  Using cached setuptools-80.9.0-py3-none-any.whl.metadata (6.6 kB)
Using cached pip-25.3-py3-none-any.whl (1.8 MB)
Using cached wheel-0.45.1-py3-none-any.whl (72 kB)
Using cached setuptools-80.9.0-py3-none-any.whl (1.2 MB)
Installing collected packages: wheel, setuptools, pip
  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 pip-25.3 setuptools-80.9.0 wheel-0.45.1
Installing packages: 'scvi-tools==1.3.0', 'celltypist==1.6.3', 'scanpro==0.3.2', 'scipy==1.15.3'
Collecting scvi-tools==1.3.0
  Downloading scvi_tools-1.3.0-py3-none-any.whl.metadata (19 kB)
Collecting celltypist==1.6.3
  Downloading celltypist-1.6.3-py3-none-any.whl.metadata (43 kB)
Collecting scanpro==0.3.2
  Downloading scanpro-0.3.2.tar.gz (29 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 scipy==1.15.3
  Downloading scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl.metadata (61 kB)
Collecting anndata>=0.11 (from scvi-tools==1.3.0)
  Using cached anndata-0.12.6-py3-none-any.whl.metadata (10.0 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.1-py3-none-any.whl.metadata (11 kB)
Collecting jax<=0.4.35 (from scvi-tools==1.3.0)
  Downloading jax-0.4.35-py3-none-any.whl.metadata (22 kB)
Collecting jaxlib<=0.4.35 (from scvi-tools==1.3.0)
  Downloading 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.0-py3-none-any.whl.metadata (44 kB)
Collecting ml-collections>=0.1.1 (from scvi-tools==1.3.0)
  Downloading 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.2-py3-none-any.whl.metadata (8.4 kB)
Collecting numba>=0.60.0 (from scvi-tools==1.3.0)
  Downloading numba-0.62.1-cp311-cp311-macosx_10_15_x86_64.whl.metadata (2.8 kB)
Collecting numpy (from scvi-tools==1.3.0)
  Downloading numpy-2.3.5-cp311-cp311-macosx_10_9_x86_64.whl.metadata (62 kB)
Collecting numpyro>=0.12.1 (from scvi-tools==1.3.0)
  Downloading numpyro-0.19.0-py3-none-any.whl.metadata (37 kB)
Collecting optax (from scvi-tools==1.3.0)
  Downloading optax-0.2.6-py3-none-any.whl.metadata (7.6 kB)
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 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.2.0-py3-none-any.whl.metadata (18 kB)
Collecting scikit-learn>=0.21.2 (from scvi-tools==1.3.0)
  Using cached scikit_learn-1.7.2-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.17.0-py2.py3-none-any.whl.metadata (5.3 kB)
Collecting tensorboard>=2.0 (from scvi-tools==1.3.0)
  Downloading tensorboard-2.20.0-py3-none-any.whl.metadata (1.8 kB)
Collecting torch (from scvi-tools==1.3.0)
  Downloading 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)
  Downloading torchmetrics-1.8.2-py3-none-any.whl.metadata (22 kB)
Collecting tqdm (from scvi-tools==1.3.0)
  Using cached tqdm-4.67.1-py3-none-any.whl.metadata (57 kB)
Collecting xarray>=2023.2.0 (from scvi-tools==1.3.0)
  Downloading xarray-2025.12.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)
  Downloading 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.7-cp311-cp311-macosx_10_12_x86_64.whl.metadata (11 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 ml-dtypes>=0.4.0 (from jax<=0.4.35->scvi-tools==1.3.0)
  Downloading 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.12.0-py3-none-any.whl.metadata (2.5 kB)
Collecting h5py>=3.8 (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached h5py-3.15.1-cp311-cp311-macosx_10_9_x86_64.whl.metadata (3.0 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)
Collecting packaging>=24.2 (from anndata>=0.11->scvi-tools==1.3.0)
  Using cached packaging-25.0-py3-none-any.whl.metadata (3.3 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 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 igraph<2.0,>=1.0.0 (from leidenalg>=0.9.0->celltypist==1.6.3)
  Using cached igraph-1.0.0-cp39-abi3-macosx_10_15_x86_64.whl.metadata (4.4 kB)
Collecting texttable>=1.6.2 (from igraph<2.0,>=1.0.0->leidenalg>=0.9.0->celltypist==1.6.3)
  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<2027.0,>=2022.5.0 (from fsspec[http]<2027.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached fsspec-2025.12.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)
  Downloading 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.0-py3-none-any.whl.metadata (21 kB)
Collecting aiohttp!=4.0.0a0,!=4.0.0a1 (from fsspec[http]<2027.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached aiohttp-3.13.2-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.0/DOtools_env/lib/python3.11/site-packages (from lightning-utilities<2.0,>=0.10.0->lightning>=2.0->scvi-tools==1.3.0) (80.9.0)
Collecting filelock (from torch->scvi-tools==1.3.0)
  Using cached filelock-3.20.0-py3-none-any.whl.metadata (2.1 kB)
Collecting sympy (from torch->scvi-tools==1.3.0)
  Downloading 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-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]<2027.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]<2027.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]<2027.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]<2027.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]<2027.0,>=2022.5.0->lightning>=2.0->scvi-tools==1.3.0)
  Using cached multidict-6.7.0-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]<2027.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]<2027.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]<2027.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)
  Using cached absl_py-2.3.1-py3-none-any.whl.metadata (3.3 kB)
Collecting llvmlite<0.46,>=0.45.0dev0 (from numba>=0.60.0->scvi-tools==1.3.0)
  Downloading llvmlite-0.45.1-cp311-cp311-macosx_10_15_x86_64.whl.metadata (4.8 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 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.2-py2.py3-none-any.whl.metadata (1.4 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)
  Downloading urllib3-2.6.0-py3-none-any.whl.metadata (6.6 kB)
Collecting certifi>=2017.4.17 (from requests>=2.23.0->celltypist==1.6.3)
  Using cached certifi-2025.11.12-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.2-py3-none-any.whl.metadata (5.6 kB)
Collecting pynndescent>=0.5.13 (from scanpy>=1.7.0->celltypist==1.6.3)
  Using cached pynndescent-0.5.13-py3-none-any.whl.metadata (6.8 kB)
Collecting session-info2 (from scanpy>=1.7.0->celltypist==1.6.3)
  Using cached session_info2-0.2.3-py3-none-any.whl.metadata (3.4 kB)
Collecting umap-learn>=0.5.6 (from scanpy>=1.7.0->celltypist==1.6.3)
  Using cached umap_learn-0.5.9.post2-py3-none-any.whl.metadata (25 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.0-cp311-cp311-macosx_10_9_x86_64.whl.metadata (113 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.0.0-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.2.5-py3-none-any.whl.metadata (5.0 kB)
Collecting threadpoolctl>=3.1.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)
  Using cached grpcio-1.76.0-cp311-cp311-macosx_11_0_universal2.whl.metadata (3.7 kB)
Collecting markdown>=2.6.8 (from tensorboard>=2.0->scvi-tools==1.3.0)
  Using cached markdown-3.10-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.2-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)
  Using cached werkzeug-3.1.4-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.7.1-cp311-cp311-macosx_12_0_x86_64.whl.metadata (2.3 kB)
Collecting numcodecs>=0.14 (from zarr!=3.0.*,>=2.18.7->anndata>=0.11->scvi-tools==1.3.0)
  Downloading numcodecs-0.16.5-cp311-cp311-macosx_10_13_x86_64.whl.metadata (3.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.0-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.11.2-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.11.1-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.11.0-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.10.7-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.10.6-py3-none-any.whl.metadata (11 kB)
  Downloading flax-0.10.5-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.
  Downloading 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.30-py3-none-any.whl.metadata (2.5 kB)
Collecting tensorstore (from flax->scvi-tools==1.3.0)
  Downloading tensorstore-0.1.79-cp311-cp311-macosx_10_14_x86_64.whl.metadata (3.3 kB)
Collecting treescope>=0.1.7 (from flax->scvi-tools==1.3.0)
  Downloading treescope-0.1.10-py3-none-any.whl.metadata (6.6 kB)
Collecting chex>=0.1.87 (from optax->scvi-tools==1.3.0)
  Downloading chex-0.1.91-py3-none-any.whl.metadata (18 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)
  Downloading 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.28-py3-none-any.whl.metadata (2.4 kB)
  Downloading orbax_checkpoint-0.11.27-py3-none-any.whl.metadata (2.4 kB)
  Downloading orbax_checkpoint-0.11.26-py3-none-any.whl.metadata (2.4 kB)
  Downloading orbax_checkpoint-0.11.25-py3-none-any.whl.metadata (2.3 kB)
  Downloading orbax_checkpoint-0.11.24-py3-none-any.whl.metadata (2.3 kB)
  Downloading orbax_checkpoint-0.11.23-py3-none-any.whl.metadata (2.3 kB)
  Downloading orbax_checkpoint-0.11.22-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.
  Downloading 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)
  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)
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.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.14.0-py3-none-any.whl.metadata (7.8 kB)
Collecting simplejson>=3.16.0 (from orbax-checkpoint->flax->scvi-tools==1.3.0)
  Downloading 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)
Downloading scvi_tools-1.3.0-py3-none-any.whl (503 kB)
Downloading celltypist-1.6.3-py3-none-any.whl (7.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.3/7.3 MB 28.9 MB/s  0:00:00
Downloading scipy-1.15.3-cp311-cp311-macosx_10_13_x86_64.whl (38.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 38.7/38.7 MB 22.6 MB/s  0:00:01
Downloading jax-0.4.35-py3-none-any.whl (2.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 10.1 MB/s  0:00:00
Downloading jaxlib-0.4.35-cp311-cp311-macosx_10_14_x86_64.whl (87.9 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 87.9/87.9 MB 22.8 MB/s  0:00:03
Using cached numpy-1.26.4-cp311-cp311-macosx_10_9_x86_64.whl (20.6 MB)
Using cached anndata-0.12.6-py3-none-any.whl (172 kB)
Using cached array_api_compat-1.12.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 leidenalg-0.11.0-cp38-abi3-macosx_10_9_x86_64.whl (2.3 MB)
Using cached igraph-1.0.0-cp39-abi3-macosx_10_15_x86_64.whl (2.3 MB)
Downloading lightning-2.6.0-py3-none-any.whl (845 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 846.0/846.0 kB 3.3 MB/s  0:00:00
Downloading fsspec-2025.12.0-py3-none-any.whl (201 kB)
Downloading lightning_utilities-0.15.2-py3-none-any.whl (29 kB)
Using cached packaging-25.0-py3-none-any.whl (66 kB)
Using cached pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl (185 kB)
Downloading torch-2.2.2-cp311-none-macosx_10_9_x86_64.whl (150.8 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 150.8/150.8 MB 30.7 MB/s  0:00:04
Downloading torchmetrics-1.8.2-py3-none-any.whl (983 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 983.2/983.2 kB 5.7 MB/s  0:00:00
Using cached tqdm-4.67.1-py3-none-any.whl (78 kB)
Using cached typing_extensions-4.15.0-py3-none-any.whl (44 kB)
Using cached aiohttp-3.13.2-cp311-cp311-macosx_10_9_x86_64.whl (497 kB)
Using cached multidict-6.7.0-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)
Downloading ml_collections-1.1.0-py3-none-any.whl (76 kB)
Downloading ml_dtypes-0.5.4-cp311-cp311-macosx_10_9_universal2.whl (679 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 679.7/679.7 kB 4.7 MB/s  0:00:00
Downloading mudata-0.3.2-py3-none-any.whl (41 kB)
Downloading numba-0.62.1-cp311-cp311-macosx_10_15_x86_64.whl (2.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 12.2 MB/s  0:00:00
Downloading llvmlite-0.45.1-cp311-cp311-macosx_10_15_x86_64.whl (43.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.0/43.0 MB 28.4 MB/s  0:00:01
Downloading 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 pandas-2.3.3-cp311-cp311-macosx_10_9_x86_64.whl (11.6 MB)
Using cached propcache-0.4.1-cp311-cp311-macosx_10_9_x86_64.whl (45 kB)
Downloading pyro_ppl-1.9.1-py3-none-any.whl (755 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 756.0/756.0 kB 3.3 MB/s  0:00:00
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.0-py3-none-any.whl (131 kB)
Using cached certifi-2025.11.12-py3-none-any.whl (159 kB)
Using cached rich-14.2.0-py3-none-any.whl (243 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.7-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.0-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-py3-none-any.whl (2.1 MB)
Using cached patsy-1.0.2-py2.py3-none-any.whl (233 kB)
Using cached pillow-12.0.0-cp311-cp311-macosx_10_10_x86_64.whl (5.3 MB)
Using cached pynndescent-0.5.13-py3-none-any.whl (56 kB)
Using cached joblib-1.5.2-py3-none-any.whl (308 kB)
Using cached pyparsing-3.2.5-py3-none-any.whl (113 kB)
Using cached scikit_learn-1.7.2-cp311-cp311-macosx_10_9_x86_64.whl (9.3 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.17.0-py2.py3-none-any.whl (259 kB)
Downloading statsmodels-0.14.6-cp311-cp311-macosx_10_9_x86_64.whl (10.1 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.1/10.1 MB 27.9 MB/s  0:00:00
Downloading tensorboard-2.20.0-py3-none-any.whl (5.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.5/5.5 MB 24.3 MB/s  0:00:00
Using cached tensorboard_data_server-0.7.2-py3-none-macosx_10_9_x86_64.whl (4.8 MB)
Using cached absl_py-2.3.1-py3-none-any.whl (135 kB)
Using cached grpcio-1.76.0-cp311-cp311-macosx_11_0_universal2.whl (11.8 MB)
Using cached markdown-3.10-py3-none-any.whl (107 kB)
Downloading protobuf-6.33.2-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.2-py2.py3-none-any.whl (347 kB)
Using cached umap_learn-0.5.9.post2-py3-none-any.whl (90 kB)
Using cached werkzeug-3.1.4-py3-none-any.whl (224 kB)
Using cached markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl (11 kB)
Downloading xarray-2025.12.0-py3-none-any.whl (1.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 6.2 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.7.1-cp311-cp311-macosx_12_0_x86_64.whl (30 kB)
Downloading numcodecs-0.16.5-cp311-cp311-macosx_10_13_x86_64.whl (1.6 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.6/1.6 MB 7.0 MB/s  0:00:00
Using cached et_xmlfile-2.0.0-py3-none-any.whl (18 kB)
Using cached filelock-3.20.0-py3-none-any.whl (16 kB)
Downloading flax-0.10.4-py3-none-any.whl (451 kB)
Downloading 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)
Downloading optax-0.2.5-py3-none-any.whl (354 kB)
Downloading chex-0.1.90-py3-none-any.whl (101 kB)
Using cached toolz-1.1.0-py3-none-any.whl (58 kB)
Downloading orbax_checkpoint-0.11.5-py3-none-any.whl (342 kB)
Downloading simplejson-3.20.2-cp311-cp311-macosx_10_9_x86_64.whl (75 kB)
Downloading tensorstore-0.1.79-cp311-cp311-macosx_10_14_x86_64.whl (16.5 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.5/16.5 MB 17.9 MB/s  0:00:00
Using cached etils-1.13.0-py3-none-any.whl (170 kB)
Downloading humanize-4.14.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)
Downloading pytorch_lightning-2.6.0-py3-none-any.whl (849 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 849.5/849.5 kB 4.3 MB/s  0:00:00
Using cached session_info2-0.2.3-py3-none-any.whl (16 kB)
Downloading sympy-1.14.0-py3-none-any.whl (6.3 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 22.8 MB/s  0:00:00
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: scanpro
  Building wheel for scanpro (pyproject.toml): started
  Building wheel for scanpro (pyproject.toml): finished with status 'done'
  Created wheel for scanpro: filename=scanpro-0.3.2-py3-none-any.whl size=33230 sha256=90c5e2cd4ffc6faca5eb64653c6e80b0b53bc369e974ad9144c14d8e7858e0f5
  Stored in directory: /Users/biocbuild/Library/Caches/pip/wheels/dd/19/e2/f102bb9bc4ec42206a63e206cd5a49fa09cc549522ff4720d7
Successfully built scanpro
Installing collected packages: texttable, pytz, pyro-api, multipledispatch, mpmath, zipp, urllib3, tzdata, typing-extensions, tqdm, toolz, threadpoolctl, tensorboard-data-server, sympy, six, simplejson, session-info2, PyYAML, pyparsing, pygments, protobuf, propcache, pillow, packaging, opt-einsum, numpy, networkx, nest_asyncio, natsort, multidict, msgpack, mdurl, markupsafe, markdown, llvmlite, legacy-api-wrap, kiwisolver, joblib, importlib_resources, igraph, idna, humanize, google-crc32c, fsspec, frozenlist, fonttools, filelock, etils, et-xmlfile, cycler, click, charset_normalizer, certifi, attrs, array-api-compat, aiohappyeyeballs, absl-py, yarl, werkzeug, treescope, scipy, requests, python-dateutil, patsy, openpyxl, numcodecs, numba, ml-dtypes, ml-collections, markdown-it-py, lightning-utilities, leidenalg, jinja2, h5py, grpcio, donfig, docrep, contourpy, aiosignal, zarr, torch, tensorstore, tensorboard, sparse, scikit-learn, rich, pandas, matplotlib, jaxlib, aiohttp, xarray, torchmetrics, statsmodels, seaborn, pyro-ppl, pynndescent, jax, anndata, umap-learn, scanpro, pytorch-lightning, orbax-checkpoint, numpyro, mudata, chex, scanpy, optax, lightning, flax, celltypist, scvi-tools

Successfully installed PyYAML-6.0.3 absl-py-2.3.1 aiohappyeyeballs-2.6.1 aiohttp-3.13.2 aiosignal-1.4.0 anndata-0.12.6 array-api-compat-1.12.0 attrs-25.4.0 celltypist-1.6.3 certifi-2025.11.12 charset_normalizer-3.4.4 chex-0.1.90 click-8.3.1 contourpy-1.3.3 cycler-0.12.1 docrep-0.3.2 donfig-0.8.1.post1 et-xmlfile-2.0.0 etils-1.13.0 filelock-3.20.0 flax-0.10.4 fonttools-4.61.0 frozenlist-1.8.0 fsspec-2025.12.0 google-crc32c-1.7.1 grpcio-1.76.0 h5py-3.15.1 humanize-4.14.0 idna-3.11 igraph-1.0.0 importlib_resources-6.5.2 jax-0.4.35 jaxlib-0.4.35 jinja2-3.1.6 joblib-1.5.2 kiwisolver-1.4.9 legacy-api-wrap-1.5 leidenalg-0.11.0 lightning-2.6.0 lightning-utilities-0.15.2 llvmlite-0.45.1 markdown-3.10 markdown-it-py-4.0.0 markupsafe-3.0.3 matplotlib-3.10.7 mdurl-0.1.2 ml-collections-1.1.0 ml-dtypes-0.5.4 mpmath-1.3.0 msgpack-1.1.2 mudata-0.3.2 multidict-6.7.0 multipledispatch-1.0.0 natsort-8.4.0 nest_asyncio-1.6.0 networkx-3.6 numba-0.62.1 numcodecs-0.16.5 numpy-1.26.4 numpyro-0.19.0 openpyxl-3.1.5 opt-einsum-3.4.0 optax-0.2.5 orbax-checkpoint-0.11.5 packaging-25.0 pandas-2.3.3 patsy-1.0.2 pillow-12.0.0 propcache-0.4.1 protobuf-6.33.2 pygments-2.19.2 pynndescent-0.5.13 pyparsing-3.2.5 pyro-api-0.1.2 pyro-ppl-1.9.1 python-dateutil-2.9.0.post0 pytorch-lightning-2.6.0 pytz-2025.2 requests-2.32.5 rich-14.2.0 scanpro-0.3.2 scanpy-1.11.5 scikit-learn-1.7.2 scipy-1.15.3 scvi-tools-1.3.0 seaborn-0.13.2 session-info2-0.2.3 simplejson-3.20.2 six-1.17.0 sparse-0.17.0 statsmodels-0.14.6 sympy-1.14.0 tensorboard-2.20.0 tensorboard-data-server-0.7.2 tensorstore-0.1.79 texttable-1.7.0 threadpoolctl-3.6.0 toolz-1.1.0 torch-2.2.2 torchmetrics-1.8.2 tqdm-4.67.1 treescope-0.1.10 typing-extensions-4.15.0 tzdata-2025.2 umap-learn-0.5.9.post2 urllib3-2.6.0 werkzeug-3.1.4 xarray-2025.12.0 yarl-1.22.0 zarr-3.1.5 zipp-3.23.0
Virtual environment '/var/cache/basilisk/1.22.0/DOtools/1.0.0/DOtools_env' successfully created.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
2025-12-06 16:19:50.761 R[84299:95727457] XType: com.apple.fonts is not accessible.
2025-12-06 16:19:50.762 R[84299:95727457] XType: XTFontStaticRegistry is enabled.
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles missing celltype column", {
+   set.seed(123)
+ 
+   # Create mock data without celltype column
+   df_GSEA_no_celltype <- data.frame(
+     Term = paste0("GO_Term_", 1:10),
+     Combined.Score = runif(10, 1, 10),
+     State = rep(c("enriched", "depleted"), 5),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test that function throws error when celltype column is missing
+   expect_error(
+     DO.SplitBarGSEA(
+       df_GSEA = df_GSEA_no_celltype,
+       term_col = "Term",
+       col_split = "Combined.Score",
+       cond_col = "State",
+       pos_cond = "enriched"
+     ),
+     "Provided data frame has no column named 'celltype'"
+   )
+ })
Test passed with 1 success 🌈.
> 
> test_that("DO.SplitBarGSEA handles single celltype subsetting", {
+   set.seed(123)
+ 
+   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", "CT3", "CT4"), each = 5),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with single celltype (avoiding the vector bug)
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         celltype = "CT1",  # Single celltype only
+         topN = 2
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles log10 transformation with safe data", {
+   set.seed(123)
+ 
+   # Create balanced data with enough terms for each condition
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:40),
+     Combined.Score = runif(40, 0.001, 0.1),
+     State = rep(rep(c("enriched", "depleted"), each = 10), 2),
+     celltype = rep(c("CT1", "CT2"), each = 20),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with log10_transform = TRUE and conservative topN
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         log10_transform = TRUE,
+         topN = 5
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 🎊.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
Assuming col_split contains Pvals, apply -log10 transformation
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
Assuming col_split contains Pvals, apply -log10 transformation
> 
> test_that("DO.SplitBarGSEA handles different topN values with balanced data", {
+   set.seed(123)
+ 
+   # Create data with exactly equal numbers for each condition
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:40),
+     Combined.Score = runif(40, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 10), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with topN = 3
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 🎊.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles different cutoff values", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("Very_Long_GO_Term_Name_That_Needs_Wrapping_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with small cutoff for text wrapping
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         cutoff = 10,
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles showP parameter", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with showP = FALSE (no plot shown)
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         showP = FALSE,  # This won't call plt.show()
+         topN = 3
+       )
+     }),
+     NA
+   )
+ 
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles file saving parameters", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Create temporary directory for testing file output
+   temp_dir <- tempdir()
+ 
+   # Test with path provided - just test that it runs without error
+   # File creation might not work in test environment due to Python backend issues
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         path = temp_dir,
+         filename = "test_output.svg",
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles different color parameters", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with different color pairs
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         colors_pairs = c("green", "orange"),
+         alpha_colors = 0.8,
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles single celltype", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "Single_CT",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with only one celltype
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles empty dataframe after filtering", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:10),
+     Combined.Score = runif(10, 1, 10),
+     State = rep(c("enriched", "depleted"), 5),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with celltype that doesn't exist
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         celltype = "NonExistent_CT"
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 🌈.
> 
> test_that("DO.SplitBarGSEA returns NULL invisibly", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   result <- suppressMessages({
+     DO.SplitBarGSEA(
+       df_GSEA = df_GSEA,
+       term_col = "Term",
+       col_split = "Combined.Score",
+       cond_col = "State",
+       pos_cond = "enriched",
+       topN = 3
+     )
+   })
+ 
+   # The function should return NULL invisibly
+   expect_null(result)
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles minimal parameters with safe data", {
+   set.seed(123)
+ 
+   # Create well-balanced data for minimal parameters test
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:40),
+     Combined.Score = runif(40, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 10), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with only required parameters and safe implicit topN
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched"
+         # Using default topN=10
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 🎊.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles edge case with very small topN", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:20),
+     Combined.Score = runif(20, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 2),
+     celltype = "CT1",
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with topN = 1
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         topN = 1
+       )
+     }),
+     NA
+   )
+ })
Test passed with 1 success 😀.
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
> 
> test_that("DO.SplitBarGSEA handles multiple celltypes with 'all'", {
+   set.seed(123)
+ 
+   df_GSEA <- data.frame(
+     Term = paste0("GO_Term_", 1:40),
+     Combined.Score = runif(40, 1, 10),
+     State = rep(rep(c("enriched", "depleted"), each = 5), 4),
+     celltype = rep(c("CT1", "CT2", "CT3", "CT4"), each = 10),
+     stringsAsFactors = FALSE
+   )
+ 
+   # Test with celltype = "all"
+   expect_error(
+     suppressMessages({
+       DO.SplitBarGSEA(
+         df_GSEA = df_GSEA,
+         term_col = "Term",
+         col_split = "Combined.Score",
+         cond_col = "State",
+         pos_cond = "enriched",
+         celltype = "all",
+         topN = 3
+       )
+     }),
+     NA
+   )
+ })
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
!!! Assuming GO Terms are preprocessed (Only Significant terms included)
Test passed with 1 success 🎊.
> 
> # Test for the specific bug with vector celltype parameter
> test_that("DO.SplitBarGSEA fails gracefully with vector celltype (known bug)", {
+   set.seed(123)
+ 
+   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
+   )
+ 
+ 
+   expect_error(
+     DO.SplitBarGSEA(
+       df_GSEA = df_GSEA,
+       term_col = "Term",
+       col_split = "Combined.Score",
+       cond_col = "State",
+       pos_cond = "enriched",
+       celltype = c("CT1", "CT2")
+     )
+   )
+ })
Test passed with 1 success 😀.
> 
> proc.time()
   user  system elapsed 
115.861  28.663 228.918 

'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.0.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.0’
* package encoding: UTF-8
* checking package namespace information ... OK
* checking package dependencies ... INFO
Imports includes 35 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 ... OK
* checking Rd files ... OK
* checking Rd metadata ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... 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.BarplotWilcox.R’ failed.
Last 13 lines of output:
  [----|----|----|----|----|----|----|----|----|----|
  **************************************************|
  ── Error: DO.BarplotWilcox returns ggplot and list correctly ───────────────────
  Error in `DO.BarplotWilcox(sce_object = seurat_obj, Feature = "gene1", ListTest = list(c("A", "B")), returnValues = FALSE, ctrl.condition = "A", group.by = "condition")`: could not find function "DO.BarplotWilcox"
  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, 1 NOTE
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.0’
** 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)