draw_phospho: Add protein phosphorylation sites to ggplot2 object.

Description Usage Arguments Value Examples

View source: R/geoms.R

Description

draw_phospho adds phosphorylation sites to ggplot2 object created by draw_canvas and draw_chains. It uses the data object. The ggplot2 function geom_point is used to draw each of the phosphorylation sites at their location as determined by data object.

Usage

1
2
draw_phospho(p, data = data, size = 2,
         fill = "yellow", show.legend = FALSE)

Arguments

p

ggplot2 object ideally created with draw_canvas.

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.

size

Size of the circle

fill

Colour of the circle.

show.legend

Option to include legend in this layer

Value

A ggplot2 object either in the plot window or as an object with an additional geom_point layer.

Examples

1
2
3
4
5
# combines will with draw_domains to plot chains and phosphorylation sites.
data("five_rel_data")
p <- draw_canvas(five_rel_data)
p <- draw_chains(p, five_rel_data, label_size = 1.25)
draw_phospho(p, five_rel_data)

drawProteins documentation built on Nov. 8, 2020, 5:25 p.m.