signal_average: Calculate average signal by position

Description Usage Arguments Value Examples

Description

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.

Usage

1
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

1
2
3
4
5
6
7
8
## Not run: 
signal_average(WT_conv)

signal_average(WT_S288C_ORFsignal)

signal_average(WT_conv, saveFile = TRUE)

## End(Not run)

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