Learn R Programming

RClone (version 1.0)

psex: Probability of originating from distinct sexual events

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

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

Value

  • For one population:
    • ifpvalue = FALSE, a table with psex values,
    • ifpvalue = TRUE, a list of a table withpsexvalues and p-values and a vector ofsim psex.
    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.

Details

psex and psex_Fis won't work without factoR data (see examples). 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).

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

Run this code
data(factoR) #MANDATORY
data(posidonia)

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

Run the code above in your browser using DataLab