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
Number of loci.
Number of individuals in sources.
Table with proportional weight of each population, qs.
Number of alleles in the dataset.
Value of the alleles in the dataset.
Data frame with three columns for entropies: HlT, HlW, HlB
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.