plotTripletHeatmap

Niche-response profiles of genes or gene sets

Description

Features (genes, or gene sets from spiGSEA()) against every (index, niche) column: the fill is the test’s t (gold: the slope rises with the niche’s density, or is higher in the second condition; violet: the reverse), a dot marks a call, grey a feature not tested in that index type. Rows are clustered on their t profiles. Read it for a gene’s or pathway’s response across all cell-type pairs, and for pairs that share responses.

Usage

plotTripletHeatmap(
  x,
  features = NULL,
  test = NULL,
  n = 30L,
  fdr = NULL,
  limit = NULL,
  cluster = TRUE
)

Arguments

x a SpiDEResults (genes) or the table spiGSEA() returns (sets; calls by q.global).
features NULL (the n features with the smallest p-value in any column) or the features to show.
test NULL (the condition-specific test if present, else the pooled test), “pooled” or “condition”.
n the number of features when features is NULL.
fdr the q-value threshold of a call (default: the results’, or 0.05 for sets).
limit the |t| at which the fill saturates (default: the 98th percentile).
cluster order rows by hierarchical clustering of their t profiles.

Value

a ggplot; p$data has the plotted rows with feature and called.

Examples

library("spiDE")

data(toySpiDE)
res <- spiDE(toySpiDE, condition = "condition", sigma = 30, verbose = FALSE)
plotTripletHeatmap(res, test = "pooled", n = 10)