Learn R Programming

RClone (version 1.0)

sample_LU: Sample Loci or Units

Description

Monte Carlo procedure to ensure that the sets of loci (sample_units) or units (sample_loci) provide enough power to discriminate MLG (MultiLocus Genotypes).

Usage

sample_loci(data1, haploid = FALSE, vecpop = NULL, nbrepeat = 1000, He = FALSE, 
			graph = FALSE, export = FALSE, bar = FALSE)
sample_units(data1, haploid = FALSE, vecpop = NULL, nbrepeat = 1000, He = FALSE, 
			graph = FALSE, export = FALSE, bar = FALSE)

Arguments

data1
a Rclone table with one allele per column.
haploid
logical, option, haploid indicates the ploidy level of data1. Not edible for pgen_Fis.
vecpop
vector, option, vecpop indicates the population name of each unit of data1, if data1 contains several populations. If data1 contains only one population, leave vecpop =
nbrepeat
numeric, the number of sampling.
He
option, if TRUE, computes Hexp (expected Heterozygosity, Nei 1978).
graph
option, if TRUE, displays a boxplot of average MLG number using X loci.
export
option, if TRUE, graph is saved as pdf into working directory.
bar
option, if TRUE, displays a progression bar.

Value

  • a list of:
  • res_MLGwith min, max, mean and SE (Standard Error) of MLG,
  • res_alleleswith min, max, mean and Satterthwaite approximation of SE of the number of alleles and of Hexp if option He = TRUE,
  • raw_Hea table with number of loci/units sampled in column and each re-sampling in row for He,
  • raw_MLGa table with number of loci/units sampled in column and each re-sampling in row for MLG number,
  • raw_alla table with number of loci/units sampled in column and each re-sampling in row for alleles number.
  • If data1 is a multi-population table, a list of lists for each population.

References

Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.

Examples

Run this code
data(posidonia)

sample_loci(posidonia, nbrepeat = 10, graph = TRUE)[[2]]
sample_units(posidonia, nbrepeat = 10, graph = TRUE, bar = TRUE, He = TRUE)[[1]]

#Graph :
res <- sample_loci(posidonia, nbrepeat = 100)
boxplot(res$raw_MLG, range = 3, ylab = "Number of multilocus genotypes", 
xlab = "Number of loci sampled")
title(paste("Genotype accumulation curve for", "posidonia"))

Run the code above in your browser using DataLab