View source: R/do_ChordDiagramPlot.R
do_ChordDiagramPlot | R Documentation |
Generate a Chord diagram.
do_ChordDiagramPlot(
sample = NULL,
from = NULL,
to = NULL,
colors.from = NULL,
colors.to = NULL,
big.gap = 10,
small.gap = 1,
link.border.color = NA,
link.border.width = 1,
highlight_group = NULL,
alpha.highlight = 25,
link.sort = NULL,
link.decreasing = TRUE,
z_index = FALSE,
self.link = 1,
symmetric = FALSE,
directional = 1,
direction.type = c("diffHeight", "arrows"),
link.arr.type = "big.arrow",
scale = FALSE,
alignment = "default",
annotationTrack = c("grid", "axis"),
padding_labels = 4,
...
)
sample |
|
from, to |
|
colors.from, colors.to |
|
big.gap |
|
small.gap |
|
link.border.color |
|
link.border.width |
|
highlight_group |
|
alpha.highlight |
|
link.sort |
pass to |
link.decreasing |
pass to |
z_index |
|
self.link |
|
symmetric |
pass to |
directional |
|
direction.type |
|
link.arr.type |
|
scale |
|
alignment |
|
annotationTrack |
pass to |
padding_labels |
|
... |
For internal use only. |
A circlize plot.
# Check Suggests.
value <- SCpubr:::check_suggests(function_name = "do_ChordDiagramPlot", passive = TRUE)
if (isTRUE(value)){
# Consult the full documentation in https://enblacar.github.io/SCpubr-book/
# Define your Seurat object.
sample <- readRDS(system.file("extdata/seurat_dataset_example.rds", package = "SCpubr"))
# Basic chord diagram.
sample$assignment <- ifelse(sample$seurat_clusters %in% c("0", "4", "7"), "A", "B")
sample$assignment[sample$seurat_clusters %in% c("1", "2")] <- "C"
sample$assignment[sample$seurat_clusters %in% c("10", "5")] <- "D"
sample$assignment[sample$seurat_clusters %in% c("8", "9")] <- "E"
p <- SCpubr::do_ChordDiagramPlot(sample = sample,
from = "seurat_clusters",
to = "assignment")
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.