Skip to contents

Renders an SVG file (typically produced by plot_tRNA_structure()) to a PNG bitmap. Requires the rsvg package.

Usage

structure_to_png(svg_path, output = NULL, width = NULL, height = NULL)

Arguments

svg_path

Path to an SVG file, typically the return value of plot_tRNA_structure().

output

Path for the output PNG file. If NULL (default), replaces the .svg extension with .png.

width

Width of the output PNG in pixels. If NULL (default), uses the intrinsic SVG width.

height

Height of the output PNG in pixels. If NULL (default), uses the intrinsic SVG height.

Value

The path to the PNG file (invisibly).

Examples

# \donttest{
svg <- plot_tRNA_structure("tRNA-Glu-TTC", "Escherichia coli")
structure_to_png(svg)
# }