wiggle_plot: Wiggle data line plot

Description Usage Arguments Value Examples

Description

This function allows you to plot wiggle data for a selected chromosome. It takes as input either the raw wiggle data (for example one element of the 16 chromosome list) or the output of wiggle_smooth() (R data frame with two columns: genome position and smoothed signal).

Usage

1
2
3
wiggle_plot(wiggleData, chr, genome, yMax, color = "grey50", protein,
  legendXcoord = -10, legendYcoord = yMax,
  legendAnnotation = deparse(substitute(wiggleData)), onScreen = TRUE)

Arguments

wiggleData

A data frame of wiggle data with two columns: genome position and signal. No default.

chr

A number representing the chromosome of wiggleData. No default.

genome

A string representing the genome used for mapping. No default.

yMax

Optional number to be used as the max Y scale value in the plots. Particularly useful to plot two chromosomes on the same Y scale. No default.

color

Optional R color. Defaults to grey50.

protein

A string representing the ChIPped protein. No default.

legendXcoord

A number representing the X coordinate to locate legend. Defaults to minimum X (left-aligned).

legendYcoord

A number representing the Y coordinate to locate legend. Defaults to maximum Y (top-aligned).

legendAnnotation

Optional string to be used as the legend. Defaults to name of object passed to the function.

onScreen

Boolean indicating plots should be returned to the screen (onScreen = TRUE) or written to .png files (onScreen = FALSE). Defaults to TRUE.

Value

A line plot, either on screen or as a png file (in the working directory).

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
wiggle_plot(WT[[1]], 1, genome = 'SK1', protein = 'Red1')

wiggle_plot(WT_chr3, 3, genome = 'SK1', yMax = 5, color = 'red', protein = 'Red1', onScreen = TRUE)

wiggle_plot(chrXVI, 16, genome = 'S288C', yMax = 5, color = 'black',
            protein = 'Rec8-HA', legendXcoord = 600, onScreen = FALSE)

## End(Not run)

luisvalesilva/hwglabr documentation built on May 21, 2019, 8:56 a.m.