geno_freq_calc_single: from on 012 file compute expected (assuming HW equilbrium)...

Description Usage Arguments Value Examples

View source: R/geno_freq_count_single.R

Description

This is an internal function.

Usage

1

Arguments

g012

an 012 matrix, with indivs in rows and loci in columns. Missing data can be -1 or NA. The matrix must have colnames which are the locus names.

Value

See information for return value of exp_and_obs_geno_freqs.

Examples

1
2
3
4
5
6
# get an 012 matrix from the lobster data
tmp <- t(vcfR::extract.gt(lobster_buz_2000, element = "GT"))
locnames <- colnames(tmp)
g <- make_it_012(tmp)
colnames(g) <- locnames # put these back on since make_it_012 removes them
gf <- geno_freq_calc_single(g)

whoa documentation built on Aug. 11, 2021, 9:06 a.m.