Plots the average gene expression in neighbourhoods, sorted by DA fold-change

plotNhoodExpressionDA(
  x,
  da.res,
  features,
  alpha = 0.1,
  subset.nhoods = NULL,
  cluster_features = FALSE,
  assay = "logcounts",
  scale_to_1 = FALSE,
  show_rownames = TRUE,
  highlight_features = NULL
)

Arguments

x

A Milo object

da.res

a data.frame of DA testing results

features

a character vector of features to plot (they must be in rownames(x))

alpha

significance level for Spatial FDR (default: 0.1)

subset.nhoods

A logical, integer or character vector indicating a subset of nhoods to show in plot (default: NULL, no subsetting)

cluster_features

logical indicating whether features should be clustered with hierarchical clustering. If FALSE then the order in features is maintained (default: FALSE)

assay

A character scalar that describes the assay slot to use for calculating neighbourhood expression. (default: logcounts) Of note: neighbourhood expression will be computed only if the requested features are not in the nhoodExpression slot of the milo object. If you wish to plot average neighbourhood expression from a different assay, you should run calcNhoodExpression(x) with the desired assay.

scale_to_1

A logical scalar to re-scale gene expression values between 0 and 1 for visualisation.

show_rownames

A logical scalar whether to plot rownames or not. Generally useful to set this to show_rownames=FALSE when plotting many genes.

highlight_features

A character vector of feature names that should be highlighted on the right side of the heatmap. Generally useful in conjunction to show_rownames=FALSE, if you are interested in only a few features

Value

a ggplot object

Examples

NULL
#> NULL