find_weights: Produce annotation-based weightings

Description Usage Arguments Details Value

View source: R/informative_bayesian_mpra.R

Description

For the ith variant, adaptively produce a vector of weightings such that at minimum min_num_contributing variants meaningfully contribute (i.e. cumsum(sortedWeights)[30] <= .99) arguments after the 2nd are heuristics that may need tuning

Usage

1
2
find_weights(i, dist_mat, min_dist_kernel, min_num_contributing = 30,
  increase_fold = 1.333)

Arguments

i

the index of the variant in the assay

dist_mat

annotation-based distance matrix

min_dist_kernel

the minimum kernel possible to use in the annotation space

min_num_contributing

the minimum number of variants that must contribute to the ith variant's prior

increase_fold

the multiplicative amount by which to increase the kernel in the case the current kernel doesn't allow at least min_num_contributing variants to contribute

Details

The kernel is initialized at some small, pre-computed value then iteratively increased until there are "enough" variants contributing. This keeps the prior for one variant from being too strongly influenced by extremely close neighbors in annotation space.

Value

a similarity-based vector of weights of the other n-1 variants


andrewGhazi/bayesianMPRA documentation built on May 28, 2019, 4:56 p.m.