plotdata: This function visualizes the dataframe yielded by function...

Description Usage Arguments Value Author(s) Examples

Description

Prerequisites: You need to install packages: "ggplot2", "grid", and "reshape"

Usage

1
plotdata(x, x.title, condition, n, legendpos = "null")

Arguments

x

the dataframe name that is in the format of "getdata" output

x.title

the title of the output plot

condition

a character vector that gives the sample list that you want to plot. These samples will be merged together by adding up the read numbers to yield one plot.

n

the number of CpG sites in this region.

legendpos

the position of the legend. Default: "null" ("left", "right", "bottom", "top", or two-element numeric vector)

Value

Output plot: Rows indicate reads and are presented in percentage (y axis), showing whether each of CpG sites (x axis) in the target region is methylated (light green) or demethylated (dark green). Reads are sorted so that those with no demethylated positions are at the bottom, and those with most demethylated positions are at the top.

Author(s)

Xin Yang xin.yang@cimr.cam.ac.uk

Examples

1
2
data(mydata)
plotdata(mydata, x.title="Methylation Plot", condition="P1_A1", n=10, legendpos="right")

Methplot documentation built on May 1, 2019, 7:50 p.m.