dplot3_protein: Plot the primary amino acid sequence of a protein

View source: R/dplot3_protein.R

dplot3_proteinR Documentation

Plot the primary amino acid sequence of a protein

Description

Plot the primary amino acid sequence of a protein

Usage

dplot3_protein(
  x,
  site = NULL,
  region = NULL,
  ptm = NULL,
  variant = NULL,
  disease.variants = NULL,
  n.per.row = NULL,
  main = NULL,
  main.xy = c(0.055, 0.975),
  main.xref = "paper",
  main.yref = "paper",
  main.xanchor = "middle",
  main.yanchor = "top",
  layout = c("simple", "grid", "1curve", "2curve"),
  show.markers = TRUE,
  show.labels = TRUE,
  font.size = 18,
  label.col = NULL,
  scatter.mode = "markers+lines",
  marker.size = 28,
  marker.col = NULL,
  marker.alpha = 1,
  marker.symbol = "circle",
  marker.hoverinfo = "text",
  line.col = NULL,
  line.alpha = 1,
  line.width = 2,
  show.full.names = TRUE,
  region.scatter.mode = "markers+lines",
  region.style = 3,
  region.marker.size = marker.size,
  region.marker.alpha = 0.6,
  region.marker.symbol = "circle",
  region.line.dash = "solid",
  region.line.shape = "line",
  region.line.smoothing = 1,
  region.line.width = 1,
  region.line.alpha = 0.6,
  theme = rtTheme,
  region.palette = rtPalette,
  region.outline.only = FALSE,
  region.outline.pad = 2,
  region.pad = 0.35,
  region.fill.alpha = 0.1666666,
  region.fill.shape = "line",
  region.fill.smoothing = 1,
  bpadcx = 0.5,
  bpadcy = 0.5,
  site.marker.size = marker.size,
  site.marker.symbol = marker.symbol,
  site.marker.alpha = 1,
  site.border.width = 1.5,
  site.palette = rtPalette,
  variant.col = "#FA6E1E",
  disease.variant.col = "#E266AE",
  showlegend.ptm = TRUE,
  ptm.col = 2:10,
  ptm.symbol = "circle",
  ptm.offset = 0.12,
  ptm.pad = 0.35,
  ptm.marker.size = marker.size/4.5,
  annotate.position.every = 10,
  annotate.position.alpha = 0.5,
  annotate.position.ay = -0.4 * marker.size,
  position.font.size = font.size - 6,
  legend.xy = c(0.97, 0.954),
  legend.xanchor = "left",
  legend.yanchor = "top",
  legend.orientation = "v",
  legend.col = NULL,
  legend.bg = "#FFFFFF00",
  legend.border.col = "#FFFFFF00",
  legend.borderwidth = 0,
  legend.group.gap = 0,
  margin = list(b = 0, l = 0, t = 0, r = 0, pad = 0),
  showgrid.x = FALSE,
  showgrid.y = FALSE,
  automargin.x = TRUE,
  automargin.y = TRUE,
  xaxis.autorange = TRUE,
  yaxis.autorange = "reversed",
  scaleanchor.y = "x",
  scaleratio.y = 1,
  hoverlabel.align = "left",
  displayModeBar = TRUE,
  modeBar.file.format = "svg",
  scrollZoom = TRUE,
  modebar.bg = "transparent",
  filename = NULL,
  file.width = 1320,
  file.height = 990,
  file.scale = 1,
  width = NULL,
  height = NULL,
  verbose = TRUE,
  trace = 0,
  ...
)

Arguments

x

Character vector of amino acid sequence (1-letter abbreviations)

site

Named list of lists with indices of sites. These will be highlighted by coloring the border of markers

region

Named list of lists with indices of regions. These will be highlighted by coloring the markers and lines of regions using the palette colors

ptm

List of post-translational modifications

variant

List of variant information

disease.variants

List of disease variant information

n.per.row

Integer: Number of amino acids to show per row

main

Character: Main title

main.xy

Numeric vector, length 2: x and y coordinates for title. e.g. if main.xref and main.yref are "paper": c(0.055, .975) is top left, c(.5, .975) is top and middle

main.xref

Character: xref for title

main.yref

Character: yref for title

main.xanchor

Character: xanchor for title

main.yanchor

Character: yanchor for title

layout

Character: "1curve", "grid": type of layout to use

show.markers

Logical: If TRUE, show amino acid markers

show.labels

