Learn R Programming

AntibodyForests (version 1.1.0)

Af_cluster_node_features: Function to create a barplot of the cluster composition of selected features from each tree in an AntibodyForests-object

Description

Function to create a barplot of the cluster composition of selected features from each tree in an AntibodyForests-object

Usage

Af_cluster_node_features(
  input,
  features,
  clusters,
  fill,
  colors,
  text.size,
  significance
)

Value

A list with barplots for each provided feature.

Arguments

input

AntibodyForests-object(s), output from Af_build()

features

Character vector of features to include in the barplot. (these features need to be present in the nodes of the trees)

clusters

Named vector with the cluster assignments of the trees, output from Af_compare_within_repertoires().

fill

identify each unique feature per tree (unique, default), or assign the most observed feature to the tree (max)

colors

Color palette to use for the features.

text.size

Size of the text in the plot. Default is 12.

significance

Logical, whether to add Chi-squared Test p-value to the plot. Default is FALSE.

Examples

Run this code
plot <- Af_cluster_node_features(input = AntibodyForests::small_af,
                                 clusters = AntibodyForests::compare_repertoire[["clustering"]],
                                 features = "isotype",
                                 fill = "max")
plot$isotype

Run the code above in your browser using DataLab