% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis.R
\name{computeEnrichmentScore}
\alias{computeEnrichmentScore}
\title{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{
\item{df}{a dataframe}

\item{measure}{compute the enrichment score in terms of "ligand", "signaling",or "LR-pair"}

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

\item{color.use}{defining the color for each group of datasets}

\item{color.name}{the color names in RColorBrewer::brewer.pal}

\item{n.color}{the number of colors}

\item{scale}{A vector of length 2 indicating the range of the size of the words.}

\item{min.freq}{words with frequency below min.freq will not be plotted}

\item{max.words}{Maximum number of words to be plotted. least frequent terms dropped}

\item{random.order}{plot words in random order. If false, they will be plotted in decreasing frequency}

\item{rot.per}{proportion words with 90 degree rotation}

\item{return.data}{whether return the data frame for plotting wordcloud}

\item{seed}{set a seed}

\item{...}{Other parameters passing to wordcloud::wordcloud}
}
\value{
A ggplot object
}
\description{
Compute and visualize the enrichment score of ligand-receptor pairs in one condition compared to another condition
}
