Af_distance_scatterplot: Function to scatterplot the distance to the germline to a...

View source: R/Af_distance_scatterplot.R

Af_distance_scatterplotR Documentation

Function to scatterplot the distance to the germline to a numerical node feature of the AntibodyForests-object

Description

Function to scatterplot the distance to the germline to a numerical node feature of the AntibodyForests-object

Usage

Af_distance_scatterplot(
  AntibodyForests_object,
  node.features,
  distance,
  min.nodes,
  color.by,
  color.by.numeric,
  correlation,
  geom_smooth.method,
  color.palette,
  font.size,
  ylabel,
  point.size,
  output.file
)

Arguments

AntibodyForests_object

AntibodyForests-object, output from Af_build()

node.features

Node features in the AntibodyForests-object to compare (needs to be numerical)

distance
  • string - How to calculate the distance to the germline. 'node.depth' : The sum of edges on the shortest parth between germline and each node 'edge.length' : The sum of edge length of the shortest path between germline and each node (Default)

min.nodes

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

color.by

Color the scatterplot by a node.feature in the AntibodyForests-object, by the sample, or no color ("none). Default is "none".

color.by.numeric

Logical. If TRUE, the color.by feature is treated as a numerical feature. Default is FALSE.

correlation

"pearson", "spearman", "kendall", or "none"

geom_smooth.method

"none", lm" or "loess". Default is "none".

color.palette

The color palette to use for the scatterplot. Default for numerical color.by is "viridis".

font.size

The font size of the plot. Default is 12.

ylabel

The labels of the y-axis, in the same order as the node.features. Default is the node.features

point.size

The size of the points in the scatterplot. Default is 1.

output.file

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

Value

A ggplot2 object with the scatterplot

Examples

Af_distance_scatterplot(AntibodyForests_object = AntibodyForests::small_af,
                        node.features = "size",
                        distance = "edge.length",
                        min.nodes = 5,
                        color.by = "sample",
                        color.by.numeric = FALSE,
                        geom_smooth.method = "lm",
                        correlation = "pearson")

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