Genetic diversity estimation per site or group of sites can be biased due to unbalanced sampling designs. There is an expected relationship between the number of sampled individuals in a single population and genetic diversity (e.g., as allelic richness; the total number of alleles).

To overcome the issue, standardized allelic richness and standardized number of private alleles can be determined to the smallest number of individuals within sites or group of sites under multiple randomizations.

The sites or groups of sites with higher standardized genetic diversity than the global mean can be also assessed by testing the proportion of randomizations retrieving higher values than observed.

Standardized population genetic diversity

# Source main function

# Get example data file at: <- "sampleData.gtx" <- 0
replace <- FALSE
ncode <- 3 <- FALSE
resample.number <- 20
discard.pops <- NULL
number.iteractions <- 999
alfa.test <- 0.05
savefile <- FALSE
save.filename <- "richness"

# Define a vector to cluster populations
clustering.vector <- c(1,1,2,2)

# Run function
Rambo(,, ncode, replace,, resample.number, discard.pops, number.iteractions, alfa.test, clustering.vector, savefile, save.filename)