# Introduction to StatescopeR

# Introduction

StatescopeR is the R version of Statescope, a computational framework designed to discover cell states from cell type-specific gene expression profiles inferred from bulk RNA profiles. StatescopeR works in three steps: 1) Multi-omic single cell RNAseq reference-based deconvolution 2) Refinement of inferred cell type-specific gene expression profiles 3) Cell state discovery In addition to bulk RNA and a single cell RNAseq (scRNAseq) reference, StatescopeR can also integrate prior expectations of cell fractions in the bulk RNA. For example tumor fractions estimated by DNA copy number analysis or immune cell fractions by immunohistochemistry. Below is a manual for running StatescopeR with some pancreas scRNAseq data 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 the package is installed, we will be loading it and the scRNAseq package, from which we will use the SegerstolpePancreas data set for our example. We will use it for two purposes: 1) Creating a scRNAseq reference, as you would do for your own application. Note that you can also use one of the premade signatures from https://github.com/tgac-vumc/StatescopeData using the fetch_signature function. 2) Creating pseudobulk to be deconvolved, which we can conveniently use for evaluation as well. In your own application this would likely be bulk mRNA sequencing.

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

    ## Load 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 mRNA to be deconvolved 3) selected genes for deconvolution, by default this uses AutoGeneS (optional) Prior expectation of fractions (optional) Hyperparameters (i.e. cores for parallelization , nrepfinal for maximum number of optimization iteration etc.)

    ## Normalize (cp10k) and logtransform scRNAseq
    cpm(scRNAseq) <- calculateCPM(scRNAseq)
    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`
    )

    ## select subset of genes for deconvolution (30/50 hvg to make it quick)
    selected_genes <- select_genes(scRNAseq, 30L, 50L,
        labels = scRNAseq$`cell type`
    )
    #> Installing pyenv ...
    #> Done! pyenv has been installed to '/github/home/.local/share/r-reticulate/pyenv/bin/pyenv'.
    #> Using Python: /github/home/.pyenv/versions/3.7.17/bin/python3.7
    #> Creating virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes' ...
    #> + /github/home/.pyenv/versions/3.7.17/bin/python3.7 -m venv /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes
    #> Done!
    #> Installing packages: pip, wheel, setuptools
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes/bin/python -m pip install --upgrade pip wheel setuptools
    #> Installing packages: 'autogenes==1.0.4', 'pandas==1.3.5', 'anndata==0.8.0', 'numpy==1.21.6', 'dill==0.3.7', 'deap==1.4.3', 'scipy==1.7.3', 'cachetools==5.5.2', 'scikit-learn==1.0.2', 'matplotlib==3.5.3'
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes/bin/python -m pip install --upgrade --no-user 'autogenes==1.0.4' 'pandas==1.3.5' 'anndata==0.8.0' 'numpy==1.21.6' 'dill==0.3.7' 'deap==1.4.3' 'scipy==1.7.3' 'cachetools==5.5.2' 'scikit-learn==1.0.2' 'matplotlib==3.5.3'
    #> Virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes' successfully created.

    ## Create pseudobulk and normalize to cp10k (logging is done within Statescope)
    pseudobulk <- aggregateAcrossCells(scRNAseq, ids = scRNAseq$individual)
    normcounts(pseudobulk) <- calculateCPM(pseudobulk) / 100
    pseudobulk <- as(pseudobulk, "SummarizedExperiment")
    rownames(pseudobulk) <- rownames(scRNAseq)

    ## (optional) Create prior expectation
    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

Now that all inputs have been prepared you can deconvolve the (pseudo)bulk mRNA and discover 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 version Statescope.

    ## Run Deconvolution module
    Statescope <- BLADE_deconvolution(signature, pseudobulk, selected_genes, prior)
    #> Using Python: /github/home/.pyenv/versions/3.11.14/bin/python3.11
    #> Creating virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/deconvolution' ...
    #> + /github/home/.pyenv/versions/3.11.14/bin/python3.11 -m venv /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/deconvolution
    #> Done!
    #> Installing packages: pip, wheel, setuptools
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/deconvolution/bin/python -m pip install --upgrade pip wheel setuptools
    #> Installing packages: 'numba==0.62.1', 'pandas==1.5.3', 'joblib==1.5.2', 'numpy==1.26.4', 'scipy==1.16.3', 'scikit-learn==1.5.2', 'matplotlib==3.6.3', 'mkl==2025.3.0', 'torch==2.9.1', 'dill==0.3.4'
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/deconvolution/bin/python -m pip install --upgrade --no-user 'numba==0.62.1' 'pandas==1.5.3' 'joblib==1.5.2' 'numpy==1.26.4' 'scipy==1.16.3' 'scikit-learn==1.5.2' 'matplotlib==3.6.3' 'mkl==2025.3.0' 'torch==2.9.1' 'dill==0.3.4'
    #> Virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/deconvolution' successfully created.

    ## Run Refinement module
    Statescope <- Refinement(Statescope, signature, pseudobulk, cores = 2L)

    ## Run State Discovery module (pick k=2 for quick example)
    Statescope <- StateDiscovery(Statescope, k = 2L, Ncores = 2L)
    #> Using Python: /github/home/.pyenv/versions/3.11.14/bin/python3.11
    #> Creating virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/statescope' ...
    #> + /github/home/.pyenv/versions/3.11.14/bin/python3.11 -m venv /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/statescope
    #> Done!
    #> Installing packages: pip, wheel, setuptools
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/statescope/bin/python -m pip install --upgrade pip wheel setuptools
    #> Installing packages: 'numba==0.62.1', 'pandas==1.5.3', 'joblib==1.5.2', 'numpy==1.23.5', 'scipy==1.15.3', 'matplotlib==3.6.3', 'seaborn==0.13.2', 'scikit-learn==1.5.2'
    #> + /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/statescope/bin/python -m pip install --upgrade --no-user 'numba==0.62.1' 'pandas==1.5.3' 'joblib==1.5.2' 'numpy==1.23.5' 'scipy==1.15.3' 'matplotlib==3.6.3' 'seaborn==0.13.2' 'scikit-learn==1.5.2'
    #> Virtual environment '/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/statescope' successfully created.

## Evaluate Statescope

As we used pseudobulk from scRNAseq in this manual we are able to check if the output of StatescopeR is correct.

    ## 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 you have run Statescope you can do all kinds of analyses, here we show some visualizations to give you an idea, but feel free to try whatever comes to your mind.

    ## 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.1519242  0.143446 0.1128530  0.144857 0.1304878 0.1618247
    #> alpha cell  0.2979746  0.295950 0.1796136  0.341887 0.2706741 0.3119144
    #> beta cell   0.1657024  0.177266 0.1244771  0.172304 0.1359732 0.1841023
    #> acinar cell 0.1914558  0.155002 0.2104465  0.143627 0.0974308 0.1278883
    #> ductal cell 0.0396154  0.086188 0.2871257  0.044088 0.2252339 0.0741488
    #> delta cell  0.1533276  0.142147 0.0854841  0.153237 0.1402002 0.1401215
    #>                  T2D1      T2D2      T2D3      T2D4
    #>             <numeric> <numeric> <numeric> <numeric>
    #> gamma cell  0.1867109 0.1076852 0.0775683  0.126585
    #> alpha cell  0.3519710 0.2258843 0.1814806  0.267687
    #> beta cell   0.1686710 0.0949173 0.0854074  0.158351
    #> acinar cell 0.1257222 0.1580285 0.1072461  0.143690
    #> ductal cell 0.0114966 0.3115149 0.4722820  0.171172
    #> delta cell  0.1554283 0.1019697 0.0760155  0.132516

    ## 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.211875  -0.211752  -0.199148  -0.211999  -0.210790  -0.211827
    #> TTR       -0.450475  -0.450239  -0.446047  -0.450633  -0.449465  -0.450331
    #> INS       -0.319164  -0.319173  -0.318131  -0.319323  -0.318241  -0.319031
    #> PPY       -0.276032  -0.275936  -0.274705  -0.275451  -0.275223  -0.276064
    #> REG1A      0.677105   0.716959   0.686103   0.738050   0.506609   0.764994
    #> ...             ...        ...        ...        ...        ...        ...
    #> PNLIP    -0.1869045 -0.1855493 -0.1867664 -0.1864528 -0.1923869 -0.1857630
    #> SERPING1  0.0610685  0.1825373  0.1416927  0.1456767  0.2012358  0.1423709
    #> CFTR     -0.0725805  0.1272556  0.0403176  0.0761937  0.0525562  0.1736846
    #> ABCC8    -0.0973751 -0.0973541 -0.0972250 -0.0973764 -0.0973061 -0.0973635
    #> CTSD      0.2889957  0.3044764  0.5629589  0.4008533  0.4817409 -0.0232559
    #>                T2D1       T2D2       T2D3       T2D4
    #>           <numeric>  <numeric>  <numeric>  <numeric>
    #> GCG       -0.212107  -0.209951  -0.207954  -0.210996
    #> TTR       -0.450757  -0.446955  -0.443000  -0.449275
    #> INS       -0.319368  -0.301784  -0.282937  -0.318230
    #> PPY       -0.276193  -0.270799  -0.264349  -0.275349
    #> REG1A      0.690720   0.784612   0.968746   0.816246
    #> ...             ...        ...        ...        ...
    #> PNLIP    -0.1869869 -0.1823305 -0.1761229 -0.1845191
    #> SERPING1  0.0607211  0.1745512  0.2044584  0.1286534
    #> CFTR      0.0265844  0.1285570  0.1978968  0.1672262
    #> ABCC8    -0.0973905 -0.0971382 -0.0968758 -0.0973077
    #> CTSD      0.3104530  0.4596788  0.3927112  0.2978847

    ## Show ductal cell state scores per sample
    metadata(Statescope)$statescores$`ductal cell`
    #> DataFrame with 10 rows and 2 columns
    #>               V1          V2
    #>        <numeric>   <numeric>
    #> H1   1.52567e-02 9.84743e-01
    #> H2   8.06011e-01 1.93989e-01
    #> H3   5.53411e-08 1.00000e+00
    #> H4   3.48765e-01 6.51235e-01
    #> H5   8.00512e-02 9.19949e-01
    #> H6   1.00000e+00 2.47363e-10
    #> T2D1 2.84059e-01 7.15941e-01
    #> T2D2 6.55428e-01 3.44572e-01
    #> T2D3 9.96002e-01 3.99814e-03
    #> T2D4 8.74760e-01 1.25240e-01

    ## Show ductal cell state loadings
    metadata(Statescope)$stateloadings$`ductal cell`
    #> DataFrame with 50 rows and 2 columns
    #>                  V1         V2
    #>           <numeric>  <numeric>
    #> GCG       -0.192690  -0.185637
    #> TTR       -0.410082  -0.401661
    #> INS       -0.280633  -0.285153
    #> PPY       -0.249093  -0.246433
    #> REG1A      0.757350   0.575868
    #> ...             ...        ...
    #> PNLIP    -0.1670452 -0.1684545
    #> SERPING1  0.1537052  0.1171073
    #> CFTR      0.1520766  0.0178142
    #> ABCC8    -0.0890385 -0.0870902
    #> CTSD      0.2437701  0.3944747

    ## Plot heatmap of fractions
    fraction_heatmap(Statescope)

    ## Plot barplot of top loadings
    barplot_stateloadings(Statescope)

## Group expectations

If you have an expected fraction for a group of cell types instead of for one specific cell (i.e. Lymphoid cells instead of T/B cells), StatescopeR also allows you to give a group prior. Here we show an example where we know the expected fraction of the pancreatic islet cells (alpha, beta, gamma & delta cells) together, 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
    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
    )

# Citing `StatescopeR`

We hope that StatescopeR will be useful for your research. Please use the following information to cite the package and the overall approach. Thank you!

    ## 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, 2025)
- BiocStyle (Oleś, 2025)
- knitr (Xie, 2025)
- RefManageR (McLean, 2017)
- rmarkdown (Allaire, Xie, Dervieux, McPherson, Luraschi, Ushey, Atkins, Wickham, Cheng, Chang, and Iannone, 2025)
- 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.2 (2025-10-31)
    #>  os       Ubuntu 24.04.3 LTS
    #>  system   x86_64, linux-gnu
    #>  ui       X11
    #>  language (EN)
    #>  collate  C
    #>  ctype    en_US.UTF-8
    #>  tz       Etc/UTC
    #>  date     2025-12-25
    #>  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.1    2025-11-03 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.matrix       1.9.0     2025-04-15 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.ranges       1.9.1     2025-07-22 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  alabaster.sce          1.9.0     2025-04-15 [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.2)
    #>  alabaster.se           1.9.0     2025-04-15 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  AnnotationDbi          1.73.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  AnnotationFilter       1.35.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  AnnotationHub          4.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  backports              1.5.0     2024-05-23 [2] RSPM (R 4.5.0)
    #>  basilisk               1.23.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  beachmat               2.27.1    2025-12-13 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  bibtex                 0.5.1     2023-01-26 [2] RSPM (R 4.5.0)
    #>  Biobase              * 2.71.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocFileCache          3.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocGenerics         * 0.57.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocIO                 1.21.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocManager            1.30.27   2025-11-14 [2] RSPM (R 4.5.0)
    #>  BiocNeighbors          2.5.0     2025-12-14 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocParallel           1.45.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocSingular           1.27.1    2025-11-17 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocStyle            * 2.39.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  BiocVersion            3.23.1    2025-10-30 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  Biostrings             2.79.3    2025-12-17 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.2.4     2023-03-17 [2] RSPM (R 4.5.0)
    #>  bluster                1.21.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  bslib                  0.9.0     2025-01-30 [2] RSPM (R 4.5.0)
    #>  buildtools             1.0.0     2025-12-19 [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.2)
    #>  circlize               0.4.17    2025-12-08 [2] RSPM (R 4.5.0)
    #>  cli                    3.6.5     2025-04-23 [2] RSPM (R 4.5.0)
    #>  clue                   0.3-66    2024-11-13 [2] RSPM (R 4.5.0)
    #>  cluster                2.1.8.1   2025-03-12 [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.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.2.3     2024-06-02 [2] RSPM (R 4.5.0)
    #>  dbplyr                 2.5.1     2025-09-10 [2] RSPM (R 4.5.0)
    #>  DelayedArray           0.37.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.2)
    #>  doParallel             1.0.17    2022-02-07 [2] RSPM (R 4.5.0)
    #>  dplyr                  1.1.4     2023-11-17 [2] RSPM (R 4.5.0)
    #>  dqrng                  0.4.1     2024-05-28 [2] RSPM (R 4.5.0)
    #>  edgeR                  4.9.2     2025-12-23 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  ensembldb              2.35.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.2)
    #>  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.2)
    #>  GenomicAlignments      1.47.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  GenomicFeatures        1.63.1    2025-10-30 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  GenomicRanges        * 1.63.1    2025-12-08 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  GetoptLong             1.1.0     2025-11-28 [2] RSPM (R 4.5.0)
    #>  ggplot2                4.0.1     2025-11-14 [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.2)
    #>  h5mread                1.3.1     2025-11-21 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  HDF5Array              1.39.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  htmltools              0.5.9     2025-12-04 [2] RSPM (R 4.5.0)
    #>  httr                   1.4.7     2023-08-15 [2] RSPM (R 4.5.0)
    #>  httr2                  1.2.2     2025-12-08 [2] RSPM (R 4.5.0)
    #>  igraph                 2.2.1     2025-10-27 [2] RSPM (R 4.5.0)
    #>  IRanges              * 2.45.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  irlba                  2.3.5.1   2022-10-03 [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.2)
    #>  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-7    2025-04-02 [2] RSPM (R 4.5.0)
    #>  lazyeval               0.2.2     2019-03-15 [2] RSPM (R 4.5.0)
    #>  lifecycle              1.0.4     2023-11-07 [2] RSPM (R 4.5.0)
    #>  limma                  3.67.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  locfit                 1.5-9.12  2025-03-05 [2] RSPM (R 4.5.0)
    #>  lubridate              1.9.4     2024-12-08 [2] RSPM (R 4.5.0)
    #>  magrittr               2.0.4     2025-09-12 [2] RSPM (R 4.5.0)
    #>  maketools              1.3.2     2025-01-25 [3] RSPM (R 4.5.0)
    #>  Matrix                 1.7-4     2025-08-28 [2] RSPM (R 4.5.0)
    #>  MatrixGenerics       * 1.23.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.1    2025-11-22 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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-8     2022-11-29 [2] RSPM (R 4.5.0)
    #>  ProtGenerics           1.43.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  R6                     2.6.1     2025-02-15 [2] RSPM (R 4.5.0)
    #>  rappdirs               0.3.3     2021-01-31 [2] RSPM (R 4.5.0)
    #>  RColorBrewer           1.1-3     2022-04-03 [2] RSPM (R 4.5.0)
    #>  Rcpp                   1.1.0.8.1 2025-12-16 [2] https://cran.r-universe.dev (R 4.5.2)
    #>  RCurl                  1.98-1.17 2025-03-22 [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.2)
    #>  reticulate             1.44.1    2025-11-14 [2] RSPM (R 4.5.0)
    #>  rhdf5                  2.55.12   2025-12-10 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  rhdf5filters           1.23.3    2025-12-07 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  Rhdf5lib               1.33.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  rjson                  0.2.23    2024-09-16 [2] RSPM (R 4.5.0)
    #>  rlang                  1.1.6     2025-04-11 [2] RSPM (R 4.5.0)
    #>  rmarkdown              2.30      2025-09-28 [2] RSPM (R 4.5.0)
    #>  Rsamtools              2.27.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  RSQLite                2.4.5     2025-11-30 [2] RSPM (R 4.5.0)
    #>  rsvd                   1.0.5     2021-04-16 [2] RSPM (R 4.5.0)
    #>  rtracklayer            1.71.3    2025-12-17 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  S4Arrays               1.11.1    2025-11-25 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  S4Vectors            * 0.49.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.2)
    #>  scales                 1.4.0     2025-04-24 [2] RSPM (R 4.5.0)
    #>  scran                  1.39.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  scRNAseq             * 2.25.0    2025-11-06 [2] Bioconductor 3.23 (R 4.5.2)
    #>  scuttle              * 1.21.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  Seqinfo              * 1.1.0     2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  SparseArray            1.11.10   2025-12-16 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  StatescopeR          * 0.99.33   2025-12-24 [1] https://bioc.r-universe.dev (R 4.5.2)
    #>  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.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  sys                    3.4.3     2024-10-04 [2] RSPM (R 4.5.0)
    #>  tibble                 3.3.0     2025-06-08 [2] RSPM (R 4.5.0)
    #>  tidyselect             1.2.1     2024-03-11 [2] RSPM (R 4.5.0)
    #>  timechange             0.3.0     2024-01-18 [2] RSPM (R 4.5.0)
    #>  UCSC.utils             1.7.1     2025-12-09 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  vctrs                  0.6.5     2023-12-01 [2] RSPM (R 4.5.0)
    #>  withr                  3.0.2     2024-10-28 [2] RSPM (R 4.5.0)
    #>  xfun                   0.55      2025-12-16 [2] RSPM (R 4.5.0)
    #>  XML                    3.99-0.20 2025-11-08 [2] RSPM (R 4.5.0)
    #>  xml2                   1.5.1     2025-12-01 [2] RSPM (R 4.5.0)
    #>  XVector                0.51.0    2025-10-29 [2] https://bioc.r-universe.dev (R 4.5.2)
    #>  yaml                   2.3.12    2025-12-10 [2] RSPM (R 4.5.0)
    #>
    #>  [1] /tmp/RtmpdWWYmb/Rinst1d724b6aff8
    #>  [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.33/autogenes/bin/python
    #>  libpython:      /github/home/.pyenv/versions/3.7.17/lib/libpython3.7m.so
    #>  pythonhome:     /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes:/github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes
    #>  version:        3.7.17 (default, Dec 25 2025, 05:05:48)  [GCC 13.3.0]
    #>  numpy:          /github/home/.cache/R/basilisk/1.23.0/StatescopeR/0.99.33/autogenes/lib/python3.7/site-packages/numpy
    #>  numpy_version:  1.21.6
    #>
    #>  NOTE: Python version was forced by use_python() function
    #>
    #> ──────────────────────────────────────────────────────────────────────────────