signal_at_intergen_average_plot: Line plot of average signal on intergenic regions

Description Usage Arguments Details Value Examples

Description

This function allows you to make a line plot of the average ChIP signal on specific intergenic regions. It takes as input a data frame containing the average signal in a window of positions centered on the midpoints of a specified type of intergenic region.

Usage

1
2
3
signal_at_intergen_average_plot(inputDataA, inputDataB, genome, orientation,
  yMax, onScreen = TRUE, legendXcoord = xMin + xMin * 0.2,
  legendYcoord = yMax + yMax * 0.05, colorA = "grey50", colorB = "orange")

Arguments

inputDataA

A data frame of average signal between convergent genes: relative position and average signal. No default.

inputDataB

Optional data in the same format for a second sample. No default.

genome

A string representing the genome used for mapping. This is used in the title of the plot only. No default.

orientation

A string representing the type of intergenic region (convergent, divergent or tandem). This is used in the title of the plot only. No default.

yMax

Optional number to be used as the max Y scale value in the plot.

onScreen

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

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

colorA

Optional R color for sample A. Defaults to grey50.

colorB

Optional R color for sample B. Defaults to green.

Details

To generate the input for this function starting from an R list of wiggle data for the 16 chromosomes you should run:

  1. signal_at_intergen to pull out the signal at every intergenic region.

  2. signal_average to calculate the average signal over all regions.

Value

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

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
signal_at_intergen_average_plot(WT_conv_mean_signal, genome = 'S288C', orientation = 'Convergent')

signal_at_intergen_average_plot(WT_div_mean_signal, dot1_conv_mean_signal, genome = 'SK1',
                                orientation = 'Div', yMax = 3, onScreen = FALSE,
                                legendXcoord = -500, legendYcoord = 1,
                                colorA = 'red', colorB = 'green')

## End(Not run)

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