Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

biall2dos

Converts bi-allelic SNPs from hierfstat format to dosage format


Description

Converts bi-allelic SNPs hierfstat format to dosage format, the number of alternate allele copies at a locus for an individual, i.e. 11 -> 0; 12 or 21 >1 and 22 ->2

Usage

biall2dos(dat,diploid=TRUE)

Arguments

dat

a hierfstat data frame without the first column (the population identifier), individuals in rows, columns with individual genotypes encoded as 11, 12, 21 and 22

diploid

whether the data set is from a diploid organism

Value

a matrix containing allelic dosages

Examples

## Not run: 
biall2dos(sim.genot(nbal=2,nbloc=10)[,-1])  # a 10 column matrix

## End(Not run)

hierfstat

Estimation and Tests of Hierarchical F-Statistics

v0.5-10
GPL (>= 2)
Authors
Jerome Goudet [aut, cre], Thibaut Jombart [aut], Zhian N. Kamvar [ctb], Eric Archer [ctb], Olivier Hardy [ctb]
Initial release
2021-11-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.