plotNhoodGraph: Plot graph of neighbourhood

View source: R/plotNhoods.R

plotNhoodGraphR Documentation

Plot graph of neighbourhood

Description

Visualize graph of neighbourhoods

Usage

plotNhoodGraph(
  x,
  layout = "UMAP",
  colour_by = NA,
  subset.nhoods = NULL,
  size_range = c(0.5, 3),
  node_stroke = 0.3,
  is.da = FALSE,
  highlight.da = FALSE,
  ...
)

Arguments

x

A Milo object

layout

this can be (a) a character indicating the name of the reducedDim slot in the Milo object to use for layout (default: 'UMAP') (b) an igraph layout object

colour_by

this can be a data.frame of milo results or a character corresponding to a column in colData

subset.nhoods

A logical, integer or character vector indicating a subset of nhoods to show in plot (default: NULL, no subsetting). This is necessary if testNhoods was run using subset.nhoods=....

size_range

a numeric vector indicating the range of node sizes to use for plotting (to avoid overplotting in the graph)

node_stroke

a numeric indicating the desired thickness of the border around each node

is.da

logical scalar that tells plotNhoodGraph to order nhoods by |LFC| which can help to visually emphasise which nhoods are DA.

highlight.da

logical or numeric scalar that emphasises the DA nhoods in the layout by adjusting the transparency of the non-DA nhoods. Can only be used if is.da=TRUE, otherwise will give a warning. If highlight.da is a numeric then it explicitly sets the transparency level (must be between 0 and 1). If highlight.da is logical then the transparency is set to 0.1

...

arguments to pass to ggraph

Value

a ggplot-class object

Author(s)

Emma Dann

Examples

NULL


MikeDMorgan/miloR documentation built on Oct. 19, 2024, 8:39 p.m.