-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_tRNA_structure.Rd
More file actions
99 lines (87 loc) · 3.72 KB
/
plot_tRNA_structure.Rd
File metadata and controls
99 lines (87 loc) · 3.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-structure.R
\name{plot_tRNA_structure}
\alias{plot_tRNA_structure}
\title{Plot tRNA secondary structure with modifications and linkages}
\usage{
plot_tRNA_structure(
trna,
organism,
modifications = NULL,
outlines = NULL,
linkages = NULL,
output = NULL,
mod_palette = NULL,
outline_palette = NULL,
text_colors = NULL,
position_markers = TRUE,
linkage_palette = c("#0072B2", "#D55E00"),
sprinzl_coords = NULL,
trna_id = NULL
)
}
\arguments{
\item{trna}{Character string identifying the tRNA
(e.g., \code{"tRNA-Ala-GGC"}). Use \code{\link[=structure_trnas]{structure_trnas()}} to list
available tRNAs.}
\item{organism}{Character string specifying the organism name
(e.g., \code{"Escherichia coli"}).}
\item{modifications}{A tibble with columns \code{pos} (1-based
position or Sprinzl label when \code{sprinzl_coords} is provided)
and \code{mod1} (short modification name, e.g., \code{"m1A"}). Output
of \code{\link[=modomics_mods]{modomics_mods()}} works directly after filtering to the
tRNA of interest.}
\item{outlines}{A tibble with columns \code{pos} (1-based position
or Sprinzl label) and \code{group} (category name for palette
lookup). Draws circle outlines (stroke only, no fill) around
each nucleotide.}
\item{linkages}{A tibble with columns \code{pos1}, \code{pos2} (1-based
positions or Sprinzl labels), and optionally \code{value} (e.g.,
log odds ratio) for coloring arcs. If a \code{log_odds_ratio}
column is present and \code{value} is not, it is automatically
used as \code{value}, so output of \code{\link[=clean_odds_ratios]{clean_odds_ratios()}} or
\code{\link[=filter_linkages]{filter_linkages()}} works directly.}
\item{output}{Path for the output SVG file. If \code{NULL} (default),
writes to a temporary file.}
\item{mod_palette}{Named character vector of colors keyed by
modification short name. If \code{NULL}, uses a default palette.}
\item{outline_palette}{Named character vector of colors keyed by
outline group name. If \code{NULL}, uses \code{"#333333"} for all.}
\item{text_colors}{A tibble with columns \code{pos} (1-based position
or Sprinzl label) and \code{color} (hex color string). Changes the
nucleotide letter color at specified positions. Unspecified
positions keep the default color.}
\item{position_markers}{Logical; if \code{TRUE} (default), draw
small grey position numbers every 10 nucleotides around the
cloverleaf to help orient readers.}
\item{linkage_palette}{Character vector of length 2 giving the
colors for negative (exclusive) and positive (co-occurring)
linkage values. Default \code{c("#0072B2", "#D55E00")} (blue for
exclusive, vermillion for co-occurring). Stroke width encodes
the magnitude of the value.}
\item{sprinzl_coords}{A tibble of Sprinzl coordinates as
returned by \code{\link[=read_sprinzl_coords]{read_sprinzl_coords()}}, or \code{NULL} (default). When
provided, position columns in \code{modifications}, \code{outlines},
\code{text_colors}, and \code{linkages} are interpreted as Sprinzl
labels and converted to 1-based sequence positions
automatically.}
\item{trna_id}{Character string identifying the tRNA in
\code{sprinzl_coords} (e.g.,
\code{"nuc-tRNA-Glu-UUC-1-1"}). If \code{NULL} (default), the tRNA
name is resolved from \code{trna} automatically.}
}
\value{
The path to the annotated SVG file (invisibly).
}
\description{
Reads a bundled tRNA cloverleaf SVG and overlays modification
highlights, outline circles, and circuit linkage arcs.
Modifications are shown as colored filled circles behind
nucleotide letters; outlines are shown as colored circle borders;
linkages are drawn as Bezier curve arcs between position pairs.
}
\examples{
\donttest{
plot_tRNA_structure("tRNA-Glu-TTC", "Escherichia coli")
}
}