# Introduction to StatescopeR

# Introduction

StatescopeR is an R wrapper around Statescope, a computational framework designed to discover cell states from cell type-specific gene expression profiles inferred from bulk RNAseq profiles. StatescopeR executes the three following steps consecutively: 1) Single cell RNAseq reference-based deconvolution 2) Refinement of inferred cell type-specific gene expression profiles 3) Cell state discovery. In addition to bulk RNAseq and a single cell RNAseq (scRNAseq) reference, StatescopeR can integrate prior expectations of (groups of) cell fractions in the bulk RNAseq. For example tumor fractions estimated by DNA copy number analysis or immune cell fractions by immunohistochemistry. Below is a manual for running StatescopeR with scRNAseq data from human pancreas cells used for both the reference and pseudobulk which is deconvolved.

# Running StatescopeR

## Installation

StatescopeR is available through Bioconductor. Install it using the following commands in R:

    if (!requireNamespace("BiocManager", quietly = TRUE)) {
        install.packages("BiocManager")
    }

    BiocManager::install("StatescopeR")

    ## Check that you have a valid Bioconductor installation
    BiocManager::valid()

## Prepare scRNAseq data

After installing StatescopeR, the next step is to load it along with the scuttle and the scRNAseq packages. From the latter, the SegerstolpePancreas dataset will be used as an example. This dataset will serve two purposes: 1) Creating a scRNAseq reference. Alternatively, premade signatures can be obtained from https://github.com/tgac-vumc/StatescopeData using the fetch_signature function. 2) Creating pseudobulk for deconvolution, which can also be used for evaluation, as the true cell type fractions and expression are known. Usually, bulk RNA sequencing data, with unknown cell type fractions and expression, would be used for deconvolution.

    ## Load StatescopeR & scRNAseq (for example data)
    suppressMessages(library(StatescopeR))
    suppressMessages(library(scRNAseq))
    suppressMessages(library(scuttle))

    ## Load the SegerstolpePancreas data set
    scRNAseq <- SegerstolpePancreasData()

    ## remove duplicate genes
    scRNAseq <- scRNAseq[!duplicated(rownames(scRNAseq)), ]

    ## remove cells with no cell type label
    scRNAseq <- scRNAseq[, !is.na(scRNAseq$`cell type`)]

    ## remove very rare cell types (<100 cells in total data set)
    celltypes_to_remove <-
        names(table(scRNAseq$`cell type`)[(table(scRNAseq$`cell type`) < 100)])
    scRNAseq <- scRNAseq[, !scRNAseq$`cell type` %in% celltypes_to_remove]

## Prepare StatescopeR input

