Skip to contents

Orients Z and weights to the allele the dosage matrix counts. Uses the exact counted allele from PLINK if available, falling back to the EAF frequency match (XOR rule). Drops palindromic SNPs and frequency-ambiguous SNPs.

Usage

harmonize(sumstats, bim, ld, freq_tol = 0.15)

Arguments

sumstats

Output of read_sumstats.

bim

Output of read_bim.

ld

Output of ld_matrix.

freq_tol

Maximum |EAF - reference frequency| tolerance.

Value

List with w, Z, bp, R, ids, n_kept, all aligned to each other.