Af_node_size_boxplot: Function to make a grouped boxplot of the normalized average...

View source: R/Af_node_size_boxplot.R

Af_node_size_boxplotR Documentation

Function to make a grouped boxplot of the normalized average node sizes (number of cells with the exact same sequence) from specific groups of lineage trees constructed with AntibodyForests.

Description

Function to compare trees.

Usage

Af_node_size_boxplot(
  AntibodyForests_object,
  min.nodes,
  groups,
  node.feature,
  colors,
  text.size,
  x.label,
  group.order,
  significance,
  parallel,
  output.file
)

Arguments

AntibodyForests_object

AntibodyForests-object, output from Af_build()

min.nodes

The minimum number of nodes for a tree to be included in this analysis (this included the germline)

groups

Which groups to compare. These groups need to be in the node features of the AntibodyForests-object. Set to NA if all features should displayed. (default is NA) If you want to compare IgM and IgG for example, groups should be c("IgM, "IgG") (not "Isotypes")

node.feature

Node feature in the AntibodyForests-object to compare.

colors

Optionally specific colors for the group (Will be matched to the groups/names on alphabetical order).

text.size

Font size in the plot (default 20).

x.label

Label for the x-axis (default is the node feature).

group.order

Order of the groups on the x-axis. (default is alphabetical/numerical)

significance

If TRUE, the significance of the difference (paired t-test) between the groups is plotted. (default FALSE)

parallel

If TRUE, the metric calculations are parallelized across clonotypes. (default FALSE)

output.file

string - specifies the path to the output file (PNG of PDF). Defaults to NULL.

Value

A ggplot2 object with the boxplot.

Examples

Af_node_size_boxplot(AntibodyForests::small_af,
                    min.nodes = 5,
                    groups = c("IGHA", "IgG1"),
                    node.feature = "isotype")


AntibodyForests documentation built on Aug. 8, 2025, 6:49 p.m.