Sender-by-receiver heatmap of aggregated CCI scores across LR pairs
Source:R/plotCCIsummary.R
plotCCIsummary.RdGeneric 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 \(\rightarrow\) Receiver combination.
Usage
plotCCIsummary(x, ...)
# S3 method for class 'blisa'
plotCCIsummary(
x,
top_lr = NULL,
sender = NULL,
receiver = NULL,
agg_fun = sum,
main = NULL,
...
)
# Default S3 method
plotCCIsummary(
x,
top_lr = NULL,
sender = NULL,
receiver = NULL,
agg_fun = sum,
main = NULL,
...
)Arguments
- x
A
blisaobject or a CCI scores data frame (theCCI_scoresslot of ablisaobject).- ...
Additional arguments passed to the relevant method.
- top_lr
Integer or
NULL. Number of top-ranked LR pairs (bysig_numbers) to include before aggregating. LR pairs inCCI_scoresare already ordered by rank, so this takes the firsttop_lrcolumns.NULL(default) uses all pairs.- sender
Character vector or
NULL. If provided, only rows whereSenderis in this vector are kept (AND logic withreceiver). DefaultNULL(all senders).- receiver
Character vector or
NULL. If provided, only rows whereReceiveris in this vector are kept (AND logic withsender). DefaultNULL(all receivers).- agg_fun
Function used to aggregate scores across LR pairs for each Sender \(\rightarrow\) Receiver combination. Receives a numeric vector with
NAs already removed. Defaultsum.- main
Character or
NULL. Title drawn above the heatmap. When supplied, the heatmap is drawn with this overall title (viaComplexHeatmap::draw); theHeatmapobject is returned invisibly. DefaultNULL(no title; object returned for the caller to print).
Methods (by class)
plotCCIsummary(blisa): Method for ablisaobject. Stops with an informative error ifCCI_scoresisNULL.plotCCIsummary(default): Method for a CCI scores data frame (e.g. theCCI_scoresslot of ablisaobject).