enloc Colocalisation Probabilities For One Signal Cluster
Source:R/enloc.R
enlocClusterProbabilities.RdThe quantities fastenloc reports for a single eQTL signal cluster, given the GWAS Bayes factors and the eQTL PIPs over the same variants.
Both parameterisations are returned because they come from one
computation: rcp is ppH4 and lcp is
ppH3 + ppH4.
Arguments
- gwasLog10Bf
Numeric vector of per-variant GWAS log10 Bayes factors.
- qtlPip
Numeric vector of per-variant eQTL PIPs, same length and order.
- pi1e
Prior probability of GWAS causality for a variant that is a causal eQTL,
expit(a0 + a1).- pi1ne
The same for a variant that is not,
expit(a0).- p12
Prior probability of colocalisation, used only for the small-probability floor fastenloc applies to each SNP-level term.
- applyFloor
Logical. Apply that floor. fastenloc skips it on the summary-statistics path, where not all variants are present.
Value
A list with ppH0 to ppH4, rcp, lcp and
scp (the per-variant colocalisation probabilities whose sum is
rcp).
Examples
enlocClusterProbabilities(
gwasLog10Bf = c(2, 0.1, 0.1),
qtlPip = c(0.7, 0.2, 0.05),
pi1e = 0.02,
pi1ne = 0.001
)
#> $ppH0
#> [1] 0.0206496
#>
#> $ppH1
#> [1] 0.002119072
#>
#> $ppH2
#> [1] 0.3848805
#>
#> $ppH3
#> [1] 0.01098098
#>
#> $ppH4
#> [1] 0.5813699
#>
#> $rcp
#> [1] 0.5813699
#>
#> $lcp
#> [1] 0.5923508
#>
#> $scp
#> [1] 0.5787676370 0.0020817865 0.0005204466
#>