Prepare the data for the circos visualization by incorporating the colors and order of the links, as well as gaps between different cell types
Usage
prepare_circos_visualization(circos_links, ligand_colors = NULL, target_colors = NULL, widths = NULL, celltype_order = NULL)Arguments
- circos_links
Dataframe from the function
get_ligand_target_links_oicontaining weighted ligand-target links, cell type expressing the ligand, and target gene goruping- ligand_colors
Named vector of colors for each cell type (default: NULL, where colors follow the ggplot default color scheme)
- target_colors
Named vector of colors for each target gene grouping (default: NULL, where colors follow the ggplot default color scheme)
- widths
Named list of widths for the different types groupings, including:
width_same_cell_same_ligand_type: Width of the links between ligands of the same cell type (default: 0.5)
width_different_cell: Width of the links between different cell types, or between different target gene groups (default: 6)
width_ligand_target: Width of the links between ligands and targets (default: 15)
width_same_cell_same_target_type: Width of the links between target genes of the same group (default: 0.5)
- celltype_order
Order of the cell types (default: NULL, where cell types are ordered alphabetically, followed by "General"). Cell types are then drawn counter-clockwise in the circos plot.
Value
A list of four objects, including:
circos_links: Dataframe of weighted ligand-target links
ligand_colors: Named vector of ligands and their colors
order: Vector of order of the ligands and target genes
gaps: Vector of gaps between the different groupings
Examples
if (FALSE) { # \dontrun{
celltype_order <- c("General", "NK", "B", "DC", "Mono")
ligand_colors <- c("General" = "lawngreen", "NK" = "royalblue", "B" = "darkgreen", "Mono" = "violet", "DC" = "steelblue2")
target_colors <- c("LCMV-DE" = "tomato")
vis_circos_obj <- prepare_circos_visualization(circos_links, ligand_colors, target_colors, celltype_order = celltype_order)
} # }