View source: R/distribution_description.R
dist_desc | R Documentation |
Calculates a range of descriptive statistics both about the p-values as a whole, effect size peaks, and sliding windows.
dist_desc(p, meta, windows, delta, pcut = 0.005, chr = "chr", pvals = T)
p |
numeric. p-values or effect sizes for each SNP. |
delta |
numeric. Value used to determine spacing between peaks. |
pcut |
numeric, default 0.005. Only p-values/effect sizes above/below this quantile will be used for peak detection. |
chr |
character,default "chr". Name of the meta column containing chromosome info. |
pvals |
logical, default TRUE. Specifies if p-values are provided. p-values will be -log10 transformed. |
meta. |
data.frame. The position and chromosome for each SNP. Needs a column named "position". |
Peaks are identified with a peak finding algorithm based on the delta and pcut values. These values should be chosen based on the true p-value or effect size distribution. p-values are -log10 transformed.
Stats about windows are run through the basic stat calculation twice: once per window (means per window, for example), then once *per stat* (so the mean of the mean values per window).
The following stats are calculated:
mean
median
sd
variance
20 evenly spaced quantiles between 0 and 1
kurtosis
skewness
.
In addition, the number of unique peaks is also calculated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.