scoreVlnplotR Documentation

Generate Score Violin Plot

Description

scoreVlnplot generates a series of violin plots for visualizing the distribution of scores across different positions.

Usage

scoreVlnplot(
  data,
  savedir,
  pos.col = "position",
  wt.col = "wildtype",
  score.col = "mean",
  jitter = FALSE,
  c.fill = "lightblue",
  npos = 50,
  ncol = 1,
  pos.step = 1,
  x.text = 8,
  y.text = 8,
  seq.text = 3,
  pt.size = 0.2,
  ht = 30,
  wd = 15,
  name = "Violinplot",
  savepdf = TRUE,
  show = FALSE
)

Arguments

data

Scores data frame. Expected to have columns containing information about position, control amino acid, mutated amino acid, mutation type, and score.

savedir

A string providing the directory path to save plots.

pos.col

Column name in data for mutation positions. Default is position.

wt.col

Column name in data for wildtype amino acids. Default is wildtype.

score.col

Column name in data for mutation scores. Default is mean.

jitter

Logical indicating whether to add jitter points to violin plot. Default is FALSE.

c.fill

String indicating the fill color for the violin plots.

npos

Integer specifying the number of positions per subplot. Default is 50.

ncol

Integer specifying the number of columns of subplots. Default is 1.

pos.step

Integer specifying the steps between x-axis labels. Default is 5.

x.text

Numeric value for x-axis text size. Default is 8.

y.text

Numeric value for x-axis text size. Default is 8.

seq.text

Numeric value for wildtype sequence text size. Default is 3

pt.size

Numeric value specifying the size of jitter points. Default is 0.2

ht

Numeric value for the height of the saved plot. Default is 30.

wd

Numeric value for the width of the saved plot. Default is 15.

name

Character string specifying the base name of the saved file.

savepdf

Logical indicating whether to also save a PDF version of the plot. Default is TRUE.

show

Logical indicating whether or not to display the plot in the viewer. Default is FALSE.

Value

NULL.

Examples

## Not run: 
scoreVlnplot(data = scores.data, jitter = TRUE, c.fill = "lightpink",
            savedir = "./plots/", name = "ViolinPlot")

## End(Not run)