draw_folding | R Documentation |
draw_folding
adds alpha-helixes, beta-strands and turns to the
ggplot2 object created by draw_chains
.
It uses the data object.
The ggplot2 function geom_rect
is used to draw parts of the protein
chain which has alpha-helixes, beta-strands and turns proportional to the
number of amino acids (length).
draw_folding(p, data = data,
show.legend = TRUE,show_strand = TRUE,show_helix = TRUE, show_turn = TRUE,
alpha = 1.0)
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'. Uses STRAND, HELIX and TURN type to indicate these parts of the proteins. |
show.legend |
Option to include legend in this layer |
show_strand |
Option to show STRAND in this layer |
show_helix |
Option to show HELIX in this layer |
show_turn |
Option to show TURN in this layer |
alpha |
alpha Transparency of the rectangles representing the folds. |
A ggplot2 object either in the plot window or as an object with an additional geom_rect layer.
# combines with draw_chains to colour chain with helicies, strands and turns.
data("five_rel_data")
p <- draw_canvas(five_rel_data)
p <- draw_chains(p, five_rel_data, label_size = 1.25)
draw_folding(p, five_rel_data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.