% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotCCI.R
\name{plotCCI}
\alias{plotCCI}
\alias{plotCCI.blisa}
\alias{plotCCI.default}
\title{Heatmap of CCI scores across all ligand-receptor pairs}
\usage{
plotCCI(x, ...)

\method{plotCCI}{blisa}(
  x,
  top_lr = 20,
  top_pairs = 30,
  sender = NULL,
  receiver = NULL,
  colors = NULL,
  colours = NULL,
  ...
)

\method{plotCCI}{default}(
  x,
  top_lr = 20,
  top_pairs = 30,
  sender = NULL,
  receiver = NULL,
  colors = NULL,
  colours = NULL,
  ...
)
}
\arguments{
\item{x}{A \code{blisa} object or a CCI scores data frame (the
\code{CCI_scores} slot of a \code{blisa} object). The data frame must
contain columns \code{Sender}, \code{Receiver}, and one column per LR pair.}

\item{...}{Additional arguments passed to the relevant method.}

\item{top_lr}{Integer or \code{NULL}. Number of top-ranked LR pairs (by
\code{sig_numbers}) to display as columns. LR pairs in \code{CCI_scores}
are already ordered by rank, so this simply takes the first \code{top_lr}
columns. Default \code{20}.}

\item{top_pairs}{Integer or \code{NULL}. Number of top sender-receiver pairs
to display as rows, ranked by their maximum interaction score across the
displayed LR pairs (after \code{top_lr} is applied). When \code{NULL} all
rows are shown. Default \code{30}.}

\item{sender}{Character vector or \code{NULL}. If provided, only rows where
\code{Sender} is in this vector are kept. Applied independently of
\code{receiver} (AND logic when both are supplied). Default \code{NULL}
(all senders).}

\item{receiver}{Character vector or \code{NULL}. If provided, only rows
where \code{Receiver} is in this vector are kept. Applied independently of
\code{sender} (AND logic when both are supplied). Default \code{NULL}
(all receivers).}

\item{colors}{Named character vector mapping cell-type names to colours,
used for the sender/receiver row annotations. When \code{NULL} (default),
colours are assigned automatically from the package palette. The British
spelling \code{colours} is accepted as an alias.}

\item{colours}{Alias for \code{colors} (British spelling). Ignored when
\code{colors} is supplied.}
}
\value{
Invisibly returns the \code{Heatmap} object.
}
\description{
Generic function. Draws a clustered heatmap (via \code{ComplexHeatmap})
with rows as Sender \eqn{\rightarrow} Receiver cell-type pairs and columns
as LR pairs. Row annotations colour-code the sender and receiver cell types.
}
\section{Methods (by class)}{
\itemize{
\item \code{plotCCI(blisa)}: Method for a \code{blisa} object. Extracts
\code{CCI_scores} and delegates to \code{plotCCI.default}. Stops with an
informative error if \code{CCI_scores} is \code{NULL}.

\item \code{plotCCI(default)}: Method for a CCI scores data frame (e.g. the
\code{CCI_scores} slot of a \code{blisa} object).

}}
\seealso{
\code{\link{plotCCILR}} for a sender-by-receiver heatmap of a
single LR pair; \code{\link{plotCCIsummary}} for an aggregated
sender-by-receiver heatmap across all LR pairs.
}
