Description Usage Arguments Value Examples
draw_chains
uses the dataframe containing the protein features to
plot the chains, the full length proteins. It creates the basic plot element
by determining the length of the longest protein. The ggplot2 function
geom_rect
is then used to draw each of the protein
chains proportional to their number of amino acids (length).
1 2 3 4 |
p |
ggplot2 object ideally created with |
data |
Dataframe of one or more rows with the following column names: 'type', 'description', 'begin', 'end', 'length', 'accession', 'entryName', 'taxid', 'order'. Must contain a minimum of one "CHAIN" as data$type. |
outline |
Colour of the outline of each chain. |
fill |
Colour of the fill of each chain. |
label_chains |
Option to label chains or not. |
labels |
Vector with source of names for the chains. EntryName used as default but can be changed. |
size |
Size of the outline of the chains. |
label_size |
Size of the text used for labels. |
A ggplot2 object either in the plot window or as an object.
1 2 3 4 5 6 7 8 9 10 11 12 | # combines with draw_canvas to plot and label chains.
data("five_rel_data")
p <- draw_canvas(five_rel_data)
draw_chains(p, five_rel_data)
# draws five chains with different colours to default
data("five_rel_data")
p <- draw_canvas(five_rel_data)
draw_chains(p, five_rel_data,
label_chains = FALSE,
fill = "red",
outline = "grey")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.