Skip to content

Commit

Permalink
Fix error in burden assoc when using BBeta weights
Browse files Browse the repository at this point in the history
BBeta weights should not be inverted, otherwise common variants will end
up being weighted higher than rare variants
  • Loading branch information
welchr committed Sep 6, 2024
1 parent 48c35ba commit 2491bae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions raremetal/src/Meta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3564,9 +3564,11 @@ void Meta::BurdenAssoc(String method, GroupFromAnnotation &group, Vector *&maf,
weight.Dimension(maf[g].Length());
SetWeight(method, weight, maf[g]);
// for burden test, need to 1/w
for (int w = 0; w < weight.Length(); w++)
{
// if using BBeta weighting, the weights should not be inverted (otherwise, common variants will end up with higher weights)
if (method != "BBeta") {
for (int w = 0; w < weight.Length(); w++) {
weight[w] = 1 / weight[w];
}
}

numerator = weight.InnerProduct(stats[g]);
Expand Down

0 comments on commit 2491bae

Please sign in to comment.