MMD_Entropy {MMD}R Documentation

Loci entropies to measure allele diversity

Description

Loci entropies to measure allele diversity

Usage

MMD_Entropy(datafile, popfile, NL, sourcenames, verbose = FALSE)

Arguments

datafile

character; Name of the file *.csv (with full path in the file system) containing the genotypes (features) of individuals.

popfile

character; Name of the file *.pop (with full path in the file system) containing the genotypes (features) of individuals.

NL

integer; number of loci. If larger than the number of available loci in the data set, NL is reduced to the maximum available number of loci.

sourcenames

a character vector listing the names of the sources.

verbose

boolean (TRUE/FALSE) for the display of a progress bar (Default FALSE)

Value

A list with

  1. Number of loci.

  2. Number of individuals in sources.

  3. Table with proportional weight of each population, qs.

  4. Number of alleles in the dataset.

  5. Value of the alleles in the dataset.

  6. Data frame with three columns for entropies: HlT, HlW, HlB

  7. Runtime.

Author(s)

Francisco J. Perez-Reche (Univeristy of Aberdeen)

Examples

## This example uses a small dataset stored in the MMD package
datafile <- system.file("extdata", "Campylobacter_10SNP_HlW.csv", package = "MMD")
popfile <- system.file("extdata", "Campylobacter_10SNP_HlW.pop", package = "MMD")

NL <- 100
sourcenames <- c("Cattle","Chicken","Pig","Sheep","WB")

EntropyLoci <- MMD_Entropy(datafile,popfile,NL,sourcenames)

## See more detailed examples in the vignette.


[Package MMD version 1.0.0 Index]