utils.basic.stats: Calculates mean observed heterozygosity, mean expected...

View source: R/utils.basic.stats.r

utils.basic.statsR Documentation

Calculates mean observed heterozygosity, mean expected heterozygosity and FIS per locus, per population and various population differentiation measures

Description

WARNING: UTILITY SCRIPTS ARE FOR INTERNAL USE ONLY AND SHOULD NOT BE USED BY END USERS AS THEIR USE OUT OF CONTEXT COULD LEAD TO UNPREDICTABLE OUTCOMES.

Usage

utils.basic.stats(x, rounded = TRUE)

Arguments

x

A genlight object containing the SNP genotypes [required]. SilicoDArT (presence/absence) data are rejected with an error.

rounded

If TRUE, results are rounded to 4 decimals; FALSE returns them unrounded [default TRUE].

Details

This is a re-implementation of hierfstat::basic.stats specifically for genlight objects. Formula (and hence results) match exactly the original version of hierfstat::basic.stats but it is much faster. Loci absent from one or more populations are computed from the populations that carry them. With a single population, only Ho, Hs and Fis are meaningful; the differentiation measures involve divisions by zero and are not interpretable.

Value

A list with the statistics for each population

Author(s)

Luis Mijangos and Carlo Pacioni (post to https://groups.google.com/d/forum/dartr)

See Also

Other utilities: gl.He(), gl.Ho(), gl.alf(), utils.allelic.richness(), utils.check.datatype(), utils.collapse.matrix(), utils.dart2genlight(), utils.dist.binary(), utils.fbm.amat(), utils.fbm.blocks(), utils.fbm.colblocks(), utils.fbm.colwise(), utils.fbm.copy(), utils.fbm.count.mean(), utils.fbm.decode(), utils.fbm.grm(), utils.fbm.has(), utils.fbm.new(), utils.fbm.pair.counts(), utils.fbm.reader(), utils.fbm.rowwise(), utils.fbm.tempfile(), utils.flag.start(), utils.het.pop(), utils.history.call(), utils.is.fixed(), utils.jackknife(), utils.n.var.invariant(), utils.plot.save(), utils.read.fasta(), utils.read.ped(), utils.recalc.avgpic(), utils.recalc.callrate(), utils.recalc.freqhets(), utils.recalc.freqhomref(), utils.recalc.freqhomsnp(), utils.recalc.maf(), utils.reset.flags(), utils.transpose(), utils.vcf.depth(), utils.vcfr2genlight.polyploid()

Examples

require("dartR.data")
if (isTRUE(getOption("dartR_fbm"))) platypus.gl <- gl.gen2fbm(platypus.gl)
out <- utils.basic.stats(platypus.gl)


dartR.base documentation built on Nov. 18, 2026, 9:06 a.m.