ALL Metrics
-
Views
Get PDF
Get XML
Cite
Export
Track
Software Tool Article

scCoExpress: A Sparsity-Aware R Package for Gene Co-Expression Analysis in Single-Cell Datasets

[version 1; peer review: awaiting peer review]
PUBLISHED 27 Jul 2026
Author details Author details
OPEN PEER REVIEW
REVIEWER STATUS AWAITING PEER REVIEW

This article is included in the RPackage gateway.

This article is included in the Bioinformatics gateway.

Abstract

Abstract*

With the advent of single-cell and spatial transcriptomics, many research groups are interested in identifying genes which are disproportionately expressed in the same cells at the same time. However, due to the sparsity of single cell data at the level of individual cells, this can be challenging. Here, we present scCoExpress: a Seurat-compatible R package that queries the co-expression intensity of gene pairs by scaling co-expression against a background distribution of similarly abundant gene-gene comparisons.

Keywords

single-cell transcriptomics, spatial transcriptomics, R, Seurat, co-expression, co-localization

Introduction

Identifying co-expressed gene pairs at the level of single cells is of high importance to many research programs, but due to the relatively low UMI count per cell, it can be difficult to identify whether a lack of co-expression in any given cell is caused by true non-expression, or by stochastic zero-inflation.

Many papers have previously analyzed co-expression at the single cell level through a variety of methodologies, including via simple Pearson correlation matrices.1 More advanced methods aim to deal with UMI sparsity by analyzing proportional abundances,2 or by estimating true expression levels with Poisson distributions.3 However, existing packages still struggle to assess co-expression between lowly expressed genes. Here, we provide a flexible solution for single-cell co-expression which performs strongly between low-abundance gene pairs, implemented as a Seurat-compatible4 R package.

Methods

Implementation

Broadly, the scCoExpress algorithm works by modeling a series of pairwise null interaction strength distributions through permutations, and scaling the interaction strength of target gene pairs against a depth-appropriate background distribution. For example, the interaction strength of a pair of genes which are both expressed in roughly 10% of cells would be scaled against a null distribution of randomly selected gene pairs with abundances near 10%. This establishes a background rate at which random genes at a given pair of abundances co-express, and can be used to assess the degree to which a given gene pair co-localizes relative to chance at a particular sparsity level. Co-expression intensity for all gene comparisons, both the null and target comparisons, are quantified with a modified version of the Manders’ Overlap Coefficient5 originally developed for assessing fluorophore co-localization in confocal arrays:

MOC=k=1cAkBk(k=1cAk2)·(k=1cBk2)

Where c represents all cells in the experiment, A represents the vector of normalized expression of gene A in all cells k, and B represents the vector of normalized expression of gene B in all cells k. For each target gene comparison, a MOC Ratio is calculated as:

MOCRatio=MOCtargetsμ(MOCbackgound)

A Z-score is subsequently calculated for each comparison’s MOC against the null MOC distribution. In cases where many gene pairs are queried, the Z-score is adjusted to a predicted value (“ZAdj”) based on the linear regression of all Z-scores against the raw MOC ratio, in order to reduce noise. Finally, p-values are quantified from Zadj using a standard normal table.

Background MOC distributions are tabulated in one of two ways depending on the user’s settings. The default and recommended way is via “partitions,” wherein all genes in the input are grouped into N equally-sized groups based on the fraction of cells in which each gene is detected, excluding genes with expression extremely close to or equal to either 0% or 100%. One background distribution is then calculated for each pairwise comparison of partitions, and target gene pairs are subsequently normalized against the most appropriate null set. Users also have an option to run scCoExpress in “local” mode, wherein an independent null distribution is generated for each target gene set based on the genes with the closest expression to both targets. Local mode offers improved resolution in many cases, but is substantially less memory efficient when querying a large number of gene pairs

Operation

scCoExpress is currently available for download on Github. It is a simple and user-friendly R package, which in its most minimal form can be run with a single command, and then visualized with a single subsequent command. The only required inputs are a Seurat object with a normalized assay slot, and a vector of genes:

# Install and load libraries
remotes::install_github("katlande/scCoExpress")
library(Seurat)
library(ggplot2)
library(scCoExpress)
# Run co-expression with default settings, returns a data.frame:
co <- CoExpress(obj = pbmc, target_genes = c("gene1", "gene2", "genen"))
# Visualize co-expression as a correlation plot, returns a grob:
plotCoExpr(co)

scCoExpress will query co-expression across all cells in the supplied Seurat object. To restrict the analysis to a specific cell type or variable(s), one must subset the input object as desired prior to running CoExpress(). A full vignette going over input parameters and QC has been provided on GitHub.

Results

To assess scCoExpress’s ability to identify co-expressed genes across tissues, SMART-Seq and 10x 3′ GEX data from all organs available in the Tabula Muris6 mouse single cell atlas were queried. For each tissue, a distinct set of genes expected to show a high degree of co-expression clustering were identified by running Seurat4 v5.0.1.9001’s FindAllMarkers() between all annotated cell types. The top 10 cluster-specific genes for each cell type were identified as genes with an adjusted p-value <0.05 and the highest average log2foldchange between the cluster and background cells. Co-expression was subsequently queried on each marker gene list in its respective tissue, using the default settings of scCoExpress.

