Whippet.jl icon indicating copy to clipboard operation
Whippet.jl copied to clipboard

Probability for deltaPsi

Open OlgaVT opened this issue 3 years ago • 2 comments

Hi!

I might probably miss it from the publication - how do you calculate Probability for deltapPsi in .diff.gz?

Thank you!

OlgaVT avatar Jul 28 '21 10:07 OlgaVT

Hi @OlgaVT -- it is on pg. 13 of the Methods S1. "Since the EM-algorithm provides only a point-estimate for Ψ without a depth dependent measure of variance, we utilize the conjugate posterior distribution of the binomial likelihood as a means to compute a read-count derived confidence interval (CI) over Ψ. Given a total read depth for an AS event of N reads which can either support inclusion of node n, inc∈In, or support exclusion, exc∈{I - In}, the number of inclusion reads Ninc are binomially distributed such that Ninc ~Binomial(n=N, p=Ψ). Given a uniform prior distribution of P(Ψ) = Beta(α=1, β=1), we obtain a posterior distribution, P(Ψ|Ninc) ∝ P(Ninc|Ψ)P(Ψ), where P(Ψ|Ninc) = Beta(Ninc + α, Nexc + β). A 90% confidence interval (between 5% and 95%) is then calculated through the quantile distribution of the posterior. This output allows a user to more easily filter for a subset of nodes that have a minimum read depth to estimate Ψ within some range of expected confidence. "

timbitz avatar Oct 08 '21 00:10 timbitz

The probability is derived by simply sampling from both emperical distributions over PSI and comparing the two-- counting the proportion of estimates where X > Y for example.

timbitz avatar Oct 08 '21 00:10 timbitz