Skip to contents

Adapts sequence strings, residue vectors, protein records, and local JSON to the shared A3 representation used by draw_a3(). Named legacy annotation vectors enumerate one-based residues. Region vectors preserve contiguous runs; isolated region residues are drawn as sites. Modern specifications from rtemis.a3 annotation_position/annotation_range/annotation_variant are accepted. The common meander layout, theme, legends, and SVG path match rtemislive. Fetch accession records explicitly with rtemis.a3 before plotting; a sequence string never initiates a network request.

Usage

draw_protein(
  x,
  site = list(),
  region = list(),
  ptm = list(),
  cleavage_site = list(),
  variant = list(),
  disease_variants = NULL,
  ...
)

Arguments

x

Character, list, or A3: Sequence, protein record, local JSON path, or A3.

site, region, ptm, cleavage_site

List: Named annotation vectors or modern specifications.

variant

List: Records with position plus optional variant metadata.

disease_variants

Optional Numeric: Disease-associated residue positions.

...

Additional display settings passed to draw_a3().

Value

htmlwidget: Annotated protein diagram.

Examples

draw_protein("MAEPRQEFEVMEDHAGTYGLGDRK", site = list(Active = c(5L, 17L)),
  region = list(Domain = 3:10), ptm = list(Phosphorylation = 2L))