plot_cpdb4.Rd
Plotting select interactions from CellPhoneDB results as a chord diagram
plot_cpdb4(
scdata,
cell_type1,
cell_type2,
celltype_key,
means,
pvals,
deconvoluted,
interaction,
keep_significant_only = TRUE,
splitby_key = NULL,
standard_scale = TRUE,
gene_symbol_mapping = NULL,
frac = 0.1,
remove_self = TRUE,
desiredInteractions = NULL,
degs_analysis = FALSE,
directional = 1,
alpha = 0.5,
edge_colors = NULL,
grid_colors = NULL,
grid_scale = 0.1,
show_legend = TRUE,
legend.pos.x = 20,
legend.pos.y = 20,
...
)
single-cell data. Must be a SingleCellExperiment object.
cell type 1
cell type 2
vector holding the celltype_key for each cell or column name of scdata's metadata. MUST match cpdb's columns
object holding means.txt from cpdb output
object holding pvals.txt from cpdb output
object holding deconvoluted.txt from cpdb output
interaction to plot. Please use '-' to separate the two molecules e.g. CD40-CD40LG
logical. Default is FALSE. Switch to TRUE if you only want to plot the significant hits from cpdb.
column name in the metadata/coldata table to split the spots by. Can only take columns with binary options. If specified, name to split by MUST be specified in the meta file provided to cpdb prior to analysis.
logical. scale the expression to range from 0 to 1. Default is TRUE
default = NULL.column name for rowData in sce holding the actual gene symbols if row names aren't gene symbols
default = 0.1. Minimum fraction of celtypes expressing a gene in order to keep the interaction. Gene must be expressesd >= `frac` in either of the pair of celltypes in order to keep.
default = TRUE. Remove self-self arcs.
default = NULL. Specific list of celltype comparisons e.g. list(c('CD4_Tcm', 'cDC1'), c('CD4_Tcm', 'cDC2')). Also accepts a dataframe where first column is celltype 1 and 2nd column is celltype 2.
if is CellPhoneDB degs_analysis mode.
Whether links have directions. 1 means the direction is from the first column in df to the second column, -1 is the reverse, 0 is no direction, and 2 for two directional.
transparency for links
vector of colors for links
vector of colors for grids
scale the width of grids for empty nodes.
whether or not to show the legend
x position of legend
y position of legend
passes arguments plot_cpdb
Plotting CellPhoneDB results as a CellChat inspired chord diagram for specific interactions
# \donttest{
# }