Description Usage Arguments Value Examples
Plots a Ramachandran diagram from a pdb file using ggplot2 graphics
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ggrama(
pdb,
type = c("general", "glycine", "pre.pro", "proline"),
values = switch(type, general = c(0, 0.001, 0.02, 0.1, 1), glycine = c(0, 0.002,
0.02, 0.1, 1), proline = c(0, 0.002, 0.02, 0.1, 1), pre.pro = c(0, 0.002, 0.02, 0.1,
1)),
colors = switch(type, general = c("#FFFFFF", "#B3E8FF", "#82daff", "#19bbff"),
glycine = c("#FFFFFF", "#FFE8C5", "#ffddab", "#FFCC7F"), proline = c("#FFFFFF",
"#D0FFC5", "#a2fa8e", "#49de26"), pre.pro = c("#FFFFFF", "#B3E8FF", "#82daff",
"#19bbff")),
title = switch(type, general = "General", glycine = "Glycine (Symmetric)", proline =
"Proline", pre.pro = "Pre-Proline"),
shape = 21,
size = 2,
fill = "#FFFFFF",
contour = FALSE,
contour.color = NA,
smooth = FALSE,
...
)
|
pdb |
input pdb file location. |
type |
One of c("general", "glycine", "pre.pro", "proline"). String representing the type of Ramachandran diagram. |
values |
Numeric vector indicating the values of |
colors |
A character vector of valid color names indicating the colors for |
title |
A string indicating the title of the plot. |
shape |
Shape for |
size |
Size for |
fill |
fill for |
contour |
logical, should |
contour.color |
numeric, the color of the contour if contour = TRUE. |
smooth |
logical, should the background grid be smoothed. |
... |
currently not used |
A ggplot2 plot object
1 2 3 4 5 6 7 8 9 | #download a PDB file
download.file("https://files.rcsb.org/download/2ADQ.pdb1.gz",
dest = "2ADQ.pdb1.gz")
# plot the general Ramachandran diagram
ggrama("2ADQ.pdb1.gz")
# plot the proline Ramachandran diagram
ggrama("2ADQ.pdb1.gz", type = "proline")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.