Logical: If TRUE, annotate amino acids with elements

font.size

Integer: Font size for labels

label.col

Color for labels

scatter.mode

Character: Mode for scatter plot

marker.size

Integer: Size of markers

marker.col

Color for markers

marker.alpha

Numeric: Alpha for markers

marker.symbol

Character: Symbol for markers

marker.hoverinfo

Character: Hoverinfo for markers

line.col

Color for lines

line.alpha

Numeric: Alpha for lines

line.width

Numeric: Width for lines

show.full.names

Logical: If TRUE, show full names of amino acids

region.scatter.mode

Character: Mode for scatter plot

region.style

Integer: Style for regions

region.marker.size

Integer: Size of region markers

region.marker.alpha

Numeric: Alpha for region markers

region.marker.symbol

Character: Symbol for region markers

region.line.dash

Character: Dash for region lines

region.line.shape

Character: Shape for region lines

region.line.smoothing

Numeric: Smoothing for region lines

region.line.width

Numeric: Width for region lines

region.line.alpha

Numeric: Alpha for region lines

theme

Character: Theme to use: Run themes() for available themes

region.palette

Named list of colors for regions

region.outline.only

Logical: If TRUE, only show outline of regions

region.outline.pad

Numeric: Padding for region outline

region.pad

Numeric: Padding for region

region.fill.alpha

Numeric: Alpha for region fill

region.fill.shape

Character: Shape for region fill

region.fill.smoothing

Numeric: Smoothing for region fill

bpadcx

Numeric: Padding for region border

bpadcy

Numeric: Padding for region border

site.marker.size

Integer: Size of site markers

site.marker.symbol

Character: Symbol for site markers

site.marker.alpha

Numeric: Alpha for site markers

site.border.width

Numeric: Width for site borders

site.palette

Named list of colors for sites

variant.col

Color for variants

disease.variant.col

Color for disease variants

showlegend.ptm

Logical: If TRUE, show legend for PTMs

ptm.col

Named list of colors for PTMs

ptm.symbol

Character: Symbol for PTMs

ptm.offset

Numeric: Offset for PTMs

ptm.pad

Numeric: Padding for PTMs

ptm.marker.size

Integer: Size of PTM markers

annotate.position.every

Integer: Annotate every nth position

annotate.position.alpha

Numeric: Alpha for position annotations

annotate.position.ay

Numeric: Y offset for position annotations

position.font.size

Integer: Font size for position annotations

legend.xy

Numeric vector, length 2: x and y coordinates for legend

legend.xanchor

Character: xanchor for legend

legend.yanchor

Character: yanchor for legend

legend.orientation

Character: Orientation for legend

legend.col

Color for legend

legend.bg

Color for legend background

legend.border.col

Color for legend border

legend.borderwidth

Numeric: Width for legend border

legend.group.gap

Numeric: Gap between legend groups

margin

List: Margin settings

showgrid.x

Logical: If TRUE, show x grid

showgrid.y

Logical: If TRUE, show y grid

automargin.x

Logical: If TRUE, use automatic margin for x axis

automargin.y

Logical: If TRUE, use automatic margin for y axis

xaxis.autorange

Logical: If TRUE, use automatic range for x axis

yaxis.autorange

Character: If TRUE, use automatic range for y axis

scaleanchor.y

Character: Scale anchor for y axis

scaleratio.y

Numeric: Scale ratio for y axis

hoverlabel.align

Character: Alignment for hover label

displayModeBar

Logical: If TRUE, display mode bar

modeBar.file.format

Character: File format for mode bar

scrollZoom

Logical: If TRUE, enable scroll zoom

modebar.bg

Color for modebar background

filename

Character: File name to save plot

file.width

Integer: Width for saved file

file.height

Integer: Height for saved file

file.scale

Numeric: Scale for saved file

width

Integer: Width for plot

height

Integer: Height for plot

verbose

Logical: If TRUE, print messages to console

trace

Integer: If > 0, print trace messages

...

Additional arguments to pass to the theme function

Value

A plotly object

Author(s)

E.D. Gennatas

Examples

## Not run: 
tau <- seqinr::read.fasta("https://rest.uniprot.org/uniprotkb/P10636.fasta",
  seqtype = "AA"
)
dplot3_protein(as.character(tau[[1]]))

# or directly using the UniProt accession number:
dplot3_protein("P10636")

## End(Not run)

egenn/rtemis documentation built on May 4, 2024, 7:40 p.m.