obs.metrics.STRUCTURE.popgen: Compute observed heterozygosities and richness metrics for...

Description Usage Arguments Value

Description

This function randomly assigns individuals to clusters using STRUCTURE assignment probabilities provided in the qmatrix. It then uses resampling to generate distributions of estimated heterozygosities and allelic richness metrics per locus, per cluster.

Usage

1
2
obs.metrics.STRUCTURE.popgen(qmatrix, allele.dat, nclusters, nreps, NA.symbol,
  samp.snps, nsamp, ncores)

Arguments

qmatrix

Dataframe. The STRUCTURE qmatrix, with individuals in column 'ind'

allele.dat

Dataframe. Raw allele data (sep = '/')

nclusters

Integer. The number of clusters identified by STRUCTURE

nreps

Integer. The number of times to repeat estimations. Default is 100

NA.symbol

The code used to represent missing allele data

samp.snps

Logical. If TRUE, a specified number of SNPs will be randomly sampled in each iteration to account for uncertainty and speed computations. Default is FALSE

nsamp

(optional) Integer. Number of SNPs to sample during each iteration. If samp.snps = TRUE and nsamp is not provided, default is to sample 50 (i.e. ncol(allele.dat)/2) in each iteration

ncores

(optional) Integer. Number of cores to split job across for parallel computing. Default is 1 (no parallelisation)

Value

Matrix of mean and 95


nicholasjclark/STRUCTURE.popgen documentation built on May 25, 2019, 10:38 p.m.