Per-marker Fst between groups (Weir & Cockerham)
Arguments
- m
0/1/2 matrix, animals in rows, markers in columns; NA allowed. Double, integer and raw storage give the same result; in a raw matrix, as
read_blupf90_snp()returns it, 5 is the missing code- groups
vector with each animal's group (line, population, generation...)
Value
data.frame with marker, fst and the per-group frequencies
The estimator is Weir and Cockerham's theta-hat with sample-size correction, marker by marker. Negative values are expected at markers with no differentiation (the estimator is unbiased, not truncated) and are NOT zeroed here: truncating biases the scan's mean upward, and the mean is what serves as the reference for finding the peaks.