View source: R/signal_at_orf_average_plot.R
signal_at_orf_average_plot | R Documentation |
This function allows you to make a line plot of the ChIP signal over the average ORF. It takes as input a data frame containing the average signal over ORFs (+/- flanking regions) genome-wide.
signal_at_orf_average_plot(inputDataA, inputDataB, genome, yMin, yMax,
onScreen = TRUE, legendXcoord = -200, legendYcoord = yMax + yMax * 0.05,
colorA = "grey50", colorB = "orange", smoothBandwidth = 0)
inputDataA |
A data frame of average signal on ORFs +/- 1/2 the length of the ORF: 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. |
yMin |
Optional number to be used as the minimum Y scale value in the plot. |
yMax |
Optional number to be used as the maximum Y scale value in the plot. |
onScreen |
Boolean indicating plots should be returned to the screen
( |
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 |
colorB |
Optional R color for sample B. Defaults to |
smoothBandwidth |
Optional integer as the bandwith for smoothing data (for better-looking
line plots) using a Kernel Regression Smoother. Smoothing is performed using function
|
To generate the input for this function starting from an R list of wiggle data for the 16 chromosomes you should run:
signal_at_orf
to pull out the signal at every ORF and flanking regions
(1/2 the length of the ORF).
signal_average
to calculate the average signal at each relative position
over all regions genome-wide.
A line plot of one or two samples, either on screen or as a png file (in the working directory).
## Not run:
signal_at_orf_average_plot(WT_orf_S288C_mean_signal, genome = 'S288C')
signal_at_orf_average_plot(WT_orf_mean_signal, dot1_orf_mean_signal, genome = 'SK1',
yMax = 3, onScreen = FALSE, legendXcoord = -500,
legendYcoord = 1, colorA = 'red', colorB = 'green',
smoothBandwidth = 50)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.