Skip to content

scPairs

0.1.8Package record

Identifying Synergistic Gene Pairs in Single-Cell and Spatial Transcriptomics

0packages depend
3.4Kdownloads / year
40.8%test coverage
13/13flavors OK

Overview

About

Discovers synergistic gene pairs in single-cell RNA-seq and spatial transcriptomics data. Unlike conventional pairwise co-expression analyses that rely on a single correlation metric, scPairs integrates 14 complementary metrics across five orthogonal evidence layers to compute a composite synergy score with optional permutation-based significance testing. The five evidence layers span cell-level co-expression (Pearson, Spearman, biweight midcorrelation, mutual information, ratio consistency), neighbourhood-aware smoothing (KNN-smoothed correlation, neighbourhood co-expression, cluster pseudo-bulk, cross-cell-type, neighbourhood synergy), prior biological knowledge (GO/KEGG co-annotation Jaccard, pathway bridge score), trans-cellular interaction, and spatial co-variation (Lee's L, co-location quotient). This multi-scale design enables researchers to move beyond simple co-expression towards a comprehensive characterisation of cooperative gene regulation at transcriptomic and spatial resolution. For more information, see the package documentation at https://github.com/zhaoqing-wang/scPairs.

Changes in 0.1.8

Summary

First CRAN submission release. Addresses all reviewer feedback from the initial

check, introduces a built-in test dataset, completes function documentation,

and extends the test suite. Package structure has been overhauled to follow

established CRAN bioinformatics conventions.

------------------------------------------------------------------------

CRAN Compliance

  • **Added reference URL** to the Description field of DESCRIPTION (<https://github.com/zhaoqing-wang/scPairs>), as required.
  • **Added \value tags** to all three exported print() S3 methods (print.scPairs_result, print.scPairs_gene_result, print.scPairs_pair_result); each returns its input object invisibly.
Show all changes in 0.1.8Hide the rest of the changes in 0.1.8
  • **Rationalised examples**: nine exported functions now run plain R examples during R CMD check. Two functions (AssessGenePair, PlotPairSummary) are wrapped in \donttest{} because their examples exceed the five-second threshold on the check servers. Three functions retain \dontrun{} because they require software not guaranteed to be present: PlotPairSpatial (spatial-assay Seurat object), PlotBridgeNetwork and PlotPairSynergy (Bioconductor annotation packages org.Hs.eg.db / org.Mm.eg.db).
  • **Removed set.seed()** from inside .plot_bridge_network_enhanced() (R/plot_synergy.R); the package no longer modifies the user's RNG state.
  • **Fixed Unicode in documentation**: replaced non-ASCII characters (U+2248 approximately-equal, U+00D7 multiplication sign, U+2013/U+2014 dashes) in scpairs_testdata Rd documentation with ASCII equivalents, resolving the LaTeX PDF-manual build error.
  • **Fixed invalid URI in README.md**: the LICENSE.md hyperlink now points to the full GitHub URL rather than a bare file path, removing the URI validity note.
  • **Added inst/WORDLIST** listing domain-specific terms (Jaccard, KEGG, KNN, midcorrelation, transcriptomics, etc.) to suppress false-positive spell-check notes.

------------------------------------------------------------------------

Built-in Test Dataset

  • **New dataset scpairs_testdata** (data/scpairs_testdata.rda, 26 KB): a synthetic Seurat object (100 cells, 20 genes, 3 balanced clusters, 5-component PCA, 2-D UMAP) with two injected co-expression patterns:
  • **GENE3 & GENE4**: globally correlated across all cells (Pearson r approximately 0.89 in normalised data).
  • **GENE1 & GENE2**: moderately correlated within cluster 1 only.
  • All remaining pairs: near-independent noise.
  • Generation script provided in data-raw/make_testdata.R (set.seed(7391)); data-raw/ is excluded from the CRAN build via .Rbuildignore.
  • All runnable examples reference scpairs_testdata directly, eliminating the need for inline Seurat-object construction in any function documentation.
  • Dataset documented in R/scpairs_testdata.R with @format, @details, @usage, @source, @seealso, and @family Section_0_Data tags.

------------------------------------------------------------------------

Documentation Improvements

  • **Completed documentation** for PlotPairSummary() (added @examples, improved @return) and PlotPairSynergy() (added @examples with \dontrun{}, expanded @return for all four panels).
  • **Added @family tags** grouping all exported functions into three help families:
  • Section_0_Data -- scpairs_testdata
  • Section_1_Discovery -- FindAllPairs, FindGenePairs, AssessGenePair
  • Section_2_Visualization -- all eleven PlotPair* and PlotBridgeNetwork functions
  • **Added @seealso cross-references** throughout, linking each function to its most closely related counterparts.
  • **Improved @return descriptions** for PlotPairDimplot, PlotPairViolin, PlotPairScatter, PlotPairSmoothed, PlotPairSummary, PlotPairCrossType, PlotPairSpatial, PlotPairNetwork, and PlotPairHeatmap.

------------------------------------------------------------------------

Package Structure

  • R/data.R renamed to R/scpairs_testdata.R, following the convention of naming dataset documentation files after the dataset itself.
  • tests/README.md added: documents test categories, expected behaviour, coverage targets, and a contribution template.
  • Six demonstration plots saved to docs/ from scpairs_testdata: scpairs_network.png, scpairs_heatmap.png, scpairs_dimplot.png, scpairs_smoothed.png, scpairs_violin.png, scpairs_scatter.png.
  • README.md restructured: CRAN/GitHub badges, right-aligned logo, full table of contents, collapsible dependency section, Visualization Gallery embedding the six demo images, and an expanded Functions reference table.

------------------------------------------------------------------------

Test Suite

  • All seven test files updated to use scpairs_testdata directly, removing per-test Seurat pipeline construction and improving reproducibility. create_test_seurat() is retained in helper-test_data.R for edge-case tests requiring custom configurations (single-cluster data, spatial coordinates, unusual gene counts).
  • **Two latent test warnings resolved**:
  • test-assess-pair.R: the n_perm = 49 call is now wrapped in suppressWarnings() -- the low-permutation advisory is intentional package behaviour, not a test defect.
  • test-consolidated-functions.R: the third matrix row in the .compute_ratio_consistency batch test now uses abs(rnorm(n)) to prevent log2(mat + 1) from receiving negative inputs.
  • **115 tests passing**, 0 failures, 0 warnings, 0 skips.

------------------------------------------------------------------------

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 6.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-04
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-06-09
  • ERROR12 OK, 1 ERROR2026-06-08
  • OK12 OK2026-04-25
Show 3 earlier changesHide 3 earlier changes
  • NOTE13 OK, 1 NOTE2026-04-10
  • ERROR12 OK, 1 NOTE, 1 ERROR2026-04-09
  • NOTE12 OK, 1 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.1.8
READMEYes · 1,111 wordsVignettesNoNEWSYes · 100% structured · mentions 0.1.8Citation fileNoWebsitenot declared in DESCRIPTION
Help pages
97 (79 internal)
Examples that run
67%10 run in a plain check · 2 only when donttest examples are enabled (R CMD check --as-cran) · 3 never run
Exported functions with examples
100%
Documented parameters
98%
Return-value docs
100%
Help pages citing references
2%

Downloads

3.4K
CRAN downloads in the past year
Rank #9,277 · ~9/day · ~281/mo
Daily download trend is not available in this view yet.
35330 days
1K90 days
3.4K1 year
Compare downloads with other packages →
Also on43 r2u3 autocran

Repository

4Stars
0Forks
0Open issues
0Open PRs
5Releases
45Commits
1Commit identities
45 commits · Last activity 2026-04-23 · 0% stars, 30d · Default branch at 0.1.9, ahead of CRAN 0.1.8 (checked 2026-10-18)
Responsiveness
not measured

Stars over time

2026-07-14 · 32026-08-28 · 4
PracticesBeta

1 development-tooling and community-health practice detected across 1 family in the upstream repository

Checks run against github.com/zhaoqing-wang/scpairs on 2026-10-18.

Reproducibility and dev environment (1)
data-raw/
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
17 external dependencies (excludes base and recommended)

Installing scPairs adds 142 packages (87 with compiled code, 138 MB of source tarballs). Heaviest: BH 14 MB, stringi 11 MB, ggplot2 6.0 MB.

Depends (1)
R >= 4.1.0
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 0.1.8 (2026)
Releases (1)
  • R
    R 4.6.0 released · 2026-04-24
  • 0.1.8Latest
    2026-03-05 · current release
  • R
    R 4.5.0 released · 2025-04-11

Package metadata

First published
2026-03-05
Total releases
1 / 1 yrs
License
MIT + file LICENSE OSI
Minimum R
≥ 4.1.0
Bundled data
25 KB / 1 file
Download size
136 KB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("scPairs")
Wang, Z. (2026). scPairs: Identifying Synergistic Gene Pairs in Single-Cell and Spatial Transcriptomics (Version 0.1.8) [Computer software]. https://doi.org/10.32614/CRAN.package.scPairs

This package has no citation file, so citation() returns this entry built from DESCRIPTION.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for scPairs version 0.1.8 [Data set]. HJJB, LLC. Data release v2026-10-22. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-22, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy