spiDE

Run spiDE end to end

Description

Builds the niche covariates at bandwidth sigma (unless spe already carries them), fits the per-patient niche models (fitSpiDE()) and tests them (testSpiDE()): the pooled niche test always, and the condition-specific test when a condition is given.

Usage

spiDE(spe, condition = NULL, ...)

## S4 method for signature 'SpatialExperiment'
spiDE(
  spe,
  condition = NULL,
  sigma,
  engine = c("slopes", "sandwich"),
  procedure = c("pooled_or_heterogeneity", "heterogeneity", "filtered", "all"),
  fdr = 0.05,
  cell_type = "cell_type",
  sample_id = "sample_id",
  name = "Niche",
  BPPARAM = BiocParallel::SerialParam(),
  verbose = TRUE,
  ...
)

Arguments

spe a SpatialExperiment with raw counts.
condition NULL or the colData column of a two-level, patient-level condition.
… further arguments to fitSpiDE().
sigma the niche bandwidth.
engine “slopes” or “sandwich”, see fitSpiDE().
procedure, fdr passed to testSpiDE(); procedure defaults to the engine’s default there.
cell_type, sample_id the colData columns of cell type and patient.
name the niche reducedDim prefix: the niches are read from, or built into, reducedDim(spe, paste0(name, sigma)).
BPPARAM a BiocParallelParam.
verbose report progress.

Value

a SpiDEResults.

Examples

library("spiDE")

data(toySpiDE)
res <- spiDE(toySpiDE, condition = "condition", sigma = 30, index = "A",
             procedure = "all")
head(results(res))