paperKB
coga / coga-kb
Help
Sign in

Chunk #53 — STAR★METHODS — METHOD DETAILS — Burden Analyses — Comparison to Poisson Distribution

Source
De Novo Coding Variants Are Strongly Associated with Tourette Disorder.
Embedded
yes

Text

de novo variants the number of individuals with > 5 de novo coding variants is 0 for each cohort.counts = count(< df with number of de novos per individual >, numPassingCoding)$nCreate a vector of the number of de novo coding variants within each, separate individual and calculate the mean of this vector.x = rep(0:5, times = counts)distMean = mean(x)Estimate the probabilities of 0, 1, 2, 3, 4, or 5 de novo coding variants in a given individual with the dpois R function, with l = the mean calculated in 2. probs = dpois(0:5, lambda = distMean)Estimate the probability of > 5 de novo coding variants in a given individual by determining the complement of (3). In other words, 1 – the sum of probabilities estimated in (3).comp = 1-sum(probs)Using a Chi-Square test in R (chisq.test), determine the p value for the observed distribution being different that the expected Poisson distribution, based on λ = the mean calculated in 1. We estimated p values through Monte Carlo simulation.pvalue < - chisq.test(x = c(counts, 0), p = c(probs, comp), simulate.p.value = TRUE)$p.value