Plots dotplot for ligand-receptor communication scores in cell-cell interactions

plotCCcomDotplot(
  gobject,
  comScores,
  selected_LR = NULL,
  selected_cell_LR = NULL,
  show_LR_names = TRUE,
  show_cell_LR_names = TRUE,
  cluster_on = c("PI", "LR_expr", "log2fc"),
  cor_method = c("pearson", "kendall", "spearman"),
  aggl_method = c("ward.D", "ward.D2", "single", "complete", "average", "mcquitty",
    "median", "centroid"),
  dot_color_gradient = NULL,
  gradient_style = c("divergent", "sequential"),
  show_plot = NULL,
  return_plot = NULL,
  save_plot = NULL,
  save_param = list(),
  default_save_name = "plotCCcomDotplot"
)

Arguments

gobject

giotto object

comScores

communication scores from exprCellCellcom or spatCellCellcom

selected_LR

selected ligand-receptor combinations

selected_cell_LR

selected cell-cell combinations for ligand-receptor combinations

show_LR_names

show ligand-receptor names

show_cell_LR_names

show cell-cell names

cluster_on

values to use for clustering of cell-cell and ligand-receptor pairs

cor_method

correlation method used for clustering

aggl_method

agglomeration method used by hclust

dot_color_gradient

character. continuous colors to use. palette to use or vector of colors to use (minimum of 2).

gradient_style

either 'divergent' (midpoint is used in color scaling) or 'sequential' (scaled based on data range)

show_plot

logical. show plot

return_plot

logical. return ggplot object

save_plot

logical. save the plot

save_param

list of saving parameters, see showSaveParameters

default_save_name

default save name for saving, don't change, change save_name in save_param

Value

ggplot

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> cell_spatInfo_spatVector.shp
#> cell
#> 
#> 3.2 read Giotto spatial centroid information
#> cell
#> 
#> 3.3 read Giotto spatial overlap information
#> No overlaps were found, overlap loading will be
#>  skipped
#> 
#> 4. read Giotto image information
#> a giotto python environment was found
#> Using python path:
#>  "/Users/yuanlab/Library/r-miniconda/envs/giotto_env/bin/pythonw"

comScores <- exprCellCellcom(g, cluster_column = "leiden_clus", 
feat_set_1 = c("Gm19935", "2900040C04Rik", "Ccnd2"), 
feat_set_2 = c("9630013A20Rik", "Gna12", "Btbd17"))

plotCCcomDotplot(gobject = g, comScores = comScores, show_plot = TRUE)