Given the ChIP-seq signal on a range of relative genomic positions (e.g. at intergenic regions or on ORFs), this function allows you to calculate the average ChIP signal by position. It takes as input a data frame containing the genome-wide signal, for example the output of signal_at_intergen or signal_at_orf.

signal_average(inputData, saveFile = FALSE)

Arguments

inputData

As a data frame containing at least a column named position, containing the relative genomic position and a column named signal, containing the corresponding signal. No default.

saveFile

Boolean indicating whether output should be written to a .txt file (in current working directory). If saveFile = FALSE, output is returned to screen or an R object (if assigned). Defaults to FALSE.

Value

An R data frame with two columns: position (relative genome coordinate) and mean_signal (average signal at each relative coordinate).

Examples

# NOT RUN {
signal_average(WT_conv)

signal_average(WT_S288C_ORFsignal)

signal_average(WT_conv, saveFile = TRUE)
# }