callPeaks: Call peaks on a GenoGAM object

Description Usage Arguments Details Value Author(s) Examples

View source: R/peakCalling.R

Description

Call narrow or broad peaks on the GenoGAM fit and computing significance, respectively

Usage

1
2
3
callPeaks(fit, smooth = NULL, range = NULL, peakType = c("narrow",
  "broad"), threshold = NULL, thresholdType = c("fdr", "pvalue"),
  maxgap = 500, cutoff = 0.05, minregion = 1)

Arguments

fit

A GenoGAM object

smooth

The name of the smooth, i.e. the colnames of the fitted object. By default all are taken.

range

A GRanges object specifying a range. By default the complete fit is taken.

peakType

The type of the peak (narrow or broad). Default is narrow, see details.

threshold

The significance threshold. Keep in mind that the treshold depends on the thresholdType. By default this is 0.05 for 'pvalue' and 0.1 for 'fdr'.

thresholdType

The threshold type. Either 'fdr'(default) or 'pvalue'. If the threshold is not provided it, will be set accordingly to the thresholdType.

maxgap

For broad peaks only. The maximum gap between two broad peaks, that can be tolerated in order to identify both as part of one broad peak. All broad peaks with distances smaller or equal to the maxgap will be merged.

cutoff

A seperate threshold for broad peaks. Since pointwise pvalues are available. This threshold is used to identify all significantly high positions, which then make up a broad peak.

minregion

For broad peaks only. The minimum length of a broad peak. By default 1, thus all found peaks are returned.

Details

Note, that broad peaks don't provide a specific highest location, but a region. Whereas narrow peaks provide both. However, the borders of narrow peaks are not necessarily informative but taken as +- 100bp around the peak summit. A function for a more statistical estimation of the borders is being implemented. Also narrow peaks provide an occupancy estimate at the peak position, while broad peaks give the average occupancy accross the region.

Value

A list of data.tables of identified peaks. The different columns loosely resemble the narrow and broad peak format (with different column order), such that it is easy to write them to a 'narrowPeak', 'broadPeak' file (see writeToBEDFile).

Author(s)

Georg Stricker georg.stricker@in.tum.de

Examples

1
2
3
4
5
## creating test GenoGAM object
gg <- makeTestGenoGAM() 
## call peaks
peaks <- callPeaks(gg)
peaks

gstricker/GenoGAM documentation built on July 15, 2019, 7:39 p.m.