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.
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")
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
( |
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 |
A line plot of one or two samples, either on screen or as a .png file (in the working directory).
To generate the input for this function starting from an R list of wiggle data for the 16 chromosomes you should run:
signal_at_intergen
to pull out the signal at every intergenic region.
signal_average
to calculate the average signal over all regions.
# 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') # }