sample_LU: Sample Loci or Units

Description Usage Arguments Value Author(s) References Examples

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

1
2
3
4
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 = NULL.

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_MLG

with min, max, mean and SE (Standard Error) of MLG,

res_alleles

with min, max, mean and Satterthwaite approximation of SE of the number of alleles and of Hexp if option He = TRUE,

raw_He

a table with number of loci/units sampled in column and each re-sampling in row for He,

raw_MLG

a table with number of loci/units sampled in column and each re-sampling in row for MLG number,

raw_all

a 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.

Author(s)

Creator/Author: Diane Bailleul <[email protected]>
Author: Sophie Arnaud-Haond <[email protected]>
Contributor: Solenn Stoeckel

The R implementation of RClone was written by Diane Bailleul.

The design was inspired by GenClone program described in Arnaud-Haond & Belkhir (2007).

References

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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"))

dbailleul/RClone documentation built on May 12, 2017, 8:56 p.m.