callPeaks {GenoGAM} | R Documentation |
Call narrow or broad peaks on the GenoGAM fit and computing significance, respectively
callPeaks(fit, smooth = NULL, range = NULL, peakType = c("narrow", "broad"), threshold = NULL, thresholdType = c("fdr", "pvalue"), maxgap = 500, cutoff = 0.05, minregion = 1)
fit |
A |
smooth |
The name of the smooth, i.e. the 'by' variables in the GenoGAMDataSet design. By default the last one will be taken. |
range |
A |
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 catching also narrow peaks. |
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. Additionally narrow peaks provide a 95% confidence interval for the position, namely 'start' and 'end', which gives a more informative uncertainty measure to the peak position. Also narrow peaks provide an occupancy estimate at the peak position, while broad peaks give the average occupancy accross the region. The columns returned are:
A data.table of identified peaks. The different columns loosely resemble the narrow and broad peak format (with differentcolumn order), such that it is easy to write them to a 'narrowPeak', 'broadPeak' file. See details for column description.
Georg Stricker georg.stricker@in.tum.de
load(system.file("extdata/Set1/fit.rda", package='GenoGAM')) ## calling narrow peaks peaks <- callPeaks(fit, smooth = "genotype", threshold = 1) peaks ## calling broad peaks peaks <- callPeaks(fit, smooth = "genotype", threshold = 1, peakType = "broad", cutoff = 0.75) peaks