computeEnrichmentScore: Compute and visualize the enrichment score of ligand-receptor...

View source: R/analysis.R

computeEnrichmentScoreR Documentation

Compute and visualize the enrichment score of ligand-receptor pairs in one condition compared to another condition

Description

Compute and visualize the enrichment score of ligand-receptor pairs in one condition compared to another condition

Usage

computeEnrichmentScore(
  df,
  measure = c("ligand", "signaling", "LR-pair"),
  species = c("mouse", "human"),
  color.use = NULL,
  color.name = "Dark2",
  n.color = 8,
  scale = c(4, 0.8),
  min.freq = 0,
  max.words = 200,
  random.order = FALSE,
  rot.per = 0,
  return.data = FALSE,
  seed = 1,
  ...
)

Arguments

df

a dataframe

measure

compute the enrichment score in terms of "ligand", "signaling",or "LR-pair"

species

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

color.use

defining the color for each group of datasets

color.name

the color names in RColorBrewer::brewer.pal

n.color

the number of colors

scale

A vector of length 2 indicating the range of the size of the words.

min.freq

words with frequency below min.freq will not be plotted

max.words

Maximum number of words to be plotted. least frequent terms dropped

random.order

plot words in random order. If false, they will be plotted in decreasing frequency

rot.per

proportion words with 90 degree rotation

return.data

whether return the data frame for plotting wordcloud

seed

set a seed

...

Other parameters passing to wordcloud::wordcloud

Value

A ggplot object


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