psex: Probability of originating from distinct sexual events

Description Usage Arguments Details Value Warning Author(s) References See Also Examples

View source: R/RClone.R

Description

psex and psex_Fis compute the probability that repeated genotypes originate from distinct sexual events (i.e. being different genets and not ramets of the same MLG), with or without taking account of H-W equilibrium departures.

Usage

1
2
3
4
psex(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE, 
		MLGsim = FALSE,  nbrepeat = NULL, bar = FALSE)
psex_Fis(data1, vecpop = NULL, genet = FALSE, RR = FALSE, MLGsim = FALSE, 
		nbrepeat = NULL, 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 psex_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.

genet

option, if genet = TRUE, computes pgen on genet level.

RR

option, if RR = TRUE, computes pgen with Round-Robin method.

MLGsim

option, the method of psex calculation (see details).

nbrepeat

option, numeric, the population is simulated nbrepeat times, based on frequency values.

bar

option, if TRUE, a progression bar appears.

Details

We strongly recommand to use RR = TRUE option to compute allelic frequencies for clonal data. Otherwise, we let the options to work with frequencies at genet level (genet = TRUE) or ramet level (RR = FALSE and genet = FALSE).

if MLGsim = TRUE, psex are computed as probability for two units to be derived from distinct sexual reproductive event to be C(N,2) (Stenberg et al. 2003).

If MLGsim = FALSE, psex are computed with more conservative C(n,1) (Parks & Werth 1993) with n, "number of separated fragments with identical genotype to some previously encountered ramet".

The pvalue method calculation is largely inspired from MLGsim (Stenberg et al., 2003) and MLGsim2.0 (Ivens et al., 2012), with authors agreements.
For each repeat, a population is simulated with allelic frequencies.
If clones occurred, a simulated psex is computed and kept in memory.
At the end, a distribution of sim psex is constructed and p-value is computed as upper p-value (Monte Carlo).

psex and psex_Fis could be time consuming with a certain number of repeats.

Values must differ from MLGsim and MLGsim2.0 because of Round-Robin frequencies and Fis calculation (see freq_RR and Fis).

Value

For one population:

If data1 is a multi-population table (vecpop != NULL), a list of either tables/tables and vectors for each population.

Warning

If sim_psex are less than 100, a warning message pops, as clones are not necessarily generated each simulation.

If no repeated genotype is generated during simulations, a warning message pops as well.

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

Stenberg et al., 2003, MLGsim: a program for detecting clones using a simulation approach.

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

Ivens, A.B.F., van de Sanden, M. and Bakker, J. MLGsim 2.0: updated software for detecting clones from micro satellite data using a simulation approach.
In: The Evolutionary Ecology of Mutualism. PhD Thesis, 2012, University of Groningen. Pg 107-111
http://www.rug.nl/research/institute-evolutionary-life-sciences/tres/downloads for MLGsim 2.0.

See Also

Fis, freq_RR, pgen and pgen_Fis

Examples

1
2
3
4
5
6
data(posidonia)

psex(posidonia, RR = TRUE)
psex(posidonia, RR = TRUE, MLGsim = TRUE)
#psex(posidonia, RR = TRUE, nbrepeat = 1000, bar = TRUE)
##time consuming

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