Skip to contents

Creates a network diagram of signaling between clusters. Nodes are clusters and directed edges indicate signaling from one cluster to another. Edges are colored based on the color scheme of the ligand expressing cluster.

Usage

signaling_network(
  dom,
  cols = NULL,
  edge_weight = 0.3,
  clusts = NULL,
  showOutgoingSignalingClusts = NULL,
  showIncomingSignalingClusts = NULL,
  min_thresh = -Inf,
  max_thresh = Inf,
  normalize = "none",
  scale = "sq",
  layout = "circle",
  scale_by = "rec_sig",
  vert_scale = 3,
  plot_title = NULL,
  ...
)

Arguments

dom

Domino object with network built (build_domino())

cols

Named vector indicating the colors for clusters. Values are colors and names must match clusters in the domino object. If left as NULL then ggplot colors are generated for the clusters.

edge_weight

Weight for determining thickness of edges on plot. Signaling values are multiplied by this value.

clusts

Vector of clusters to be included in the network plot.

showOutgoingSignalingClusts

Vector of clusters to plot the outgoing signaling from

showIncomingSignalingClusts

Vector of clusters to plot the incoming signaling on

min_thresh

Minimum signaling threshold. Values lower than the threshold will be set to the threshold. Defaults to -Inf for no threshold.

max_thresh

Maximum signaling threshold for plotting. Values higher than the threshold will be set to the threshold. Defaults to Inf for no threshold.

normalize

Options to normalize the signaling matrix. Accepted inputs are 'none' for no normalization, 'rec_norm' to normalize to the maximum value with each receptor cluster, or 'lig_norm' to normalize to the maximum value within each ligand cluster

scale

How to scale the values (after thresholding). Options are 'none', 'sqrt' for square root, 'log' for log10, or 'sq' for square.

layout

Type of layout to use. Options are 'random', 'sphere', 'circle', 'fr' for Fruchterman-Reingold force directed layout, and 'kk' for Kamada Kawai for directed layout.

scale_by

How to size vertices. Options are 'lig_sig' for summed outgoing signaling, 'rec_sig' for summed incoming signaling, and 'none'. In the former two cases the values are scaled with asinh after summing all incoming or outgoing signaling.

vert_scale

Integer used to scale size of vertices with our without variable scaling from size_verts_by.

plot_title

Text for the plot's title.

...

Other parameters to be passed to plot when used with an igraph object.

Value

an igraph rendered to the active graphics device

Examples

#basic usage
signaling_network(dominoSignal:::pbmc_dom_built_tiny)

# scaling, thresholds, layouts, selecting clusters
signaling_network(
 dominoSignal:::pbmc_dom_built_tiny, showOutgoingSignalingClusts = "CD14_monocyte", 
 scale = "none", norm = "none", layout = "fr", scale_by = "none", 
 vert_scale = 5)