plot_multi: Multiple STR score ECDF plots

View source: R/plot_multi.R

plot_multiR Documentation

Multiple STR score ECDF plots

Description

Allows plotting the STR scores of many loci with legend. Plots may be written directly to PDF files.

Usage

plot_multi(
  strscore,
  prefix = "exSTRa_plot",
  dir = "images/",
  plot_cols = NULL,
  color_only = NULL,
  plot_types = 1,
  alpha_control = 0.5,
  alpha_case = NULL,
  legend = TRUE,
  legend_control = TRUE,
  controls_label = "controls",
  cases_label = "cases",
  custom_legend = NULL,
  ...
)

Arguments

strscore

exstra_score object.

prefix

File name prefix.

dir

Output directory for PDF plots.

plot_cols

If a named vector, colours to use for each sample (names) for all loci. Unspecified samples are treated as controls. May be a named (loci) list with named vectors as above for specific locus colours.

color_only

List (named with loci) of a character vectors of samples to color at each locus.

plot_types

vector; Specify the plot output device. May have multiple of the following options if these are desired. Set to: 1 for current device, 2 for output to a single PDF file with multiple pages (when >1 locus), and 3 for a PDF file per locus.

alpha_control

Transparency alpha value for control samples.

alpha_case

Transparency alpha value for case samples.

legend

logical; if TRUE, include a legend.

legend_control

logical; if TRUE, include generic control specification in legend.

controls_label

character; a generic label in the legend for controls.

cases_label

character; a generic label for case samples in the legend.

custom_legend

A named (sample) vector of colors, for the legend.

...

Further arguments to plot.exstra_score

Examples

# Plot 4 loci
par(mfrow = c(2, 2))
plot_multi(exstra_wgs_pcr_2[c("HD", "SCA6", "FRDA", "SCA1")], alpha_case = 0.2)


bahlolab/exSTRa documentation built on Sept. 17, 2022, 5:08 p.m.