% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotCCIsummary.R
\name{plotCCIsummary}
\alias{plotCCIsummary}
\alias{plotCCIsummary.blisa}
\alias{plotCCIsummary.default}
\title{Sender-by-receiver heatmap of aggregated CCI scores across LR pairs}
\usage{
plotCCIsummary(x, ...)

\method{plotCCIsummary}{blisa}(
  x,
  top_lr = NULL,
  sender = NULL,
  receiver = NULL,
  agg_fun = sum,
  ...
)

\method{plotCCIsummary}{default}(
  x,
  top_lr = NULL,
  sender = NULL,
  receiver = NULL,
  agg_fun = sum,
  ...
)
}
\arguments{
\item{x}{A \code{blisa} object or a CCI scores data frame (the
\code{CCI_scores} slot of a \code{blisa} object).}

\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 include before aggregating. LR pairs in
\code{CCI_scores} are already ordered by rank, so this takes the first
\code{top_lr} columns. \code{NULL} (default) uses all pairs.}

\item{sender}{Character vector or \code{NULL}. If provided, only rows where
\code{Sender} is in this vector are kept (AND logic with \code{receiver}).
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 (AND logic with
\code{sender}). Default \code{NULL} (all receivers).}

\item{agg_fun}{Function used to aggregate scores across LR pairs for each
Sender \eqn{\rightarrow} Receiver combination. Receives a numeric vector
with \code{NA}s already removed. Default \code{sum}.}
}
\value{
A \code{Heatmap} object.
}
\description{
Generic function. Aggregates CCI scores across all (or the top-ranked)
ligand-receptor pairs and draws a clustered receiver-by-sender heatmap, one
cell per Sender \eqn{\rightarrow} Receiver combination.
}
\section{Methods (by class)}{
\itemize{
\item \code{plotCCIsummary(blisa)}: Method for a \code{blisa} object. Stops with an
informative error if \code{CCI_scores} is \code{NULL}.

\item \code{plotCCIsummary(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 per-LR-pair version of this plot;
\code{\link{plotCCI}} for a heatmap with LR pairs as columns.
}
