Package: SPOTlight 1.16.0

Marc Elosua-Bayes

SPOTlight: `SPOTlight`: Spatial Transcriptomics Deconvolution

`SPOTlight` provides a method to deconvolute spatial transcriptomics spots using a seeded NMF approach along with visualization tools to assess the results. Spatially resolved gene expression profiles are key to understand tissue organization and function. However, novel spatial transcriptomics (ST) profiling techniques lack single-cell resolution and require a combination with single-cell RNA sequencing (scRNA-seq) information to deconvolute the spatially indexed datasets. Leveraging the strengths of both data types, we developed SPOTlight, a computational tool that enables the integration of ST with scRNA-seq data to infer the location of cell types and states within a complex tissue. SPOTlight is centered around a seeded non-negative matrix factorization (NMF) regression, initialized using cell-type marker genes and non-negative least squares (NNLS) to subsequently deconvolute ST capture locations (spots).

Authors:Marc Elosua-Bayes [aut, cre], Zachary DeBruine [aut], Helena L. Crowell [aut]

SPOTlight_1.16.0.tar.gz
SPOTlight_1.16.0.zip(r-4.7)SPOTlight_1.16.0.zip(r-4.6)SPOTlight_1.16.0.zip(r-4.5)
SPOTlight_1.16.0.tgz(r-4.6-x86_64)SPOTlight_1.16.0.tgz(r-4.6-arm64)SPOTlight_1.16.0.tgz(r-4.5-x86_64)SPOTlight_1.16.0.tgz(r-4.5-arm64)
SPOTlight_1.16.0.tar.gz(r-4.7-arm64)SPOTlight_1.16.0.tar.gz(r-4.7-x86_64)SPOTlight_1.16.0.tar.gz(r-4.6-arm64)SPOTlight_1.16.0.tar.gz(r-4.6-x86_64)
SPOTlight_1.16.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
card.svg |card.png
SPOTlight/json (API)
NEWS

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

Bug tracker:https://github.com/marcelosua/spotlight/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
  • openmp– GCC OpenMP (GOMP) support library

On BioConductor:SPOTlight-1.17.0(bioc 3.24)SPOTlight-1.16.0(bioc 3.23)

singlecellspatialstatisticalmethodcppopenmp

8.90 score 208 stars 218 scripts 748 downloads 11 exports 38 dependencies

Last updated from:0a54588cec (on RELEASE_3_23). Checks:12 NOTE, 2 OK. Indexed: no.

TargetResultTimeFilesSyslog
bioc-checksNOTE264
linux-devel-arm64NOTE507
linux-devel-x86_64NOTE465
source / vignettesOK422
linux-release-arm64NOTE360
linux-release-x86_64NOTE435
macos-release-arm64NOTE200
macos-release-x86_64NOTE528
macos-oldrel-arm64NOTE414
macos-oldrel-x86_64NOTE398
windows-develNOTE605
windows-releaseNOTE342
windows-oldrelNOTE696
wasm-releaseOK219

Exports:getMGSmockSCmockSPplotCorrelationMatrixplotImageplotInteractionsplotSpatialScatterpieplotTopicProfilesrunDeconvolutionSPOTlighttrainNMF

Dependencies:abindBiobaseBiocGenericsclicpp11DelayedArrayfarvergenericsGenomicRangesggplot2gluegtableIRangesisobandlabelinglatticelifecycleMatrixMatrixGenericsmatrixStatsR6RColorBrewerRcppRcppEigenrlangS4ArraysS4VectorsS7scalesSeqinfoSingleCellExperimentSparseArraysparseMatrixStatsSummarizedExperimentvctrsviridisLitewithrXVector

Spatial Transcriptomics Deconvolution with SPOTlight

Rendered fromSPOTlight_kidney.Rmdusingknitr::rmarkdownon May 30 2026.

Last update: 2025-05-26
Started: 2022-01-26

Readme and manuals

Help Manual

Help pageTopics
.init_nmf <- function(x, groups, mgs, n_top = NULL, gene_id = "gene", group_id = "cluster", weight_id = "weight") # check validity of input arguments if (is.null(n_top)) n_top <- max(table(mgs[[group_id]])) stopifnot( is.character(gene_id), length(gene_id) == 1, is.character(group_id), length(group_id) == 1, is.character(weight_id), length(weight_id) == 1, c(gene_id, group_id, weight_id) is.numeric(n_top), length(n_top) == 1, round(n_top) == n_top) ng <- nrow(x) nc <- ncol(x) names(ks) <- ks <- unique(groups) # subset 'n_top' features mgs <- split(mgs, mgs[[group_id]]) mgs <- lapply(mgs, function(df) o <- order(df[[weight_id]], decreasing = TRUE) n <- ifelse(nrow(df) < n_top, nrow(df), n_top) df[o, ][seq_len(n), ] ) # subset unique features mgs <- lapply(ks, function(k) g1 <- mgs[[k]][[gene_id]] g2 <- unlist(lapply(mgs[ks != k], `[[`, gene_id)) mgs[[k]][!g1 ) # W is of dimension (#groups)x(#features) with W(i,j) # equal to weight if j is marker for i, and ~0 otherwise W <- vapply(ks, function(k) w <- numeric(ng) + 1e-12 names(w) <- rownames(x) ws <- mgs[[k]][[weight_id]] w[mgs[[k]][[gene_id]]] <- ws return(w) , numeric(ng)) # there is no need to initialize H tp <- paste0("topic_", seq_len(length(ks))) dimnames(W) <- list(rownames(x), tp) return(W) Filter features from expression matrix.filter
Synthetic single-cell, mixture and marker datadata getMGS mockSC mockSP
Plot Correlation MatrixplotCorrelationMatrix
Plot JP(E)G/PNG/Raster/RGB imagesplotImage
Plot group interactionsplotHeatmap plotInteractions plotNetwork
Spatial scatterpieplotSpatialScatterpie
Plot NMF topic profilesplotTopicProfiles
Run Deconvolution using NNLS modelrunDeconvolution
Deconvolution of mixture using single-cell dataSPOTlight
train NMF modeltrainNMF