APOTCPlot | R Documentation |
Given a seurat object with an 'apotc' (APackOfTheClones) object
from running RunAPOTC()
, this function will read the information and return
a customizable ggplot2 object of the clonal expansion with a circle size
legend. If the user is unhappy about certain aspects of the plot, many
parameters can be adjusted with the AdjustAPOTC function.
The specific APackOfTheClones run to be plotted can be identified in two
ways: either by inputting the run_id
associated with the run that was
either defined / auto-generated during RunAPOTC()
, or by inputting the
reduction_base
, clonecall
, extra_filter
and any other keyword arguments
that corresponded to the run. Its heavily recommended to use the run_id
.
If none of these parameters are inputted, the function defaults to returning
the plot of the latest run.
APOTCPlot(
seurat_obj,
reduction_base = NULL,
clonecall = NULL,
...,
extra_filter = NULL,
run_id = NULL,
show_shared = NULL,
only_link = NULL,
show_all_links = FALSE,
clone_link_width = "auto",
clone_link_color = "black",
clone_link_alpha = 0.5,
res = 360L,
linetype = "blank",
use_default_theme = TRUE,
retain_axis_scales = FALSE,
alpha = 1,
show_labels = FALSE,
label_size = 5,
add_size_legend = TRUE,
legend_sizes = "auto",
legend_position = "auto",
legend_buffer = 0.2,
legend_color = "#808080",
legend_spacing = "auto",
legend_label = "Clone sizes",
legend_text_size = 5,
add_legend_background = TRUE,
add_legend_centerspace = 0,
detail = TRUE,
verbose = TRUE
)
A ggplot object of the APackOfTheClones clonal expansion plot of the
seurat object. There is an additional 10th element in the object named
"APackOfTheClones"
used by other functions in this package and shouldn't
interfere with any other ggplot functionality. (As far as currently known)
AdjustAPOTC
data("combined_pbmc")
combined_pbmc <- RunAPOTC(
combined_pbmc, run_id = "run1", verbose = FALSE
)
# plotting with default arguments will plot the latest "run1"
clonal_packing_plot <- APOTCPlot(combined_pbmc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.