
Dot plot ranking LR pairs by number of significant hotspot bins
Source:R/plotLRrank.R
plotLRrank.RdGeneric function for ranking LR pairs. Dispatches on the class of x:
plotLRrank.blisaaccepts ablisaobject and uses itsLR_resultsslot directly.plotLRrank.data.frameaccepts theLR_resultsdata frame directly.
Usage
plotLRrank(x, ...)
# S3 method for class 'blisa'
plotLRrank(x, top = 30, pt_size = 4, flip = FALSE, size_by = "auto", ...)
# S3 method for class 'data.frame'
plotLRrank(
x,
top = 30,
pt_size = 4,
flip = FALSE,
item_label = "Ligand-Receptor Pair",
size_by = NULL,
...
)Arguments
- x
A
blisaobject or a data frame of LR results. The data frame must contain columnssig_numbersandannotation.- ...
Additional arguments passed to the relevant method.
- top
Integer or
NULL. Number of top LR pairs (bysig_numbers) to display. Default30.- pt_size
Numeric. Point size passed to
geom_point. Default 4.- flip
Logical. When
TRUE, LR pairs are placed on the x-axis and the hotspot count on the y-axis (vertical orientation). DefaultFALSE(LR pairs on y-axis, horizontal orientation).- size_by
Character or
NULL. Name of a numeric column to map to point size. WhenNULL, all points use the fixedpt_size. ForplotLRrank.blisathe default is"auto", which sizes pathway-level results (fromblisaPathway) by"n_LR_pairs"and leaves LR-level results unsized; pass a column name, orNULLto disable, to override. Relabel the legend with+ ggplot2::labs(size = ...).- item_label
Character. Axis label for the ranked items. Defaults to
"Ligand-Receptor Pair";plotLRrank.blisasets it to"Pathway"for pathway-level objects.