Af_plot_PLM: Function to create a distribution plot of the Protein...

View source: R/Af_plot_PLM.R

Af_plot_PLMR Documentation

Function to create a distribution plot of the Protein Language Model probabilities and ranks of the mutations along the edges of B cell lineage trees.

Description

Function to create a distribution plot of the Protein Language Model probabilities and ranks of the mutations along the edges of B cell lineage trees.

Usage

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

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". "substitution_rank" will plot the rank of the mutation along the edge of the tree (Highest probability is rank 1). "substitution_probability" will plot the probability of the mutation along the edge of the tree. "original_rank" will plot the rank of the original amino acid at the site of mutation along the edge of the tree (Highest probability is rank 1). "original_probability" will plot the probability of the original amino acid at the site of mutation along the edge of the tree.

group_by

Plot a seperate line per sample or everything together (default). "sample_id" "none"

colors

Color to use for the lines. 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.

Value

A ggplot2 object of the PLM plot

Examples

Af_plot_PLM(PLM_dataframe = AntibodyForests::PLM_dataframe,
            values = "original_probability",
            group_by = "sample_id")

AntibodyForests documentation built on April 4, 2025, 4:45 a.m.