Learn R Programming

AntibodyForests (version 1.1.0)

Af_plot_PLM_mut_vs_cons: Function to create a boxplot of the Protein Language Model probabilities

Description

Function to create a boxplot of the Protein Language Model probabilities and ranks of the mutating vs. conserved residues along the edges of B cell lineage trees.

Usage

Af_plot_PLM_mut_vs_cons(
  PLM_dataframe,
  values,
  dots,
  group_by,
  colors,
  font.size,
  output.file
)

Value

A ggplot2 object of the PLM boxplot

Arguments

PLM_dataframe

Dataframe resulting from Af_PLM_dataframe(). This contains the Protein Language Model probabilities and ranks of the mutations along the edges of B cell lineage trees.

values

What values to plot. Can be "rank" (default) or "probability". "rank" will plot the rank of the amino acid (Highest probability is rank 1). "probability" will plot the probability of the amino acid.

dots

Whether to plot the individual points. Can be "none" (default), "all_edges", "sample_average"

group_by

Color the dots on a group. Can be "none" (default), "sample_id", or "n_subs".

colors

Color to use for the dots. When group_by = "sample_id": This should be a vector of the same length as the number of samples.

font.size

Font size for the plot. Default is 16.

output.file

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

Examples

Run this code
Af_plot_PLM_mut_vs_cons(PLM_dataframe = AntibodyForests::PLM_dataframe,
            values = "probability")

Run the code above in your browser using DataLab