compareInteractions: Comparing the number of inferred communication links between...

View source: R/analysis.R

compareInteractionsR Documentation

Comparing the number of inferred communication links between different datasets

Description

Comparing the number of inferred communication links between different datasets

Usage

compareInteractions(
  object,
  measure = c("count", "weight"),
  color.use = NULL,
  group = NULL,
  group.levels = NULL,
  group.facet = NULL,
  group.facet.levels = NULL,
  n.row = 1,
  color.alpha = 1,
  legend.title = NULL,
  width = 0.6,
  title.name = NULL,
  digits = 3,
  xlabel = NULL,
  ylabel = NULL,
  remove.xtick = FALSE,
  show.legend = TRUE,
  x.lab.rot = FALSE,
  angle.x = 45,
  vjust.x = NULL,
  hjust.x = 1,
  size.text = 10
)

Arguments

object

A merged CellChat object

measure

"count" or "weight". "count": comparing the number of interactions; "weight": comparing the total interaction weights (strength)

color.use

defining the color for each group of datasets

group

a vector giving the groups of different datasets to define colors of the bar plot. Default: only one group and a single color

group.levels

the factor level in the defined group

group.facet

Name of one metadata column defining faceting groups

group.facet.levels

the factor level in the defined group.facet

n.row

Number of rows in facet_grid()

color.alpha

transparency

legend.title

legend title

width

bar width

title.name

main title of the plot

digits

integer indicating the number of decimal places (round) to be used when 'measure' is 'weight'.

xlabel

label of x-axis

ylabel

label of y-axis

remove.xtick

whether remove xtick

show.legend

whether show the legend

x.lab.rot, angle.x, vjust.x, hjust.x

adjusting parameters if rotating xtick.labels when x.lab.rot = TRUE

size.text

font size of the text

Value

A ggplot object


sqjin/CellChat documentation built on Nov. 10, 2023, 4:29 a.m.