plot_fragments: Plot all fragments for a given UniProt accession

plot_fragmentsR Documentation

Plot all fragments for a given UniProt accession

Description

Plots all fragments associated with a given accession. If a gene name is provided a separate plot will be produced for each accession within the specified gene.

Usage

plot_fragments(
  x,
  gene = NULL,
  accession = NULL,
  turbo = TRUE,
  viridis = NULL,
  size = 1,
  color = "white",
  save_plot = FALSE,
  file_path = NULL
)

Arguments

x

A data.table output from the create_mdata function.

gene

A character string. A plot will be produced for each UniProt accession mapping to the specified gene. When a gene is specified accession does not also need to be specified.

accession

A character string specifying which UniProt accession will be plotted.

turbo

A logical value indicating whether the Turbo colormap will be used.

viridis

A character string indicating which colormap option will be used. The available options are: "magma" (or "A"), "inferno" (or "B"), "plasma" (or "C"), "viridis" (or "D") and "cividis" (or "E").

size

An integer specifying the size of the border around each fragment. The default size is 1.

color

A character string indicating the color of the border around each fragment. The default is white.

save_plot

A logical value. If TRUE the plot will be saved as a PNG file. When a plot is saved to a file it is not also displayed in R/RStudio.

file_path

The path to the folder where each plot will be saved. This must be specified if save_plot is TRUE.

Value

A plot of the fragments for a given accession. When save_plot is TRUE a PNG file is created for each plot.

Author(s)

Evan A Martin


evanamartin/TopPICR documentation built on Dec. 9, 2022, 8:05 p.m.