StatescopeR takes the following inputs: 1) scRNAseq reference/signature 2) bulk RNAseq to be deconvolved 3) selected genes for deconvolution, by default this uses AutoGeneS (optional) Prior expectation of fractions. See Group expectations for expectations of groups of cell types. (optional) Hyperparameters (i.e. cores for parallelization , nrepfinal for maximum number of optimization iterations etc.)

    ## Normalize (cp10k) and logtransform scRNAseq
    cpm(scRNAseq) <- calculateCPM(scRNAseq)
    #> Warning in .local(x, ...): 'normalizeCounts' is deprecated.
    #> Use 'scrapper::normalizeCounts' instead.
    #> See help("Deprecated")
    logcounts(scRNAseq) <- log1p(cpm(scRNAseq) / 100)

    ## Create scRNAseq reference/signature with 50 hvg for quick example
    signature <- create_signature(scRNAseq,
        hvg_genes = TRUE, n_hvg_genes = 50L,
        labels = scRNAseq$`cell type`
    )
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(mu[, ct], omega[, ct]): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in fitTrendVar(fm, fv, ...): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in combineBlocks(collected, method = method, equiweight = equiweight, : 'combineBlocks' is deprecated.
    #> See help("Deprecated")
    #> Warning in getTopHVGs(dec.data, n = n_hvg_genes): 'getTopHVGs' is deprecated.
    #> Use 'scrapper::chooseHighlyVariableGenes' instead.
    #> See help("Deprecated")

    ## select subset of genes for deconvolution (30/50 hvg to make it quick)
    selected_genes <- select_genes(scRNAseq, 30L, 50L,
        labels = scRNAseq$`cell type`
    )
    #> Warning in fitTrendVar(fm, fv, ...): 'fitTrendVar' is deprecated.
    #> Use 'scrapper::fitVarianceTrend' instead.
    #> See help("Deprecated")
    #> Warning in combineBlocks(collected, method = method, equiweight = equiweight, : 'combineBlocks' is deprecated.
    #> See help("Deprecated")
    #> Warning in getTopHVGs(dec.data, n = n_hvg_genes): 'getTopHVGs' is deprecated.
    #> Use 'scrapper::chooseHighlyVariableGenes' instead.
    #> See help("Deprecated")
    #> Installing pyenv ...
    #> Done! pyenv has been installed to '/github/home/.local/share/r-reticulate/pyenv/bin/pyenv'.
    #> Using Python: /github/home/.pyenv/versions/3.11.15/bin/python3.11
    #> Creating virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope' ...
    #> + /github/home/.pyenv/versions/3.11.15/bin/python3.11 -m venv /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope
    #> Done!
    #> Installing packages: pip, wheel, setuptools
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope/bin/python -m pip install --upgrade pip wheel setuptools
    #> Installing packages: 'anndata==0.11.4', 'deap==1.4.3', 'cachetools==7.0.5', 'numba==0.62.1', 'pandas==1.5.3', 'joblib==1.5.3', 'numpy==1.23.5', 'scipy==1.15.3', 'matplotlib==3.6.3', 'seaborn==0.13.2', 'scikit-learn==1.5.2', 'torch==2.8.0', 'dill==0.3.4', 'statescope-autogenes==1.0.4.post2', 'psutil==7.2.2'
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope/bin/python -m pip install --upgrade --no-user 'anndata==0.11.4' 'deap==1.4.3' 'cachetools==7.0.5' 'numba==0.62.1' 'pandas==1.5.3' 'joblib==1.5.3' 'numpy==1.23.5' 'scipy==1.15.3' 'matplotlib==3.6.3' 'seaborn==0.13.2' 'scikit-learn==1.5.2' 'torch==2.8.0' 'dill==0.3.4' 'statescope-autogenes==1.0.4.post2' 'psutil==7.2.2'
    #> Virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope' successfully created.

    ## Create pseudobulk and normalize to cp10k (logging is done within Statescope)
    pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
    #> Warning in .local(x, ...): 'aggregateAcrossCells' is deprecated.
    #> Use 'scrapper::aggregateAcrossCells.se' instead.
    #> See help("Deprecated")
    normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
    #> Warning in .local(x, ...): 'normalizeCounts' is deprecated.
    #> Use 'scrapper::normalizeCounts' instead.
    #> See help("Deprecated")
    pseudobulk <- as(pseudobulk, "SummarizedExperiment")
    rownames(pseudobulk) <- rownames(scRNAseq)

    ## (optional) Create prior expectation for ductal cells
    prior <- gather_true_fractions(scRNAseq,
        ids = scRNAseq$individual,
        label_col = "cell type"
    ) # Use True sc fractions for this
    prior[rownames(prior) != "ductal cell", ] <- NA # Keep only ductal cells
    prior <- t(prior) # Transpose it to nSample x nCelltype

## Run StatescopeR

Once all input data have been prepared, the (pseudo)bulk RNAseq can be deconvolved to identify transcriptional states. In short the modules work as follows: BLADE_deconvolution employs Bayesian variational inference, modelling the bulk gene expression level of each gene j in sample i by: \[\begin{equation} y_{ij} = log(\sum_{t} f_{i}^t exp(x_{ij}^t)) + \epsilon_{ij} \end{equation}\] with hidden variables \(f_{i}^t\) and \(x_{ij}^t\) denoting the fraction of cell type t for sample i and the expression of gene j for sample i in cell type j respectively. Refinement further optimizes cell type-specific gene expression profiles, \(x_{ij}^t\), by fixing estimated cell fractions and putting more emphasis on capturing inter-sample heterogeneity over staying close to the single cell prior knowledge. StateDiscovery uses convex-NMF to cluster inferred cell type-specific gene expression profiles in an unsupervised manner. These modules are wrappers around the original Python functions Statescope.

    ## Run Deconvolution module
    Statescope <- BLADE_deconvolution(signature, pseudobulk, selected_genes, prior)
    #> all of 30 genes are used for optimization.
    #> Initialization with Support vector regression
    #> No feature filtering is done (fsel = 0)
    #> Using CPU for computation.

    ## Run Refinement module
    Statescope <- Refinement(Statescope, signature, pseudobulk, cores = 2L)
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, colnames(Mu)[i], value =
    #> SummarizedExperiment::SummarizedExperiment(assays =
    #> S4Vectors::SimpleList(weighted_gep = omega_weighted_gep_df))): implicit list
    #> embedding of S4 objects is deprecated

    ## Run State Discovery module (pick k=2 for quick example)
    Statescope <- StateDiscovery(Statescope, k = 2L, Ncores = 2L)
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_H_norm): implicit list embedding of
    #> S4 objects is deprecated
    #> Warning in `[<-`(`*tmp*`, ct, value = final_W): implicit list embedding of S4
    #> objects is deprecated

