plot_cpdb2 | R Documentation |
Plotting CellPhoneDB results
plot_cpdb2(
scdata,
cell_type1,
cell_type2,
celltype_key,
means,
pvals,
deconvoluted,
keep_significant_only = TRUE,
splitby_key = NULL,
standard_scale = TRUE,
gene_symbol_mapping = NULL,
frac = 0.1,
remove_self = TRUE,
desiredInteractions = NULL,
interaction_grouping = NULL,
edge_group_colors = NULL,
node_group_colors = NULL,
degs_analysis = FALSE,
return_df = FALSE,
plot_score_as_thickness = TRUE,
...
)
scdata |
single-cell data. Must be SingleCellExperiment object |
cell_type1 |
cell type 1 |
cell_type2 |
cell type 2 |
celltype_key |
column name of scdata's metadata. MUST match cpdb's columns |
means |
object holding means.txt from cpdb output |
pvals |
object holding pvals.txt from cpdb output |
deconvoluted |
object holding deconvoluted.txt from cpdb output |
keep_significant_only |
logical. Default is FALSE. Switch to TRUE if you only want to plot the significant hits from cpdb. |
splitby_key |
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. |
standard_scale |
logical. scale the expression to range from 0 to 1. Default is TRUE |
gene_symbol_mapping |
default = NULL.column name for rowData in sce holding the actual gene symbols if row names aren't gene symbols |
frac |
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. |
remove_self |
default = TRUE. Remove self-self arcs. |
desiredInteractions |
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. |
interaction_grouping |
default = NULL. dataframe specifying groupings of CellPhoneDB interactions. First column must be CellPhoneDB's interacting_pair column. second column is whatever grouping you want. |
edge_group_colors |
default = NULL. vector for colour mapping for edge groups. only used if splitby_key is specified. |
node_group_colors |
default = NULL. vector for colour mapping for node labels. |
degs_analysis |
if is CellPhoneDB degs_analysis mode. |
return_df |
whether to just return this as a data.frame rather than plotting iot |
plot_score_as_thickness |
logical. Whether to scale the thickness of the edges to the interaction score and scale alpha to -log10(significance). Default is TRUE. FALSE will be opposite behaviour |
... |
passes arguments plot_cpdb |
Plotting CellPhoneDB results as a weird chord diagram
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.