This function can also be used to rank signaling from certain cell groups to other cell groups
rankNet(
object,
slot.name = "netP",
mode = c("comparison", "single"),
comparison = c(1, 2),
color.use = NULL,
stacked = FALSE,
sources.use = NULL,
targets.use = NULL,
do.stat = FALSE,
cutoff.pvalue = 0.05,
tol = 0.05,
thresh = 0.05,
show.raw = FALSE,
return.data = FALSE,
x.rotation = 90,
title = NULL,
bar.w = 0.75,
font.size = 8,
axis.gap = FALSE,
ylim = NULL,
segments = NULL,
tick_width = NULL,
rel_heights = c(0.9, 0, 0.1)
)
CellChat object
the slot name of object that is used to compute centrality measures of signaling networks
"single","comparison"
a numerical vector giving the datasets for comparison; a single value means ranking for only one dataset and two values means ranking comparison for two datasets
defining the color for each cell group
whether plot the stacked bar plot
a vector giving the index or the name of source cell groups
a vector giving the index or the name of target cell groups.
whether do a paired Wilcoxon test to determine whether there is significant difference between two datasets. Default = FALSE
the cutoff of pvalue when doing Wilcoxon test; Default = 0.05
a tolerance when considering the relative contribution being equal between two datasets. contribution.relative between 1-tol and 1+tol will be considered as equal contribution
threshold of the p-value for determining significant interaction
whether show the raw information flow. Default = FALSE, showing the scaled information flow to provide compariable data scale; When stacked = TRUE, use raw information flow by default.
whether return the data.frame consisting of the calculated information flow of each signaling pathway or L-R pair
rotation of x-labels
main title of the plot
the width of bar plot
font size
whetehr making gaps in y-axes
parameters in the function gg.gap when making gaps in y-axes e.g., ylim = c(0, 35), segments = list(c(11, 14),c(16, 28)), tick_width = c(5,2,5), rel_heights = c(0.8,0,0.1,0,0.1) https://tobiasbusch.xyz/an-r-package-for-everything-ep2-gaps