Computes \(\ln(iHH_A / iHH_D)\) at a core SNP (Voight et al.
2006). A long haplotype carrying the derived allele drives
\(iHH_D\) up and the score negative; the reverse gives a positive
score. Both routes the paper describes are available: the raw
statistic, and the frequency-binned standardised score when
standardize supplies the bin mean and standard deviation.
Arguments
- hap
Haplotype matrix, chromosomes by sites, coded 0/1 with 0 ancestral at the core.
- core
Core site index, 0-based.
- positions
Optional physical positions.
- min_ehh
EHH threshold at which integration stops, default 0.05 as in the paper.
- standardize
Optional
c(mean, sd)of the empirical distribution in this SNP's derived-allele-frequency bin.
Value
A list with estimate, ihs_unstandardized,
ihh_a, ihh_d, daf, truncated_a,
truncated_d, standardized, core,
method.