## Evaluate Statescope

Since pseudobulk data derived from scRNAseq are used in this manual, it is possible to verify the accuracy of the StatescopeR output.

    ## Count fractions of cells per sample in the pseudobulk
    true_fractions <- gather_true_fractions(scRNAseq,
        ids = scRNAseq$individual,
        label_col = "cell type"
    )

    ## Plot correlation and RMSE with true fractions per celltype
    fraction_eval(Statescope, true_fractions)

## Downstream analysis/visualizations

After running StatescopeR, a wide range of analyses can be performed. In this section, we describe how to access the results and show some examples of visualizations with them.

    ## Show predicted fractions
    metadata(Statescope)$fractions
    #> DataFrame with 6 rows and 10 columns
    #>                    H1        H2        H3        H4        H5        H6
    #>             <numeric> <numeric> <numeric> <numeric> <numeric> <numeric>
    #> gamma cell  0.1641967 0.1539185 0.1175439 0.1531572  0.132251 0.1703397
    #> alpha cell  0.3164878 0.3157997 0.1907823 0.3626544  0.283086 0.3279569
    #> beta cell   0.1621872 0.1713064 0.1203081 0.1667855  0.125939 0.1781105
    #> acinar cell 0.1622315 0.1329157 0.1998116 0.1241317  0.101945 0.1119617
    #> ductal cell 0.0422564 0.0871314 0.2805140 0.0420379  0.223718 0.0741549
    #> delta cell  0.1526405 0.1389283 0.0910401 0.1512332  0.133060 0.1374764
    #>                   T2D1      T2D2      T2D3      T2D4
    #>              <numeric> <numeric> <numeric> <numeric>
    #> gamma cell  0.20080491  0.116187 0.0927585  0.139874
    #> alpha cell  0.37080424  0.237354 0.1921996  0.273982
    #> beta cell   0.16090589  0.103832 0.0845732  0.153499
    #> acinar cell 0.10697520  0.129313 0.0878974  0.126060
    #> ductal cell 0.00976844  0.309661 0.4652056  0.169600
    #> delta cell  0.15074132  0.103652 0.0773658  0.136984

    ## Show predicted ductal cell type specific gene expression profiles
    assay(metadata(Statescope)$ct_specific_gep$`ductal cell`, "weighted_gep")
    #> DataFrame with 50 rows and 10 columns
    #>                  H1         H2         H3         H4         H5         H6
    #>           <numeric>  <numeric>  <numeric>  <numeric>  <numeric>  <numeric>
    #> GCG       -0.254625  -0.254625  -0.225791  -0.254945  -0.253343  -0.254706
    #> TTR       -0.458376  -0.458172  -0.453214  -0.458591  -0.457399  -0.458255
    #> INS       -0.333161  -0.333258  -0.332187  -0.333409  -0.332305  -0.333049
    #> PPY       -0.286098  -0.286025  -0.284756  -0.285638  -0.285374  -0.286135
    #> REG1A      0.722683   0.781807   0.733386   0.786381   0.491596   0.790677
    #> ...             ...        ...        ...        ...        ...        ...
    #> PNLIP    -0.1858909 -0.1843793 -0.1858738 -0.1855407 -0.1921137 -0.1845934
    #> SERPING1  0.0588023  0.1847349  0.1375279  0.1496334  0.1915722  0.1419700
    #> CFTR     -0.0786191  0.1263888  0.0373577  0.0792888  0.0478536  0.1701269
    #> ABCC8    -0.0988004 -0.0987826 -0.0986361 -0.0988050 -0.0987402 -0.0987896
    #> CTSD      0.2752346  0.2943899  0.5620388  0.3866387  0.4666415 -0.0287926
    #>                T2D1       T2D2       T2D3       T2D4
    #>           <numeric>  <numeric>  <numeric>  <numeric>
    #> GCG       -0.255060  -0.252256  -0.249405  -0.253093
    #> TTR       -0.458718  -0.454984  -0.450899  -0.456928
    #> INS       -0.333445  -0.319452  -0.300788  -0.331958
    #> PPY       -0.286258  -0.281786  -0.277286  -0.285414
    #> REG1A      0.733470   0.907154   0.983299   0.870897
    #> ...             ...        ...        ...        ...
    #> PNLIP    -0.1860935 -0.1804143 -0.1723767 -0.1827959
    #> SERPING1  0.0658007  0.1730957  0.1991004  0.1253346
    #> CFTR      0.0256932  0.1255226  0.1942973  0.1608859
    #> ABCC8    -0.0988187 -0.0985855 -0.0983308 -0.0987271
    #> CTSD      0.3071998  0.4564023  0.3874557  0.2849725

    ## Show ductal cell state scores per sample
    metadata(Statescope)$statescores$`ductal cell`
    #> DataFrame with 10 rows and 2 columns
    #>               V1          V2
    #>        <numeric>   <numeric>
    #> H1   7.81460e-03 9.92185e-01
    #> H2   8.13323e-01 1.86677e-01
    #> H3   1.70688e-07 1.00000e+00
    #> H4   3.67679e-01 6.32321e-01
    #> H5   6.20817e-02 9.37918e-01
    #> H6   1.00000e+00 2.07114e-09
    #> T2D1 2.87495e-01 7.12505e-01
    #> T2D2 6.89015e-01 3.10985e-01
    #> T2D3 9.97181e-01 2.81862e-03
    #> T2D4 8.95849e-01 1.04151e-01

    ## Show ductal cell state loadings
    metadata(Statescope)$stateloadings$`ductal cell`
    #> DataFrame with 50 rows and 2 columns
    #>                 V1         V2
    #>          <numeric>  <numeric>
    #> GCG      -0.233470  -0.217537
    #> TTR      -0.421026  -0.405526
    #> INS      -0.297596  -0.295535
    #> PPY      -0.261490  -0.253585
    #> REG1A     0.808027   0.600304
    #> ...            ...        ...
    #> PNLIP    -0.166626 -0.1664897
    #> SERPING1  0.153152  0.1121160
    #> CFTR      0.149398  0.0132491
    #> ABCC8    -0.091158 -0.0877117
    #> CTSD      0.242900  0.3819576

    ## Plot heatmap of fractions
    fraction_heatmap(Statescope)

    ## Plot barplot of top state loadings
    barplot_stateloadings(Statescope)

