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

fstat2dos

Converts a hierfstat genetic data frame to dosage data


Description

Converts a hierfstat genetic data frame to dosage. For each allele at each locus, allelic dosage (number of copies of the allele) is reported. The column name is the allele identifier

Usage

fstat2dos(dat,diploid=TRUE)

Arguments

dat

data frame with genetic data without the first column (population identifier)

diploid

whether the data set is from a diploid organism

Value

a matrix with ∑_l n_l^a columns (where n_l^a is the number of alleles at locus l), as many rows as individuals, and containing the number of copies (dosage) of the corresponding allele

Examples

## Not run: 
dat<-sim.genot(nbal=5,nbloc=10)
dos<-fstat2dos(dat[,-1])
dim(dos) 
wc(dat)
fst.dosage(dos,pop=dat[,1])


## 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.