Skip to contents

Liana dotplot interactions by source and target cells

Usage

liana_dotplot(
  liana_res,
  source_groups = NULL,
  target_groups = NULL,
  ntop = NULL,
  specificity = "natmi.edge_specificity",
  magnitude = "sca.LRscore",
  y.label = "Interactions (Ligand -> Receptor)",
  size.label = "Interaction\nSpecificity",
  colour.label = "Expression\nMagnitude",
  show_complex = TRUE,
  size_range = c(2, 10),
  invert_specificity = FALSE,
  invert_magnitude = FALSE,
  invert_function = function(x) -log10(x + 1e-10)
)

Arguments

liana_res

aggregated `liana_wrap` results from multiple methods, or alternatively results from running `liana_wrap` with a single method. Should be filtered by some condition (e.g. preferential consesus ranking, specific interactions, etc).

source_groups

names of the source (sender) cell types (NULL = no filter)

target_groups

names of the target cell types (NULL = no filter)

ntop

number of interactions to return. Note that this assumes that the tibble is sorted in descending order of interaction importance!

specificity

column to represent the dot-size of the interaction (by default `natmi.edge_specificity`)

magnitude

column to represent interactions expression magnitude (by default `sca.LRscore`)

y.label

y label name

size.label

size (~specificty) label name

colour.label

colour (~magnitude) label name

show_complex

logical whether to show complexes (default - TRUE) or only the subunit with minimum expression.

Value

a ggplot2 object

Details

Here, we refer to `specificity` as how specific this interaction is to a cell type pair regards to the rest of the cell type pairs ( e.g. CellPhoneDB's p-values, NATMI's specificity edges, Connectome's scaled weights, etc)

`magnitude` on the other hand is a direct measure of the expression alone, by default we use SingleCellSignalR's dataset indepent LRscore (bound between 0 and 1). Yet, one could also use CellChat's probabilities or CellPhoneDB's means, etc.