## Group expectations

When an expected fraction is available for a group of cell types rather than for individual cell types (i.e. Lymphoid cells instead of T/B cells), StatescopeR allows the use of a group prior. Here we show an example where the expected fraction of the pancreatic islet cells (alpha, beta, gamma & delta cells) together is known, but not their individual contributions.

    ## define cell types in one group
    grouped_cts <- c("alpha cell", "beta cell", "gamma cell", "delta cell")

    ## initialize group assignment matrix (nCelltype x nGroup) with 0's
    celltype_names <- colnames(signature$mu)
    group_names <- c("Group", setdiff(celltype_names, grouped_cts))
    nCelltype <- length(celltype_names)
    nGroup <- length(group_names)

    group <- matrix(0,
        nrow = nGroup, ncol = nCelltype,
        dimnames = list(group_names, celltype_names)
    )

    ## initialize prior fraction matrix (nSamples x nCelltypes) with NA's
    nSamples <- ncol(pseudobulk)
    sample_names <- colnames(pseudobulk)

    prior <- matrix(
        nrow = nSamples, ncol = nGroup,
        dimnames = list(sample_names, group_names)
    )

    ## Assign cell types to groups
    for (ct in celltype_names) {
        if (ct %in% grouped_cts) {
            ## assign cell type to group
            group["Group", ct] <- 1
        } else {
            ## Assign cell type to its own group
            group[ct, ct] <- 1
        }
    }

    ## Add grouped prior fractions to prior
    true_fractions <- gather_true_fractions(scRNAseq, ids = scRNAseq$individual,
         label_col = "cell type")

    prior[names(true_fractions), "Group"] <- colSums(as.matrix(
        true_fractions[grouped_cts, ]
    ))

    ## init group prior
    group_prior <- list("Group" = group, "Expectation" = prior)

    ## Now you can just run Statescope as with a normal prior. Note we do not give
    ## a ductal cell prior this time
    Statescope <- BLADE_deconvolution(signature, pseudobulk, selected_genes,
        group_prior,
        cores = 1L,
        Nrep = 1L
    )
    #> all of 30 genes are used for optimization.
    #> Initialization with Support vector regression
    #> No feature filtering is done (fsel = 0)
    #> Using CPU for computation.

