Skip to contents

Scores a condition using a fine-mapping table: takes the lead (max-PIP) variant of each credible set, intersects with the contrast variants, picks the least-significant lead by deviation p-value, and returns the maximum pairwise \(|\mathrm{mean}| / \mathrm{se}\) at that variant – the "finemap" feature score of mash_posterior.ipynb.

Usage

scoreFromCs(fineMapping, contrastResults, condition)

Arguments

fineMapping

A fine-mapping data.frame with cs_order, pip and variants columns (credible-set index 0 = not in a CS).

contrastResults

A contrast table from mashPosteriorContrast with variant row names.

condition

Condition label whose deviation p-value column is used; if that column is absent and exactly one pairwise contrast exists, the pairwise p-value is used instead.

Value

A single numeric score, or NA when nothing overlaps.