Package: spicyR 2.1.1

Ellis Patrick

spicyR: Test Changes in the Co-Localisation of Cell Types Between Groups of Patients

spicyR tests whether the spatial co-localisation of pairs of cell types differs between groups of patients, or is associated with patient outcome, in cell-resolution spatial omics data (imaging mass cytometry, CODEX, MIBI, Xenium, CosMx and others). Its default method, spicyR Cell, counts the cells of one type within a radius of each cell of another and compares the count with its exact expectation under random labelling of the observed cells. Images are combined within patients by a frailty generalised estimating equation, and differences are tested with a small-sample cluster-robust (CR2) variance with patients as the units. Covariates, several conditions, several radii and survival outcomes are supported, and the original image-level test is kept as an option. The computations run in a C++ core shared with the Python package spicyr.

Authors:Nicolas Canete [aut], Ellis Patrick [aut, cre], Sadiq Dohadwalla [aut], Elijah Willie [aut], Nicholas Robertson [ctb], Alex Qin [ctb], Farhan Ameen [ctb], Shreya Rao [ctb]

spicyR_2.1.1.tar.gz
spicyR_2.1.1.zip(r-4.7-x86_64)spicyR_2.1.1.zip(r-4.7-arm64)spicyR_2.1.1.zip(r-4.6-x86_64)spicyR_2.1.1.zip(r-4.6-arm64)spicyR_2.1.1.zip(r-4.5-x86_64)
spicyR_2.1.1.tgz(r-4.6-x86_64)spicyR_2.1.1.tgz(r-4.6-arm64)spicyR_2.1.1.tgz(r-4.5-x86_64)spicyR_2.1.1.tgz(r-4.5-arm64)
spicyR_2.1.1.tar.gz(r-4.7-arm64)spicyR_2.1.1.tar.gz(r-4.7-x86_64)spicyR_2.1.1.tar.gz(r-4.6-arm64)spicyR_2.1.1.tar.gz(r-4.6-x86_64)
spicyR_2.1.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
spicyR/json (API)

# Install 'spicyR' in R:
install.packages('spicyR', repos = c('https://bioc.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/sydneybiox/spicyr/issues

Pkgdown/docs site:https://sydneybiox.github.io

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • diabetesData - Imaging mass cytometry of human pancreas in type 1 diabetes
  • spicyTest - Results of the image-level test on diabetesData

On BioConductor:spicyR-1.99.56(bioc 3.24)spicyR-1.24.1(bioc 3.23)

singlecellcellbasedassaysspatialsurvivalcpp

8.98 score 12 stars 3 packages 73 scripts 746 downloads 19 exports 34 dependencies

Last updated from:08f0952129. Checks:1 WARNING, 13 ERROR, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksWARNING226
linux-devel-arm64ERROR521
linux-devel-x86_64ERROR648
source / vignettesOK691
linux-release-arm64ERROR534
linux-release-x86_64ERROR602
macos-release-arm64ERROR669
macos-release-x86_64ERROR801
macos-oldrel-arm64ERROR516
macos-oldrel-x86_64ERROR1142
windows-devel-arm64ERROR679
windows-devel-x86_64ERROR907
windows-release-arm64ERROR681
windows-release-x86_64ERROR930
windows-oldrel-x86_64ERROR845
wasm-releaseOK210

Exports:bindbuildKnnGraphcalibrationCheckcolTestconvPairsgetPairwisegetPairwisePropgetPropimageCrossPlotkontextualEngineplotImageradiusPlotsignifPlotspicyspicyBoxPlottestCorrelationtopFollowUpstopPairswriteCellStore

Dependencies:BHBiocGenericsBiocParallelclicodetoolscpp11farverformatRfutile.loggerfutile.optionsgenericsggplot2gluegtableisobandlabelinglambda.rlatticelifecycleMatrixR6RColorBrewerRcppRcppEigenRhpcBLASctlrlangS4VectorsS7scalessnowsurvivalvctrsviridisLitewithr

Introduction to spicyR
Introduction | The data | Testing every pair of cell types | Seeing every pair at once | Looking at one pair | Looking at the images | Tissue compartments | Extra fraction or count? | Patients with several images | Adjusting for clinical covariates | Which radius? | Is co-localisation associated with survival? | A check you can run | How it works | Small studies | Reporting results | Coming from spicyR 1.x | Python | Very large data sets: SpatialData stores | Session information | References

Last update: 2026-11-23
Started: 2022-11-10

The original image-level test in spicyR
Installation | Overview | Example data | Linear modelling | Test for change in localisation for a specific pair of cells | Test for change in localisation for all pairwise cell combinations | Linear modelling for custom metrics | Performing survival analysis | Accounting for tissue inhomogeneity | Mixed effects modelling | Session information | References

Last update: 2026-11-23
Started: 2026-10-02

Readme and manuals

Help Manual

Help pageTopics
The per-image values of every pair, or of one pair, as a data framebind
Build a k-nearest-neighbour graph between cellsbuildKnnGraph
Check that spicy() is calibrated on your data by shuffling the conditioncalibrationCheck plot.spicyCalibration summary.spicyCalibration
Perform a simple wilcoxon-rank-sum test or t-test on the columns of a data framecolTest
Converts colPairs object into an abundance matrix based on number of nearby interactions for every cell type.convPairs
Imaging mass cytometry of human pancreas in type 1 diabetes (Damond et al. 2019)diabetesData
Get statistic from pairwise L curve of a single image.getPairwise
Observed/expected proportion ratio for a fixed-k neighbourhoodgetPairwiseProp
Get proportions from a SummarizedExperiment.getProp
Pairwise cross-plot of spatial associationsimageCrossPlot
Plot images, showing their cell types or the 'from' and 'to' cells of a pairplotImage
The evidence for pairs at each radiusradiusPlot
Plots result of signifPlot.signifPlot
Test for changes in the co-localisation of cell types between conditionsspicy
Box plot of one pair, with a point per imagespicyBoxPlot
The results of spicy()SpicyResults SpicyResults-class
Results of the image-level test on diabetesDataspicyTest
The correlation between the tests of a spicy() resulttestCorrelation
The follow-up comparisons of two levels, for more than two conditionstopFollowUps
The most significant pairs, or the results of chosen pairstopPairs topPairs,SpicyResults-method
Write cells as a SpatialData Zarr storewriteCellStore