# Citing `StatescopeR`

If you made use of StatescopeR for your research, please use the following information to cite the package and the underlying methodology.

    ## Citation info
    citation("StatescopeR")
    #> To cite package 'StatescopeR' in publications use:
    #>
    #>   Janssen J, Radonic T, Steketee M, van Asten S, Eijk P, van Maldegem
    #>   F, Noske D, Bahce I, Vallejo JG, van de Wiel M, Ylstra B, Kim Y
    #>   (2024). "Hidden RNA profiles of cells in the tumor microenvironment
    #>   accurately revealed by malignant cell fraction-informed
    #>   deconvolution." _Research Square_. doi:10.21203/rs.3.rs-4252952/v1
    #>   <https://doi.org/10.21203/rs.3.rs-4252952/v1>,
    #>   <https://www.researchgate.net/publication/380850052_Hidden_RNA_profiles_of_cells_in_the_tumor_microenvironment_accurately_revealed_by_malignant_cell_fraction-informed_deconvolution>.
    #>
    #> A BibTeX entry for LaTeX users is
    #>
    #>   @Article{,
    #>     title = {Hidden RNA profiles of cells in the tumor microenvironment accurately revealed by malignant cell fraction-informed deconvolution},
    #>     author = {Jurriaan Janssen and Teodora Radonic and Mischa Steketee and Saskia {van Asten} and Paul Eijk and Febe {van Maldegem} and David Noske and Idris Bahce and Juan Garcia Vallejo and Mark {van de Wiel} and Bauke Ylstra and Yongsoo Kim},
    #>     year = {2024},
    #>     journal = {Research Square},
    #>     doi = {10.21203/rs.3.rs-4252952/v1},
    #>     url = {https://www.researchgate.net/publication/380850052_Hidden_RNA_profiles_of_cells_in_the_tumor_microenvironment_accurately_revealed_by_malignant_cell_fraction-informed_deconvolution},
    #>   }

# Reproducibility

The StatescopeR package (Janssen, Radonic, Steketee, van Asten, Eijk, van Maldegem, Noske, Bahce, Vallejo, van de Wiel, Ylstra, and Kim, 2024) was made possible thanks to:

- R (R Core Team, 2026)
- BiocStyle (Oleś, 2025)
- knitr (Xie, 2025)
- RefManageR (McLean, 2017)
- rmarkdown (Allaire, Xie, Dervieux, McPherson, Luraschi, Ushey, Atkins, Wickham, Cheng, Chang, and Iannone, 2026)
- sessioninfo (Wickham, Chang, Flight, Müller, and Hester, 2025)
- testthat (Wickham, 2011)

This package was developed using biocthis.

`R` session information.

    #> ─ Session info ───────────────────────────────────────────────────────────────
    #>  setting  value
    #>  version  R version 4.5.3 (2026-03-11)
    #>  os       Ubuntu 24.04.4 LTS
    #>  system   x86_64, linux-gnu
    #>  ui       X11
    #>  language (EN)
    #>  collate  en_US.UTF-8
    #>  ctype    en_US.UTF-8
    #>  tz       Etc/UTC
    #>  date     2026-04-09
    #>  pandoc   3.6.3 @ /usr/local/bin/ (via rmarkdown)
    #>  quarto   1.8.24 @ /usr/local/bin/quarto
    #>
    #> ─ Packages ───────────────────────────────────────────────────────────────────
    #>  package              * version   date (UTC) lib source
    #>  abind                  1.4-8     2024-09-12 [2] RSPM (R 4.5.0)
    #>  alabaster.base         1.11.4    2026-04-01 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  alabaster.matrix       1.11.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.ranges       1.11.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.sce          1.11.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.schemas      1.11.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  alabaster.se           1.11.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  AnnotationDbi          1.73.1    2026-04-08 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  AnnotationFilter       1.35.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  AnnotationHub          4.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  backports              1.5.1     2026-04-03 [2] RSPM (R 4.5.0)
    #>  basilisk               1.23.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  beachmat               2.27.4    2026-04-08 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  bibtex                 0.5.2     2026-02-03 [2] RSPM (R 4.5.0)
    #>  Biobase              * 2.71.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocFileCache          3.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocGenerics         * 0.57.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocIO                 1.21.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocManager            1.30.27   2025-11-14 [2] RSPM (R 4.5.0)
    #>  BiocNeighbors          2.5.4     2026-02-12 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocParallel           1.45.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocSingular           1.27.1    2025-11-17 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocStyle            * 2.39.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  BiocVersion            3.23.1    2025-10-30 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  Biostrings             2.79.5    2026-03-06 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  bit                    4.6.0     2025-03-06 [2] RSPM (R 4.5.0)
    #>  bit64                  4.6.0-1   2025-01-16 [2] RSPM (R 4.5.0)
    #>  bitops                 1.0-9     2024-10-03 [2] RSPM (R 4.5.0)
    #>  blob                   1.3.0     2026-01-14 [2] RSPM (R 4.5.0)
    #>  bluster                1.21.1    2026-03-05 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  bslib                  0.10.0    2026-01-26 [2] RSPM (R 4.5.0)
    #>  buildtools             1.0.0     2026-04-03 [3] local (/pkg)
    #>  cachem                 1.1.0     2024-05-16 [2] RSPM (R 4.5.0)
    #>  cigarillo              1.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  circlize               0.4.18    2026-04-04 [2] RSPM (R 4.5.0)
    #>  cli                    3.6.5     2025-04-23 [2] RSPM (R 4.5.0)
    #>  clue                   0.3-68    2026-03-26 [2] RSPM (R 4.5.0)
    #>  cluster                2.1.8.2   2026-02-05 [2] RSPM (R 4.5.0)
    #>  codetools              0.2-20    2024-03-31 [2] RSPM (R 4.5.0)
    #>  colorspace             2.1-2     2025-09-22 [2] RSPM (R 4.5.0)
    #>  ComplexHeatmap         2.27.1    2026-01-30 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  cowplot                1.2.0     2025-07-07 [2] RSPM (R 4.5.0)
    #>  crayon                 1.5.3     2024-06-20 [2] RSPM (R 4.5.0)
    #>  curl                   7.0.0     2025-08-19 [2] RSPM (R 4.5.0)
    #>  DBI                    1.3.0     2026-02-25 [2] RSPM (R 4.5.0)
    #>  dbplyr                 2.5.2     2026-02-13 [2] RSPM (R 4.5.0)
    #>  DelayedArray           0.37.1    2026-03-31 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  digest                 0.6.39    2025-11-19 [2] RSPM (R 4.5.0)
    #>  dir.expiry             1.19.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  doParallel             1.0.17    2022-02-07 [2] RSPM (R 4.5.0)
    #>  dplyr                  1.2.1     2026-04-03 [2] RSPM (R 4.5.0)
    #>  dqrng                  0.4.1     2024-05-28 [2] RSPM (R 4.5.0)
    #>  edgeR                  4.9.5     2026-04-08 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  ensembldb              2.35.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  evaluate               1.0.5     2025-08-27 [2] RSPM (R 4.5.0)
    #>  ExperimentHub          3.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  farver                 2.1.2     2024-05-13 [2] RSPM (R 4.5.0)
    #>  fastmap                1.2.0     2024-05-15 [2] RSPM (R 4.5.0)
    #>  filelock               1.0.3     2023-12-11 [2] RSPM (R 4.5.0)
    #>  foreach                1.5.2     2022-02-02 [2] RSPM (R 4.5.0)
    #>  generics             * 0.1.4     2025-05-09 [2] RSPM (R 4.5.0)
    #>  GenomeInfoDb           1.47.2    2025-12-04 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  GenomicAlignments      1.47.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  GenomicFeatures        1.63.2    2026-04-05 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  GenomicRanges        * 1.63.2    2026-04-05 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  GetoptLong             1.1.0     2025-11-28 [2] RSPM (R 4.5.0)
    #>  ggplot2                4.0.2     2026-02-03 [2] RSPM (R 4.5.0)
    #>  GlobalOptions          0.1.3     2025-11-28 [2] RSPM (R 4.5.0)
    #>  glue                   1.8.0     2024-09-30 [2] RSPM (R 4.5.0)
    #>  gtable                 0.3.6     2024-10-25 [2] RSPM (R 4.5.0)
    #>  gypsum                 1.7.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  h5mread                1.3.3     2026-04-07 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  HDF5Array              1.39.1    2026-04-07 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  htmltools              0.5.9     2025-12-04 [2] RSPM (R 4.5.0)
    #>  httr                   1.4.8     2026-02-13 [2] RSPM (R 4.5.0)
    #>  httr2                  1.2.2     2025-12-08 [2] RSPM (R 4.5.0)
    #>  igraph                 2.2.3     2026-04-07 [2] RSPM (R 4.5.0)
    #>  IRanges              * 2.45.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  irlba                  2.3.7     2026-01-30 [2] RSPM (R 4.5.0)
    #>  iterators              1.0.14    2022-02-05 [2] RSPM (R 4.5.0)
    #>  jquerylib              0.1.4     2021-04-26 [2] RSPM (R 4.5.0)
    #>  jsonlite               2.0.0     2025-03-27 [2] RSPM (R 4.5.0)
    #>  KEGGREST               1.51.1    2025-11-17 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  knitr                  1.51      2025-12-20 [2] RSPM (R 4.5.0)
    #>  labeling               0.4.3     2023-08-29 [2] RSPM (R 4.5.0)
    #>  lattice                0.22-9    2026-02-09 [2] RSPM (R 4.5.0)
    #>  lazyeval               0.2.3     2026-04-04 [2] RSPM (R 4.5.0)
    #>  lifecycle              1.0.5     2026-01-08 [2] RSPM (R 4.5.0)
    #>  limma                  3.67.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  locfit                 1.5-9.12  2025-03-05 [2] RSPM (R 4.5.0)
    #>  lubridate              1.9.5     2026-02-04 [2] RSPM (R 4.5.0)
    #>  magrittr               2.0.5     2026-04-04 [2] RSPM (R 4.5.0)
    #>  maketools              1.3.2     2025-01-25 [3] RSPM (R 4.5.0)
    #>  Matrix                 1.7-5     2026-03-21 [2] RSPM (R 4.5.0)
    #>  MatrixGenerics       * 1.23.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  matrixStats          * 1.5.0     2025-01-07 [2] RSPM (R 4.5.0)
    #>  memoise                2.0.1     2021-11-26 [2] RSPM (R 4.5.0)
    #>  metapod                1.19.2    2026-02-17 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  pillar                 1.11.1    2025-09-17 [2] RSPM (R 4.5.0)
    #>  pkgconfig              2.0.3     2019-09-22 [2] RSPM (R 4.5.0)
    #>  plyr                   1.8.9     2023-10-02 [2] RSPM (R 4.5.0)
    #>  png                    0.1-9     2026-03-15 [2] RSPM (R 4.5.0)
    #>  ProtGenerics           1.43.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  R6                     2.6.1     2025-02-15 [2] RSPM (R 4.5.0)
    #>  rappdirs               0.3.4     2026-01-17 [2] RSPM (R 4.5.0)
    #>  RColorBrewer           1.1-3     2022-04-03 [2] RSPM (R 4.5.0)
    #>  Rcpp                   1.1.1     2026-01-10 [2] RSPM (R 4.5.0)
    #>  RCurl                  1.98-1.18 2026-03-21 [2] RSPM (R 4.5.0)
    #>  RefManageR           * 1.4.0     2022-09-30 [2] RSPM (R 4.5.0)
    #>  restfulr               0.0.16    2025-06-27 [2] RSPM (R 4.5.3)
    #>  reticulate             1.45.0    2026-02-13 [2] RSPM (R 4.5.0)
    #>  rhdf5                  2.55.16   2026-03-12 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  rhdf5filters           1.23.3    2025-12-09 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  Rhdf5lib               1.33.6    2026-03-16 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  rjson                  0.2.23    2024-09-16 [2] RSPM (R 4.5.0)
    #>  rlang                  1.2.0     2026-04-06 [2] RSPM (R 4.5.0)
    #>  rmarkdown              2.31      2026-03-26 [2] RSPM (R 4.5.0)
    #>  Rsamtools              2.27.1    2026-03-07 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  RSQLite                2.4.6     2026-02-06 [2] RSPM (R 4.5.0)
    #>  rsvd                   1.0.5     2021-04-16 [2] RSPM (R 4.5.0)
    #>  rtracklayer            1.71.3    2026-03-15 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  S4Arrays               1.11.1    2025-11-25 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  S4Vectors            * 0.49.1    2026-04-04 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  S7                     0.2.1     2025-11-14 [2] RSPM (R 4.5.0)
    #>  sass                   0.4.10    2025-04-11 [2] RSPM (R 4.5.0)
    #>  ScaledMatrix           1.19.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  scales                 1.4.0     2025-04-24 [2] RSPM (R 4.5.0)
    #>  scran                  1.39.2    2026-04-07 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  scRNAseq             * 2.25.0    2025-11-06 [2] Bioconductor 3.23 (R 4.5.3)
    #>  scuttle              * 1.21.3    2026-04-06 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  Seqinfo              * 1.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  sessioninfo          * 1.2.3     2025-02-05 [2] RSPM (R 4.5.0)
    #>  shape                  1.4.6.1   2024-02-23 [2] RSPM (R 4.5.0)
    #>  SingleCellExperiment * 1.33.2    2026-03-24 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  SparseArray            1.11.13   2026-03-31 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  StatescopeR          * 0.99.36   2026-04-08 [1] https://bioc.r-universe.dev (R 4.5.3)
    #>  statmod                1.5.1     2025-10-09 [2] RSPM (R 4.5.0)
    #>  stringi                1.8.7     2025-03-27 [2] RSPM (R 4.5.0)
    #>  stringr                1.6.0     2025-11-04 [2] RSPM (R 4.5.0)
    #>  SummarizedExperiment * 1.41.1    2026-02-05 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  sys                    3.4.3     2024-10-04 [2] RSPM (R 4.5.0)
    #>  tibble                 3.3.1     2026-01-11 [2] RSPM (R 4.5.0)
    #>  tidyselect             1.2.1     2024-03-11 [2] RSPM (R 4.5.0)
    #>  timechange             0.4.0     2026-01-29 [2] RSPM (R 4.5.0)
    #>  UCSC.utils             1.7.1     2025-12-09 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  vctrs                  0.7.2     2026-03-21 [2] RSPM (R 4.5.0)
    #>  withr                  3.0.2     2024-10-28 [2] RSPM (R 4.5.0)
    #>  xfun                   0.57      2026-03-20 [2] RSPM (R 4.5.0)
    #>  XML                    3.99-0.23 2026-03-20 [2] RSPM (R 4.5.0)
    #>  xml2                   1.5.2     2026-01-17 [2] RSPM (R 4.5.0)
    #>  XVector                0.51.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.3)
    #>  yaml                   2.3.12    2025-12-10 [2] RSPM (R 4.5.0)
    #>
    #>  [1] /tmp/RtmpCOjESh/Rinst1d6f693e9845
    #>  [2] /github/workspace/pkglib
    #>  [3] /usr/local/lib/R/site-library
    #>  [4] /usr/lib/R/site-library
    #>  [5] /usr/lib/R/library
    #>  * ── Packages attached to the search path.
    #>
    #> ─ Python configuration ───────────────────────────────────────────────────────
    #>  python:         /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope/bin/python
    #>  libpython:      /github/home/.pyenv/versions/3.11.15/lib/libpython3.11.so
    #>  pythonhome:     /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope:/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope
    #>  version:        3.11.15 (main, Apr  9 2026, 06:36:00) [GCC 13.3.0]
    #>  numpy:          /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.36/statescope/lib/python3.11/site-packages/numpy
    #>  numpy_version:  1.23.5
    #>
    #>  NOTE: Python version was forced by use_python() function
    #>
    #> ──────────────────────────────────────────────────────────────────────────────