Generic function. Draws a clustered heatmap (via ComplexHeatmap)
with rows as Sender \(\rightarrow\) Receiver cell-type pairs and columns
as LR pairs. Row annotations colour-code the sender and receiver cell types.
Usage
plotCCI(x, ...)
# S3 method for class 'blisa'
plotCCI(
x,
top_lr = 20,
top_pairs = 30,
lr_pairs = NULL,
sender = NULL,
receiver = NULL,
colors = NULL,
colours = NULL,
main = NULL,
...
)
# Default S3 method
plotCCI(
x,
top_lr = 20,
top_pairs = 30,
lr_pairs = NULL,
sender = NULL,
receiver = NULL,
colors = NULL,
colours = NULL,
main = NULL,
...
)Arguments
- x
A
blisaobject or a CCI scores data frame (theCCI_scoresslot of ablisaobject). The data frame must contain columnsSender,Receiver, and one column per LR pair.- ...
Additional arguments passed to the relevant method.
- top_lr
Integer or
NULL. Number of top-ranked LR pairs (bysig_numbers) to display as columns. LR pairs inCCI_scoresare already ordered by rank, so this simply takes the firsttop_lrcolumns. Ignored whenlr_pairsis supplied. Default20.- top_pairs
Integer or
NULL. Number of top sender-receiver pairs to display as rows, ranked by their maximum interaction score across the displayed LR pairs (aftertop_lr/lr_pairsis applied). WhenNULLall rows are shown. Default30.- lr_pairs
Character vector or
NULL. When supplied, only these LR pair column names are shown, in the order given, overridingtop_lr. Names not found inCCI_scoresare dropped with a warning. DefaultNULL(usetop_lr).- sender
Character vector or
NULL. If provided, only rows whereSenderis in this vector are kept. Applied independently ofreceiver(AND logic when both are supplied). DefaultNULL(all senders).- receiver
Character vector or
NULL. If provided, only rows whereReceiveris in this vector are kept. Applied independently ofsender(AND logic when both are supplied). DefaultNULL(all receivers).- colors
Named character vector mapping cell-type names to colours, used for the sender/receiver row annotations. When
NULL(default), colours are assigned automatically from the package palette. The British spellingcoloursis accepted as an alias.- colours
Alias for
colors(British spelling). Ignored whencolorsis supplied.- main
Character or
NULL. Title drawn above the heatmap (mapped to thecolumn_titleofComplexHeatmap::Heatmap). DefaultNULL(no title).
Methods (by class)
plotCCI(blisa): Method for ablisaobject. ExtractsCCI_scoresand delegates toplotCCI.default. Stops with an informative error ifCCI_scoresisNULL.plotCCI(default): Method for a CCI scores data frame (e.g. theCCI_scoresslot of ablisaobject).
See also
plotCCILR for a sender-by-receiver heatmap of a
single LR pair; plotCCIsummary for an aggregated
sender-by-receiver heatmap across all LR pairs.