draw_phospho: Add protein phosphorylation sites to ggplot2 object.

View source: R/geoms.R

draw_phosphoR Documentation

Add protein phosphorylation sites to ggplot2 object.

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

draw_phospho(p, data = data, size = 2,
         fill = "yellow", alpha = 1.0, 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.

alpha

Transparency of the circles representing the protein phosphorylation sites.

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

# 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)


brennanpincardiff/drawProteins documentation built on March 8, 2024, 8:15 a.m.