View source: R/do_LigandReceptorPlot.R
do_LigandReceptorPlot | R Documentation |
This function makes use of liana package to run Ligand-Receptor analysis. Takes the output of liana and generates a dot-plot visualization according to the user's specifications.
do_LigandReceptorPlot(
liana_output,
split.by = NULL,
keep_source = NULL,
keep_target = NULL,
top_interactions = 25,
top_interactions_by_group = FALSE,
dot_border = TRUE,
magnitude = "sca.LRscore",
specificity = "aggregate_rank",
sort.by = "E",
sorting.type.specificity = "descending",
sorting.type.magnitude = "descending",
border.color = "black",
axis.text.x.angle = 45,
legend.position = "bottom",
legend.type = "colorbar",
legend.length = 20,
legend.width = 1,
legend.framecolor = "grey50",
legend.tickcolor = "white",
legend.framewidth = 0.5,
legend.tickwidth = 0.5,
use_viridis = FALSE,
viridis.palette = "G",
viridis.direction = 1,
sequential.palette = "YlGnBu",
sequential.direction = 1,
font.size = 14,
dot.size = 1,
font.type = "sans",
plot.grid = TRUE,
grid.color = "grey90",
grid.type = "dotted",
compute_ChordDiagrams = FALSE,
sort_interactions_alphabetically = FALSE,
number.breaks = 5,
plot.title.face = "bold",
plot.subtitle.face = "plain",
plot.caption.face = "italic",
axis.title.face = "bold",
axis.text.face = "plain",
legend.title.face = "bold",
legend.text.face = "plain",
return_interactions = FALSE,
invert_specificity = TRUE,
invert_magnitude = FALSE,
verbose = TRUE
)
liana_output |
|
split.by |
|
keep_source , keep_target |
|
top_interactions |
|
top_interactions_by_group |
|
dot_border |
|
specificity , magnitude |
|
sort.by |
|
sorting.type.specificity , sorting.type.magnitude |
|
border.color |
|
axis.text.x.angle |
|
legend.position |
|
legend.type |
|
legend.length , legend.width |
|
legend.framecolor |
|
legend.tickcolor |
|
legend.framewidth , legend.tickwidth |
|
use_viridis |
|
viridis.palette |
|
viridis.direction |
|
sequential.palette |
|
sequential.direction |
|
font.size |
|
dot.size |
|
font.type |
|
plot.grid |
|
grid.color |
|
grid.type |
|
compute_ChordDiagrams |
|
sort_interactions_alphabetically |
|
number.breaks |
|
plot.title.face , plot.subtitle.face , plot.caption.face , axis.title.face , axis.text.face , legend.title.face , legend.text.face |
|
return_interactions |
|
invert_specificity , invert_magnitude |
|
verbose |
|
A ggplot2 plot with the results of the Ligand-Receptor analysis.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_LigandReceptorPlot", passive = TRUE)
if (isTRUE(value)){
liana_output <- readRDS(system.file("extdata/liana_output_example.rds", package = "SCpubr"))
# Ligand Receptor analysis plot.
p <- SCpubr::do_LigandReceptorPlot(liana_output = liana_output)
p
} else if (base::isFALSE(value)){
message("This function can not be used without its suggested packages.")
message("Check out which ones are needed using `SCpubr::state_dependencies()`.")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.