In both the SMART-Seq and the 10x 3′ GEX data, scCoExpress was able to identify high levels of significant co-expression within, but not between, cell types from all tissues ( Figure 1, Extended Data 1, Figure 2).

3be15518-d801-4537-bc6a-cbcc61358c97_figure1.gif

Figure 1. Correlation plot of co-expression log (abs(Z-scores))*sign(Z-score) of cell type specific genes from all Tabula Muris 10x tissues.

Numeric clusters identify origin cell type of each marker gene.

3be15518-d801-4537-bc6a-cbcc61358c97_figure2.gif

Figure 2. Percentage of significant gene pairs by tissue source, split by comparisons of marker genes from a single cell type (Within Cell Type) vs. marker genes from different cell types (Across Cell Types).

Additionally, when we assess co-expression results by the sparsity of the input gene pairs, we see that scCoExpress is capable of identifying significant co-expression even when it occurs between two lowly-abundant genes ( Figure 3). Further, when assessing whether low abundance gene pairs (where both genes are expressed in <5% of cells) are depleted from the significantly co-expressed set, we find the inverse. Low-abundance pairs show an enrichment in the significant pair set over the NS pair set via Fisher’s Exact Test: enrichment ratio = 1.34, p = 3.72 × 10−07.

3be15518-d801-4537-bc6a-cbcc61358c97_figure3.gif

Figure 3. Total percent expression of both input genes from all marker gene comparisons within cell types, split by whether or not the comparison is significant.

Discussion

Here, we show that scCoExpress is able to identify co-expressed marker genes as expected across all tissues in Tabula Muris, particularly in cases where both genes are lowly abundant (expressed in <5% of cells). Moreover, when we compare the fraction of significant gene pairs within cell types (expected to be significant) to the fraction of significant gene pairs between cell types (expected to be NS), we see little evidence that scCoExpress is prone to false positive results. Infrequent cases of co-expression between marker genes from different cell type annotations appear to reflect biological truth, such as the case in the 10x marrow set where markers from proerythroblasts and erythroblasts show significant co-expression, or in the 10x lung set where a similar phenomenon occurs between classical and non-classic monocyte marker genes.

Limitations

Tabula Muris is composed of whole-transcriptome single-cell sequencing data from 20 mouse tissues and organs, se-quenced with either the 10x GemCode Single-Cell 3’ Gel Bead and Library V2 Kit or the SMART-seq2 protocol. Each Tabula Muris set contains between 408 and 11,269 cells. Applications of scCoExpress to other species, sequencing strategies, or dataset sizes have not been directly assessed in this article

Additionally, while it is possible to use scCoExpress to query all possible gene pairs in the genome, this is not recommended due to the memory requirements needed to bootstrap local distributions for n(n-1)/2 comparisons where n equals the total transcriptome size. The intended use case for scCoExpress is to assess pairwise co-expression relationships between a specific set of genes of interest, or to query the whole transcriptome against a specific gene of interest. For pairwise queries of extremely large gene sets, it is recommended to run partition mode with a larger number of partitions and extreme.skipping set to TRUE.

Ethics and consent

Ethical approval and consent were not required.

Comments on this article Comments (0)

Version 1
VERSION 1 PUBLISHED 27 Jul 2026
Comment
Author details Author details
Competing interests
Grant information
Copyright
Download
 
Export To
metrics
Views Downloads
F1000Research - -
PubMed Central
Data from PMC are received and updated monthly.
- -
Citations
CITE
how to cite this article
Lande K, Evensen KG and Williams AE. scCoExpress: A Sparsity-Aware R Package for Gene Co-Expression Analysis in Single-Cell Datasets [version 1; peer review: awaiting peer review]. F1000Research 2026, 15:1238 (https://doi.org/10.12688/f1000research.186153.1)
NOTE: If applicable, it is important to ensure the information in square brackets after the title is included in all citations of this article.
track
receive updates on this article
Track an article to receive email alerts on any updates to this article.

Open Peer Review

Current Reviewer Status:
AWAITING PEER REVIEW
AWAITING PEER REVIEW
?
Key to Reviewer Statuses VIEW
ApprovedThe paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approvedFundamental flaws in the paper seriously undermine the findings and conclusions

Comments on this article Comments (0)

Version 1
VERSION 1 PUBLISHED 27 Jul 2026
Comment
Alongside their report, reviewers assign a status to the article:
Approved - the paper is scientifically sound in its current form and only minor, if any, improvements are suggested
Approved with reservations - A number of small changes, sometimes more significant revisions are required to address specific details and improve the papers academic merit.
Not approved - fundamental flaws in the paper seriously undermine the findings and conclusions
Sign In
If you've forgotten your password, please enter your email address below and we'll send you instructions on how to reset your password.

The email address should be the one you originally registered with F1000.

Email address not valid, please try again

You registered with F1000 via Google, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Google account password, please click here.

You registered with F1000 via Facebook, so we cannot reset your password.

To sign in, please click here.

If you still need help with your Facebook account password, please click here.

Code not correct, please try again
Email us for further assistance.
Server error, please try again.