Learn R Programming

RClone (version 1.0.3)

agg_index: Aggregation of clones

Description

agg_index computes Ac (aggregation of clonal lineages) assessed by comparing the probability of clonal identity between nearest units pairs.

Usage

agg_index(data1, coords = NULL, vecpop = NULL, nbrepeat = 1, bar = FALSE, 
listMLL = NULL)

Arguments

data1

a Rclone table with one allele per column, haploid or diploid data.

coords

a table with coordinates of every units in data1.

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

bar

option, if TRUE, adds a progression bar.

listMLL

option, a custom list of MLL.

Value

a list (one population) or a list of lists (multi-populations) of:

  • results a table with Ac value, pvalue and the number of permutations.

  • simulations a vector of nbrepeat values of sim-Ac.

Details

The probability of clonal identity is set as 0 if ramets belong to the same MLG/MLL and 1 otherwise.

Ac is computed as Ac=(Psg-Psp)/Psg with Psg the average probability of clonal identity of all pairs and Psp among pairwise nearest neighbours.

Coordinates of units are randomly permuted nbrepeat times to provide a upper pvalue for Ac (Monte Carlo).

References

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

See Also

autocorrelation, clonal_sub and edge_effect

Examples

Run this code
# NOT RUN {
data(posidonia)
data(coord_posidonia)

agg_index(posidonia, coords = coord_posidonia)
#agg_index(posidonia, coords = coord_posidonia, nbrepeat = 1000, bar = TRUE) #takes time
# }

Run the code above in your browser using DataLab