plotSubtrees | R Documentation |
plotSubtree
plots distributions of normalized subtree statistics for a
set of lineage trees, broken down by annotation value.
plotSubtrees(
graphs,
field,
stat,
root = "Germline",
exclude = c("Germline", NA),
colors = NULL,
main_title = "Subtrees",
legend_title = "Annotation",
style = c("box", "violin"),
silent = FALSE,
...
)
graphs |
list of igraph objects containing annotated lineage trees. |
field |
string defining the annotation field. |
stat |
string defining the subtree statistic to plot. One of:
|
root |
name of the root (germline) node. |
exclude |
vector of strings defining |
colors |
named vector of colors for values in |
main_title |
string specifying the plot title. |
legend_title |
string specifying the legend title. |
style |
string specifying the style of plot to draw. One of:
|
silent |
if |
... |
additional arguments to pass to ggplot2::theme. |
A ggplot
object defining the plot.
Subtree statistics are calculated with summarizeSubtrees.
# Define example tree set
graphs <- ExampleTrees[1:10]
# Violin plots of node outdegree by sample
plotSubtrees(graphs, "sample_id", "out", style="v")
# Violin plots of subtree size by sample
plotSubtrees(graphs, "sample_id", "size", style="v")
# Boxplot of node depth by isotype
plotSubtrees(graphs, "c_call", "depth", style="b")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.