Package: SpNeigh 1.1.0

Jinming Cheng

SpNeigh: Spatial Neighborhood Modeling and Differential Expression Analysis for Transcriptomics

SpNeigh provides methods for neighborhood-aware analysis of spatial transcriptomics data. It supports boundary detection, spatial weighting (centroid- and boundary-based), spatially informed differential expression using spline-based models, and spatial enrichment analysis via the Spatial Enrichment Index (SEI). Designed for compatibility with Seurat objects, SpatialExperiment objects and spatial data frames, SpNeigh enables interpretable, publication-ready analysis of spatial gene expression patterns.

Authors:Jinming Cheng [aut, cre]

SpNeigh_1.1.0.tar.gz
SpNeigh_1.1.0.zip(r-4.7)SpNeigh_1.1.0.zip(r-4.6)SpNeigh_1.1.0.zip(r-4.5)
SpNeigh_1.1.0.tgz(r-4.6-any)SpNeigh_1.1.0.tgz(r-4.5-any)
SpNeigh_1.1.0.tar.gz(r-4.7-any)SpNeigh_1.1.0.tar.gz(r-4.6-any)
SpNeigh_1.1.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
SpNeigh/json (API)
NEWS

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

Bug tracker:https://github.com/jinming-cheng/spneigh/issues

On BioConductor:SpNeigh-1.1.0(bioc 3.24)SpNeigh-1.0.0(bioc 3.23)

spatialsinglecellgeneexpressiondifferentialexpressiontranscriptomicssoftware

5.68 score 3 stars 274 downloads 35 exports 180 dependencies

Last updated from:bfc471bc69. Checks:1 NOTE, 9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
bioc-checksNOTE190
linux-devel-x86_64OK357
source / vignettesOK265
linux-release-x86_64OK314
macos-release-arm64OK169
macos-oldrel-arm64OK168
windows-develOK262
windows-releaseOK204
windows-oldrelOK202
wasm-releaseOK190

Exports:addBoundaryaddBoundaryPolyboundaryPolyToPointsbuildBoundaryPolycolors15_chengcomputeBoundaryWeightscomputeCentroidWeightscomputeSEIcomputeSpatialEnrichmentIndexcomputeSpatialInteractionMatrixextractCoordsfactorNaturalOrdergetBoundarygetCellsInsidegetInnerBoundarygetOuterBoundarygetRingRegionplotBoundaryplotCellsInsideplotEdgeplotExpressionplotInteractionMatrixplotRegionplotSpatialExpressionplotStatsBarplotStatsPieplotWeightsremoveOutliersrunLimmaDErunSpatialDEsafeColorPalettesplineDesignsplitBoundaryPolyByAnchorstatsCellsInsidetheme_spneigh

Dependencies:abindaskpassbase64encBHBiobaseBiocFileCacheBiocGenericsbitbit64bitopsblobbslibcachemcaToolsclassclassIntcliclustercodetoolscommonmarkconcavemancowplotcpp11crosstalkcurldata.tableDBIdbplyrdbscanDelayedArraydeldirdigestdotCall64dplyrdqrnge1071evaluatefarverfastDummiesfastmapfilelockfitdistrplusFNNfontawesomefsfuturefuture.applygenericsGenomicRangesggplot2ggrepelggridgesglobalsgluegoftestgplotsgridExtragtablegtoolsherehighrhtmltoolshtmlwidgetshttpuvhttrhttr2icaigraphIRangesirlbaisobandjquerylibjsonliteKernSmoothknitrlabelinglaterlatticelazyevallifecyclelimmalistenvlmtestmagickmagrittrMASSMatrixMatrixGenericsmatrixStatsmemoisemimeminiUInlmeopensslotelparallellypatchworkpbapplypillarpkgconfigplotlyplyrpngpolyclipprogressrpromisesproxypurrrR6RANNrappdirsRColorBrewerRcppRcppAnnoyRcppArmadilloRcppEigenRcppHNSWRcppProgressRcppTOMLreshape2reticulaterjsonrlangrmarkdownROCRrprojrootRSpectraRSQLiteRtsnes2S4ArraysS4VectorsS7sassscalesscattermoresctransformSeqinfoSeuratSeuratObjectsfshinySingleCellExperimentsitmosourcetoolsspspamSparseArraySpatialExperimentspatstat.dataspatstat.explorespatstat.geomspatstat.randomspatstat.sparsespatstat.univarspatstat.utilsstatmodstringistringrSummarizedExperimentsurvivalsystensortibbletidyrtidyselecttinytexunitsutf8uwotV8vctrsviridisLitewithrwkxfunxtableXVectoryamlzoo

Getting Started with SpNeigh

Rendered fromSpNeigh.Rmdusingknitr::rmarkdownon May 30 2026.

Last update: 2026-04-09
Started: 2025-06-01

Readme and manuals

Help Manual

Help pageTopics
Add boundary outlines to a spatial ggplotaddBoundary
Add boundary polygons or linestrings to a spatial plotaddBoundaryPoly
Convert boundary polygons to boundary point coordinatesboundaryPolyToPoints
Convert boundary points into valid polygon geometriesbuildBoundaryPoly
Custom Color Palettecolors15_cheng
Compute spatial weights based on distance to nearest boundarycomputeBoundaryWeights
Compute spatial weights based on distance to the centroidcomputeCentroidWeights
Compute Spatial Enrichment Index (SEI)computeSEI
Compute Spatial Enrichment Index (SEI) for Each GenecomputeSpatialEnrichmentIndex
Compute a spatial neighborhood interaction matrix using K-nearest neighbors (KNN)computeSpatialInteractionMatrix
Extract spatial coordinates and cluster informationextractCoords
Create a factor with natural (human-friendly) orderingfactorNaturalOrder
Extract spatial boundary points for a cluster or cell populationgetBoundary
Identify cells located within spatial boundaries or ring regionsgetCellsInside
Generate an inner boundary polygon by shrinking an existing boundary inwardgetInnerBoundary
Generate an outer or inner boundary polygon by buffering an existing boundarygetOuterBoundary
Generate ring regions between a boundary and its outer buffergetRingRegion
Plot spatial cell coordinates with cluster boundariesplotBoundary
Plot cells located within spatial boundaries or ring regionsplotCellsInside
Plot boundary edges or segmented boundary linesplotEdge
Plot gene expression across spatial coordinatesplotExpression
Plot a heatmap of a row-scaled spatial interaction matrixplotInteractionMatrix
Plot filled spatial regions inside boundaries or ringsplotRegion
Plot average gene expression along spatial distanceplotSpatialExpression
Bar plot of cluster statistics for cells inside boundaries or ring regionsplotStatsBar
Pie chart or donut chart of cluster proportions inside spatial regionsplotStatsPie
Plot spatial weights for cells on a spatial plotplotWeights
Removes spatial outlier cells based on local k-nearest neighbor distancesremoveOutliers
Differential expression analysis between two groups of cells using limmarunLimmaDE
Differential expression along spatial distance gradients using splinesrunSpatialDE
Generate a safe color palette for discrete clusterssafeColorPalette
Generate an orthonormal spline-based design matrixsplineDesign
Split a polygon boundary into two parts using anchor pointssplitBoundaryPolyByAnchor
Summarize cell counts and proportions inside spatial regionsstatsCellsInside
Custom ggplot2 themetheme_spneigh