Learn R Programming

CellChat (version 1.0.0)

netVisual_bubble: Show all the significant interactions (L-R pairs) from some cell groups to other cell groups

Description

The dot color and size represent the calculated communication probability and p-values.

Usage

netVisual_bubble(
  object,
  sources.use = NULL,
  targets.use = NULL,
  signaling = NULL,
  pairLR.use = NULL,
  color.heatmap = c("Spectral", "viridis"),
  n.colors = 10,
  direction = -1,
  thresh = 0.05,
  comparison = NULL,
  group = NULL,
  remove.isolate = FALSE,
  max.dataset = NULL,
  min.dataset = NULL,
  min.quantile = 0,
  max.quantile = 1,
  line.on = TRUE,
  line.size = 0.2,
  color.text.use = TRUE,
  color.text = NULL,
  title.name = NULL,
  font.size = 10,
  font.size.title = 10,
  show.legend = TRUE,
  grid.on = TRUE,
  color.grid = "grey90",
  angle.x = 90,
  vjust.x = NULL,
  hjust.x = NULL,
  return.data = FALSE
)

Arguments

object

CellChat object

sources.use

a vector giving the index or the name of source cell groups

targets.use

a vector giving the index or the name of target cell groups.

signaling

a character vector giving the name of signaling pathways of interest

pairLR.use

a data frame consisting of one column named either "interaction_name" or "pathway_name", defining the interactions of interest

color.heatmap

A character string or vector indicating the colormap option to use. It can be the avaibale color palette in viridis_pal() or brewer.pal()

n.colors

number of basic colors to generate from color palette

direction

Sets the order of colors in the scale. If 1, the default colors are used. If -1, the order of colors is reversed.

thresh

threshold of the p-value for determining significant interaction

comparison

a numerical vector giving the datasets for comparison in the merged object; e.g., comparison = c(1,2)

group

a numerical vector giving the group information of different datasets; e.g., group = c(1,2,2)

remove.isolate

whether remove the entire empty column, i.e., communication between certain cell groups

max.dataset

a scale, keep the communications with highest probability in max.dataset (i.e., certrain condition)

min.dataset

a scale, keep the communications with lowest probability in min.dataset (i.e., certrain condition)

min.quantile, max.quantile

minimum and maximum quantile cutoff values for the colorbar, may specify quantile in [0,1]

line.on

whether add vertical line when doing comparison analysis for the merged object

line.size

size of vertical line if added

color.text.use

whether color the xtick labels according to the dataset origin when doing comparison analysis

color.text

the colors for xtick labels according to the dataset origin when doing comparison analysis

title.name

main title of the plot

font.size, font.size.title

font size of all the text and the title name

show.legend

whether show legend

grid.on, color.grid

whether add grid

angle.x, vjust.x, hjust.x

parameters for adjusting the rotation of xtick labels

return.data

whether return the data.frame for replotting

Value

Examples

Run this code
# NOT RUN {
# show all the significant interactions (L-R pairs) from some cell groups (defined by 'sources.use') to other cell groups (defined by 'targets.use')
netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:11), remove.isolate = FALSE)

# show all the significant interactions (L-R pairs) associated with certain signaling pathways
netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:11), signaling = c("CCL","CXCL"))

# show all the significant interactions (L-R pairs) based on user's input (defined by `pairLR.use`)
pairLR.use <- extractEnrichedLR(cellchat, signaling = c("CCL","CXCL","FGF"))
netVisual_bubble(cellchat, sources.use = c(3,4), targets.use = c(5:8), pairLR.use = pairLR.use, remove.isolate = TRUE)

# show all the increased interactions in the second dataset compared to the first dataset
netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:8), remove.isolate = TRUE, max.dataset = 2)

# show all the decreased interactions in the second dataset compared to the first dataset
netVisual_bubble(cellchat, sources.use = 4, targets.use = c(5:8), remove.isolate = TRUE, max.dataset = 1)
# }

Run the code above in your browser using DataLab