| Title: | Partially Clonal Populations Analysis |
|---|---|
| Description: | R version of 'GenClone' (a computer program to analyse genotypic data, test for clonality and describe spatial clonal organization, Arnaud-Haond & Belkhir 2007, <https://wwz.ifremer.fr/clonix/content/download/68205/903914/file/GenClone2.0.setup.zip>), this package allows clone handling as 'GenClone' does, plus the possibility to work with several populations, MultiLocus Lineages (MLL) custom definition and use, and p-value calculation for psex statistic (probability of originating from distinct sexual events) and psex_Fis statistic (taking account of Hardy-Weinberg equilibrium departure) as 'MLGsim'/'MLGsim2' (a program for detecting clones using a simulation approach, Stenberg et al. 2003). Compatibility updates by Renova. |
| Authors: | Sophie Arnaud-Haond [aut], Diane Bailleul [aut, cre], Solenn Stoeckel [ctb] |
| Maintainer: | Diane Bailleul <[email protected]> |
| License: | GPL (>= 2.0) |
| Version: | 1.0.3.9002 |
| Built: | 2026-11-19 14:07:51 UTC |
| Source: | https://github.com/renova-r/RClone |
RClone is a R package gathering all the functions of GenClone program to handle data (haploid and diploid) with clones.
| Package: | RClone |
| Type: | Package |
| Title: | GenClone |
| Version: | 1.0 |
| Date: | 2015-07-31 |
| License: | GPL (>=2.0) |
| LazyLoad: | yes |
This package contains several types of functions:
import/export functions to handle data from GenClone (see transcript_GC)
and Adegenet and export RClone data for Genetix and Arlequin (for example see export_genclone_genetix),
functions to help defining MLL (MultiLocus Lineage) as psex and genet_dist,
descriptive functions to compute genotypic richness and diversity: clonal_index, genclone and Pareto_index,
functions for spatial analyses of clonal structure (see for example autocorrelation).
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).
Review: "Standardizing methods to address clonality in population studies" 2007, Molecular Ecology, S. Arnaud-Haond, C.M. Duarte, F. Alberto and E.A. Serrao
agg_index computes Ac (aggregation of clonal lineages) assessed
by comparing the probability of clonal identity between nearest units pairs.
agg_index(data1, coords = NULL, vecpop = NULL, nbrepeat = 1, bar = FALSE, listMLL = NULL)agg_index(data1, coords = NULL, vecpop = NULL, nbrepeat = 1, bar = FALSE, listMLL = NULL)
data1 |
a |
coords |
a table with coordinates of every units in |
vecpop |
vector, option, |
nbrepeat |
numeric, the number of repeats. |
bar |
option, if |
listMLL |
option, a custom list of MLL. |
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).
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.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
autocorrelation, clonal_sub and edge_effect
data(posidonia) data(coord_posidonia) agg_index(posidonia, coords = coord_posidonia) #agg_index(posidonia, coords = coord_posidonia, nbrepeat = 1000, bar = TRUE) #takes timedata(posidonia) data(coord_posidonia) agg_index(posidonia, coords = coord_posidonia) #agg_index(posidonia, coords = coord_posidonia, nbrepeat = 1000, bar = TRUE) #takes time
autocorrelation computes kinship coefficients (Loiselle or Ritland)
between pairs of individuals within specific ranges of geographic distance.
autocorrelation(data1, haploid = FALSE, coords = NULL, vecpop = NULL, listMLL = NULL, Loiselle = FALSE, Ritland = FALSE, genet = FALSE, central_coords = FALSE, random_unit = FALSE, weighted = FALSE, class1 = FALSE, class2 = FALSE, d = NULL, vecdist = NULL, graph = FALSE, nbrepeat = NULL, export = FALSE)autocorrelation(data1, haploid = FALSE, coords = NULL, vecpop = NULL, listMLL = NULL, Loiselle = FALSE, Ritland = FALSE, genet = FALSE, central_coords = FALSE, random_unit = FALSE, weighted = FALSE, class1 = FALSE, class2 = FALSE, d = NULL, vecdist = NULL, graph = FALSE, nbrepeat = NULL, export = FALSE)
data1 |
a |
haploid |
logical, option, |
coords |
a table with coordinates of every units in |
vecpop |
vector, option, |
listMLL |
option, a custom list of MLL. |
Loiselle |
logical, if |
Ritland |
logical, if |
genet |
option, |
central_coords |
option, if |
random_unit |
option, if |
weighted |
option, if |
class1 |
option, if |
class2 |
option, if |
d |
numeric, option, number of distance classes. By default, d = 10. |
vecdist |
option, a custom vector distance to construct distance classes. |
graph |
option, if |
nbrepeat |
numeric, option, if |
export |
option, if |
By default, d = 10 and autocorrelation computes 10
equidistant distance classes for all the ramets pairs.
The function proposes 3 others options:
class1 fixing d equidistant classes,
class2 fixing d distance classes with the same
number of units pairs,
maxdist = TRUE allowing the user to give a vector
vecdist of intervals.
The function computes one of the two average kinship coefficients: Loiselle and Ritland.
Autocorrelation can be compute on ramets level, or genet level with:
central coordinates of each MLG/MLL,
a re-sampling approach which randomly allocates one of the unit's coordinates per MLG/MLL (Alberto 2005),
keeping all the ramets but weighting the matrix distances by a weighted matrix (Wagner 2005) where units of the same MLG/MLL are set to 0.
A permutation approach could be perform to assess pvalue and confidence
intervals by permutation of the geographic coordinates among units.
For the re-sampling approach, a unit of each MLG/MLL is randomly picked at each
permutation.
The p-value of mean kinship coefficients is related with the overall mean kinship
coefficient: upper p-value (Monte Carlo) if greater or equal to the overall;
otherwise, lower p-value.
For b and Sp, their p-value correspond to upper p-value.
autocorrelation returns a list (one population) or lists of list
(several populations) of:
\command{Main_results} |
, a table with for each class, min, max, mean and
ln(mean) of distance between two units, the number of pairs, the mean
kinship coefficient and |
\command{Slope_and_Sp_index} |
, a table with slopes of the regression between
genetic and geographic/log(geographic) distances and |
\command{Slope_resample} |
, a table with slopes of the regression between genetic and geographic/log(geographic) distances at each pvalue. |
\command{Kinship_resample} |
, a table with for each class in column and each pvalue in row the mean kinship coefficient. |
\command{Matrix_kinship_results} |
, a dist object with kinship coefficients. |
\command{Class_kinship_results} |
, a list of kinship coefficients by distance class. |
\command{Class_distance_results} |
, a list of geographical distances by distance class. |
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).
Loiselle et al., 1995, Spatial genetic structure of a tropical understory shrub, Psychotria officinalis (Rubiaceae).
Ritland, 1996, A marker-based method for inferences about quantitative inheritance in natural populations.
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
Vekemans & Hardy, 2004, New insights from fine-scale spatial genetic structure analyses in plant populations.
kinship_Loiselle, kinship_Ritland
data(posidonia) data(coord_posidonia) distGC <- c(0,10,15,20,30,50,70,76.0411073) #res1 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, nbrepeat = 1000) #res2 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, #class2 = TRUE, d = 7) #res2[[1]] #Main_results #res1[[2]] #Slope_and_Sp_index #res2[[3]] #Slope_and_Sp_index #res3 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, #vecdist = distGC, graph = TRUE)data(posidonia) data(coord_posidonia) distGC <- c(0,10,15,20,30,50,70,76.0411073) #res1 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, nbrepeat = 1000) #res2 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, #class2 = TRUE, d = 7) #res2[[1]] #Main_results #res1[[2]] #Slope_and_Sp_index #res2[[3]] #Slope_and_Sp_index #res3 <- autocorrelation(posidonia, coords = coord_posidonia, Loiselle = TRUE, #vecdist = distGC, graph = TRUE)
clonal_index computes main genotypic diversity and richness indices.
clonal_index(data1, vecpop = NULL, listMLL = NULL)clonal_index(data1, vecpop = NULL, listMLL = NULL)
data1 |
a |
vecpop |
vector, option, |
listMLL |
option, a custom list of MLL. |
clonal_index returns:
the number of units N,
the number of unique genotypes G,
the clonal diversity index R (Dorken & Eckert 2001;
Ellstrand & Roose 1987),
the Shannon-Wiener index estimator H'' (Pielou 1966),
the Pielou evenness index J' (Pielou 1975),
the Simpson complement unbiased D' (Pielou 1969 ; Gini 1912 ; Peet 1974),
the Simpson complement index V (Hurlbert 1971 ; Fager 1972),
the reciprocal of Simpson index unbiased Hill (Hurlbert 1971 ; Hill 1973).
a table (one population) or a list of tables (several population) with genotypic indices.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) clonal_index(posidonia)data(posidonia) clonal_index(posidonia)
clonal_sub computes the clonal subrange analysis with spatial distance
intervals and the corresponding probabilities of clonal identity.
clonal_sub(data1, coords = NULL, vecpop = NULL, listMLL = NULL, class1 = FALSE, class2 = FALSE, d = NULL, vecdist = NULL)clonal_sub(data1, coords = NULL, vecpop = NULL, listMLL = NULL, class1 = FALSE, class2 = FALSE, d = NULL, vecdist = NULL)
data1 |
a |
coords |
a table with coordinates of every units in |
vecpop |
vector, option, |
listMLL |
option, a custom list of MLL. |
class1 |
option, if |
class2 |
option, if |
d |
numeric, number of distance classes. |
vecdist |
option, a custom vector distance intervals to construct distance classes. |
By default, d = 10 and clonal_sub computes 10 equidistant
distance classes for all the ramets pairs.
The function proposes 3 others options:
class1 fixing d equidistant classes,
class2 fixing d distance classes with the same
number of units pairs,
vecdist != NULL allowing the user to give a vector,
vecdist of intervals. vecdist must start with 0 and
end with max(dist).
A list of:
clonal_sub_res |
clonal subrange, i.e. maximum distance between two units sharing the same MLG/MLL (Alberto et al., 2005) |
clonal_sub_tab |
table of results with, per class, the number of units pairs,
the min, max and mean distances between pairs and |
For multi-population data1, a list of lists per population.
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).
Alberto et al., 2005, Spatial genetic structure, neighbourhood size and clonal subrange in seagrass (Cymodocea nodosa) populations.
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
autocorrelation, agg_index and edge_effect
data(posidonia) data(coord_posidonia) distGC <- c(0,10,15,20,30,50,70,76.0411073) clonal_sub(posidonia, coords = coord_posidonia) clonal_sub(posidonia, coords = coord_posidonia, vecdist = distGC)data(posidonia) data(coord_posidonia) distGC <- c(0,10,15,20,30,50,70,76.0411073) clonal_sub(posidonia, coords = coord_posidonia) clonal_sub(posidonia, coords = coord_posidonia, vecdist = distGC)
convert_GC helps files conversion into RClone format.
RClone functions work on tables with one allele per column.
convert_GC converts tables with one locus per column into tables with
one allele per column, handling separation elements.
convert_GC also sorts alleles at a locus per increasing order.
convert_GC(data1, num, ele)convert_GC(data1, num, ele)
data1 |
a table, with units in row and one locus per column. |
num |
numeric, the length of each allele. |
ele |
option, the alleles separator in the original table. |
a table with one allele per column, alleles sorted by increasing order.
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).
sort_all for tables with one allele per column. transcript_GC uses convert_GC as internal function.
test <- matrix("232/231", ncol = 2, nrow = 2) convert_GC(test, 3, "/") #"232" is a allele of length 3 and "/" is the separator. test2 <- matrix("192235", ncol = 2, nrow = 2) convert_GC(test2, 3) #no separator #with data1, a genind object from adegenet: #test <- genind2df(data1) #convert_GC(test, 3, "/")test <- matrix("232/231", ncol = 2, nrow = 2) convert_GC(test, 3, "/") #"232" is a allele of length 3 and "/" is the separator. test2 <- matrix("192235", ncol = 2, nrow = 2) convert_GC(test2, 3) #no separator #with data1, a genind object from adegenet: #test <- genind2df(data1) #convert_GC(test, 3, "/")
The quadra coordinates of a sub-dataset of Posidonia oceanica sampled in Mediterranean sea.
data("coord_posidonia")data("coord_posidonia")
A data frame with 40 observations on the following 2 variables:
a numeric vector, x-coordinate
a numeric vector, y-coordinate
Arnaud-Haond S, Alberto F, Eguiluz VM, Hernandez-Garcia E, Duarte CM, Serrao EA (2014) Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites.
Dryad Digital Repository: doi:10.5061/dryad.3b8k6
Arnaud-Haond S, Maolic Y, Hernandez-Garcia E, Eguiluz VM, Alberto F, Serrao EA, Duarte CM (2014) Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites. Journal of Heredity 105(4): 532-541. doi:10.1093/jhered/esu015
Arnaud-Haond S & Belkhir K, 2007, GENCLONE: a computer program to analyse genotypic data, test for clonality and describe spatial clonal organization.
data(coord_posidonia)data(coord_posidonia)
edge_effect tests the occurrence of Edge Effect.
edge_effect(data1, coords = NULL, center = NULL, vecpop = NULL, nbrepeat = 1, bar = FALSE, listMLL = NULL)edge_effect(data1, coords = NULL, center = NULL, vecpop = NULL, nbrepeat = 1, bar = FALSE, listMLL = NULL)
data1 |
a |
coords |
a table with coordinates of every units in |
center |
a vector or a list of vectors, with |
vecpop |
vector, option, |
nbrepeat |
numeric, option, the number of repeats. |
bar |
logical, option, if |
listMLL |
option, a custom list of MLL. |
The index of edge effect Ee estimates the effect of sampling (scheme
and strategy) on genotypic richness estimation and in particular overestimation
due to large clones sampled only once at the edge of the sampling area.
Ee is estimated as Ee=(Du-Da)/Da with Du average
geographic distances between unique MLG/MLL and the centre, and Da
between all sampling units and the centre.
As for the aggregation index Ac, coordinates of units are randomly
permuted nbrepeat times to provide a upper p-value (Monte Carlo).
a list (one population) or list of lists (several populations) with
results a table with Ee value, pvalue and the number of permutations.
simulations a vector of nbrepeat values of sim-Ee.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
autocorrelation, clonal_sub and agg_index
data(posidonia) data(coord_posidonia) center1 <- c(40,10) #Our sample quadra ranges from 0 to 80 and 0 to 20 edge_effect(posidonia, coords = coord_posidonia, center = center1, nbrepeat = 1000, bar = TRUE) #But if, for some reasons you don't know where the middle of the sampling ##area is, you can try some of these: center <- c(mean(coord_posidonia[,1]), mean(coord_posidonia[,2])) #or center <- c(mean(c(min(coord_posidonia[,1]), max(coord_posidonia[,1]))), mean(c(min(coord_posidonia[,2]), max(coord_posidonia[,2])))) #or center <- c((max(coord_posidonia[,1])-min(coord_posidonia[,1]))/2, (max(coord_posidonia[,2])-min(coord_posidonia[,2]))/2)data(posidonia) data(coord_posidonia) center1 <- c(40,10) #Our sample quadra ranges from 0 to 80 and 0 to 20 edge_effect(posidonia, coords = coord_posidonia, center = center1, nbrepeat = 1000, bar = TRUE) #But if, for some reasons you don't know where the middle of the sampling ##area is, you can try some of these: center <- c(mean(coord_posidonia[,1]), mean(coord_posidonia[,2])) #or center <- c(mean(c(min(coord_posidonia[,1]), max(coord_posidonia[,1]))), mean(c(min(coord_posidonia[,2]), max(coord_posidonia[,2])))) #or center <- c((max(coord_posidonia[,1])-min(coord_posidonia[,1]))/2, (max(coord_posidonia[,2])-min(coord_posidonia[,2]))/2)
These functions allow to transform a RClone table into files to work
with Adegenet (R package), Genetix and Arlequin softwares.
export_genclone_genind(data1, ele) export_genclone_genetix(data1, haploid = FALSE, ele, name) export_genclone_arlequin(data1, haploid = FALSE, name)export_genclone_genind(data1, ele) export_genclone_genetix(data1, haploid = FALSE, ele, name) export_genclone_arlequin(data1, haploid = FALSE, name)
data1 |
a |
haploid |
logical, option, if |
ele |
option, separator element for export. |
name |
option, name of the exported file. |
a genind object or a file for Genetix or Arlequin.
For multi-population files, we recommend to use split function to cut the table into
several tables, one for each population, and then combine lapply with the export functions.
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).
data(posidonia) #RClone to Adegenet: res <- export_genclone_genind(posidonia, "/") #library(adegenet) #res2 <- df2genind(res, ploidy = 2, sep = "/") #nAll(res2) #RClone to Genetix: export_genclone_genetix(posidonia, name = "test.txt") #or write.table(export_genclone_genetix(posidonia), "test2.txt", row.names = FALSE, sep = "\t", quote = FALSE) #for genets only: export_genclone_genetix(unique(posidonia), name = "test.txt") #Rclone to Arlequin: write.table(export_genclone_arlequin(posidonia), "file1.arp", row.names = FALSE, col.names = FALSE, quote = FALSE) #or export_genclone_arlequin(posidonia, haploid = FALSE, "file2.arp") #for genets only: export_genclone_arlequin(unique(posidonia), haploid = FALSE, "file2.arp") #if several populations: #res <- split(data, vecpop) #lapply(res, function(x) export_genclone_genetix(x)) #lapply(res, function(x) export_genclone_arlequin(x))data(posidonia) #RClone to Adegenet: res <- export_genclone_genind(posidonia, "/") #library(adegenet) #res2 <- df2genind(res, ploidy = 2, sep = "/") #nAll(res2) #RClone to Genetix: export_genclone_genetix(posidonia, name = "test.txt") #or write.table(export_genclone_genetix(posidonia), "test2.txt", row.names = FALSE, sep = "\t", quote = FALSE) #for genets only: export_genclone_genetix(unique(posidonia), name = "test.txt") #Rclone to Arlequin: write.table(export_genclone_arlequin(posidonia), "file1.arp", row.names = FALSE, col.names = FALSE, quote = FALSE) #or export_genclone_arlequin(posidonia, haploid = FALSE, "file2.arp") #for genets only: export_genclone_arlequin(unique(posidonia), haploid = FALSE, "file2.arp") #if several populations: #res <- split(data, vecpop) #lapply(res, function(x) export_genclone_genetix(x)) #lapply(res, function(x) export_genclone_arlequin(x))
Fis computes observed Heterozygosity (Hobs), expected
Heterozygosity (Hexp; Nei, 1978) and Fis from ramets or genets.
Fis(data1, vecpop, genet = FALSE, RR = FALSE)Fis(data1, vecpop, genet = FALSE, RR = FALSE)
data1 |
a |
vecpop |
vector, option, |
genet |
option, if |
RR |
option, if |
Allelic frequencies are computed:
on ramet level,
on genet level (genet = TRUE),
with Round-Robin method (RR = TRUE, see freq_RR).
a table with Hobs, Hexp and Fis for each locus.
If RR = TRUE, a list of the Hobs/Hexp/Fis table and another
table with Round-Robin frequencies.
If data1 is a multi-population table, a list of table(s) for each population.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
freq_RR, pgen, pgen_Fis, psex
and psex_Fis
data(posidonia) Fis(posidonia) Fis(posidonia, genet = TRUE) Fis(posidonia, RR = TRUE)data(posidonia) Fis(posidonia) Fis(posidonia, genet = TRUE) Fis(posidonia, RR = TRUE)
freq_RR returns a table of allelic frequencies computed with or
without Round-Robin method.
freq_RR(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE)freq_RR(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
genet |
option, if |
RR |
option, if |
Round-Robin method (Parks & Werth 1993) is a sub-sampling approach which avoids
overestimation of rare alleles.
Each locus frequency is estimated on MLG lists constructed without the locus
sampled.
This calculation is repeated for all loci.
a table (one population) or a list of tables (several populations) with three columns:
a first column with the number of the locus considered (written as "locus_1"),
a second column with the list of the unique alleles of the locus,
a last column with the frequency of the allele in row.
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).
Parks & Werth, 1993, A study of spatial features of clones in a population of Bracken fern, Pteridium aquilinum (Dennstaedtiaceae). Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) freq_RR(posidonia, RR = TRUE) freq_RR(posidonia)data(posidonia) freq_RR(posidonia, RR = TRUE) freq_RR(posidonia)
genclone computes main genetic/genotypic diversity/richness indices.
GenClone(data1, haploid = FALSE, coords = NULL, vecpop = NULL, listMLL = NULL, nbrepeat = NULL, bar = FALSE)GenClone(data1, haploid = FALSE, coords = NULL, vecpop = NULL, listMLL = NULL, nbrepeat = NULL, bar = FALSE)
data1 |
a |
haploid |
logical, option, |
coords |
a table with coordinates of every units in |
vecpop |
vector, option, |
nbrepeat |
numeric, option, if |
listMLL |
option, a custom list of MLL. |
bar |
option, if |
GenClone returns results of several functions of RClone:
a summary of MLG_tab, Fis on ramets and genets with pvalues
(resample the population nbrepeat times, with simulated sexual events),
B_Pareto from Pareto_index, Sp from
autocorrelation and indexes from clonal_index.
If no coordinate at all are available, let coords = NULL as it or
create a table with always the same number (i.e. "999", "-1", etc.).
If coordinates are available for some populations only, for the population
with missing coordinates: replace all the coordinates by the same number,
as "999".
GenClone cannot handle mix situation with missing coordinates
only for some units of the population.
GenClone returns a table with:
N, the number of units in data1,
Lineage, MLG or MLL,
nb_L, the number of MLG/MLL,
nb_all, the mean number of alleles,
SE, the standard error of nb_all,
Fis, on ramets if diploid data
pval_2sides, the two-sided p-value of Fis if nbrepeat,
Fis_WR, on genets if diploid data
pval_2sides, the two-sided p-value of Fis_WR if nbrepeat,
R, the clonal diversity index (Dorken & Eckert 2001; Ellstrand & Roose 1987),
Pareto_index, the index of Pareto
Sp_Loiselle, Sp index computed on ramets with Loiselle kinship results
used to quantify Spatial Genetic Structure (Vekemans and Hardy, 2004)
pval_2sides, the two-sided p-value of Sp_Loiselle if nbrepeat,
Sp_Ritland, Sp index computed on ramets with Ritland kinship results
used to quantify SGS
pval_2sides, the two-sided p-value of Sp_Ritland if nbrepeat,
Sp_L_WR, Sp index computed on genets with Loiselles kinship results
used to quantify SGS
pval_2sides, the two-sided p-value of Sp_L_WR if nbrepeat,
Sp_R_WR, , Sp index computed on genets with Ritland kinship results
used to quantify SGS
pval_2sides, the two-sided p-value of Sp_R_WR if nbrepeat,
H”, the Shannon-Wiener index estimator (Pielou 1966),
J', the Pielou evenness index(Pielou 1975),
D', the Simpson complement unbiased (Pielou 1969 ; Gini 1912 ; Peet 1974),
V, the Simpson complement index (Hurlbert 1971 ; Fager 1972),
Hill, the reciprocal of Simpson index unbiased (Hurlbert 1971 ; Hill 1973).
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) data(coord_posidonia) #GenClone(posidonia) #without coordinates #GenClone(posidonia, coords = coord_posidonia) #with coordinates #GenClone(posidonia, coords = coord_posidonia, nbrepeat = 1000) ##time consumingdata(posidonia) data(coord_posidonia) #GenClone(posidonia) #without coordinates #GenClone(posidonia, coords = coord_posidonia) #with coordinates #GenClone(posidonia, coords = coord_posidonia, nbrepeat = 1000) ##time consuming
Defining MLL (MultiLocus Lineage): ascertaining that each distinct MLG (MultiLocus Genotype) belongs to a distinct genet (Halkett et al., 2005a).
genet_dist(data1, haploid = FALSE, vecpop = NULL, manh = FALSE, manh_w = FALSE, graph = FALSE, breaking = NULL, alpha1 = NULL, alpha2 = NULL, export = FALSE) genet_dist_sim(data1, haploid = FALSE, vecpop = NULL, nbrepeat = 1000, genet = FALSE, manh = FALSE, manh_w = FALSE, graph = FALSE, breaking = NULL, export = FALSE)genet_dist(data1, haploid = FALSE, vecpop = NULL, manh = FALSE, manh_w = FALSE, graph = FALSE, breaking = NULL, alpha1 = NULL, alpha2 = NULL, export = FALSE) genet_dist_sim(data1, haploid = FALSE, vecpop = NULL, nbrepeat = 1000, genet = FALSE, manh = FALSE, manh_w = FALSE, graph = FALSE, breaking = NULL, export = FALSE)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
manh |
option, if |
manh_w |
option, if |
graph |
option, if |
breaking |
numeric, option, if |
alpha1 |
numeric, option, if |
alpha2 |
numeric, option, if |
nbrepeat |
numeric, the number of repeats for simulation (i.e. reproduction event). |
genet |
option, if |
export |
option, if |
genet_dist and genet_dist_sim help determining MLL, i.e. if
slightly different MLG belong or not to the same lineage.
genet_dist computes genetic distances between pairs of units in terms
of number of alleles (Chakraborty and Jin, 1993) by default.
If manh = TRUE or manh_w = TRUE, divergence of SSR motifs
(Rozenfeld et al., 2007) is used as genetic distance.
These distance distributions help defining MLL with significativity of alpha:
every pair under alpha could be ramets of a genet.
genet_dist_sim computes genetic distances but after a reproduction
event between the units.
The simulated distance distribution allows to distinguish slightly differences due to somatic mutation or scoring errors by stacking the two distributions.
genet_dist returns:
distance_matrix, a dist object with genetic distances
by pair of units.
potential_clones, a table containing names and genetic distances of
pairs of units under alpha1 distribution or of maximal genetic distance
of alpha2.
all_pairs, a table containing names and genetic distances of every
pairs of units.
sign, the numeric value of alpha1 or alpha2.
If vecpop != NULL, a list for every population.
genet_dist_sim returns a dist object of genetic distances
by pair of units after a sexual reproduction event.
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).
Chakraborty & Jin, 1993, Determination of relatedness between individuals using DNA-fingerprinting.
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
Rozenfeld et al., 2007, Spectrum of genetic diversity and networks of clonal populations.
data(posidonia) res <- genet_dist(posidonia, manh = TRUE, graph = TRUE, alpha1 = 0.05) #Combining functions: res1 <- genet_dist(posidonia, manh = TRUE)$distance_matrix res2 <- genet_dist_sim_core(posidonia, nbrepeat = 100, manh = TRUE, genet = TRUE)$distance_matrix p1 <- hist(res1, freq = FALSE, col = rgb(0,0.4,1,1), breaks = seq(0, max(res1), 2)) p2 <- hist(res2, freq = FALSE, col = rgb(0.7,0.9,1,0.5), breaks = seq(0, max(res2), 2)) limx <- max(max(res1), max(res2)) plot(p1, col = rgb(0,0.4,1,1), freq = FALSE, xlim = c(0,limx)) plot(p2, col = rgb(0.7,0.9,1,0.5), freq = FALSE, add = TRUE) #Other way: p1 <- as.data.frame(table(res1)) p2 <- as.data.frame(table(res2)) barplot(p1$Freq/sum(p1$Freq), col=rgb(0,0.4,1,1), axis.lty = 1, names.arg = as.numeric(as.character(p1[,1]))) barplot(p2$Freq/sum(p2$Freq), col=rgb(0.7,0.9,1,0.5), add = TRUE) title("Genetic distances between pairs of MLG") #Adding a legend: leg.txt <- c("original data","simulated data") col <- c(rgb(0,0.4,1,1), rgb(0.7,0.9,1,0.5)) legend("topright", fill = col, leg.txt, plot = TRUE, bty = "o", box.lwd = 1.5, bg = "white")data(posidonia) res <- genet_dist(posidonia, manh = TRUE, graph = TRUE, alpha1 = 0.05) #Combining functions: res1 <- genet_dist(posidonia, manh = TRUE)$distance_matrix res2 <- genet_dist_sim_core(posidonia, nbrepeat = 100, manh = TRUE, genet = TRUE)$distance_matrix p1 <- hist(res1, freq = FALSE, col = rgb(0,0.4,1,1), breaks = seq(0, max(res1), 2)) p2 <- hist(res2, freq = FALSE, col = rgb(0.7,0.9,1,0.5), breaks = seq(0, max(res2), 2)) limx <- max(max(res1), max(res2)) plot(p1, col = rgb(0,0.4,1,1), freq = FALSE, xlim = c(0,limx)) plot(p2, col = rgb(0.7,0.9,1,0.5), freq = FALSE, add = TRUE) #Other way: p1 <- as.data.frame(table(res1)) p2 <- as.data.frame(table(res2)) barplot(p1$Freq/sum(p1$Freq), col=rgb(0,0.4,1,1), axis.lty = 1, names.arg = as.numeric(as.character(p1[,1]))) barplot(p2$Freq/sum(p2$Freq), col=rgb(0.7,0.9,1,0.5), add = TRUE) title("Genetic distances between pairs of MLG") #Adding a legend: leg.txt <- c("original data","simulated data") col <- c(rgb(0,0.4,1,1), rgb(0.7,0.9,1,0.5)) legend("topright", fill = col, leg.txt, plot = TRUE, bty = "o", box.lwd = 1.5, bg = "white")
A GenClone file of 40 units of Posidonia oceanica (genotypes of seven loci and x/y coordinates) sampled in Mediterranean sea.
data("infile")data("infile")
A data frame with 41 observations on the following 12 variables (not relevant).
V1a numeric vector
V2a numeric vector
V3a numeric vector
V4a numeric vector
V5a numeric vector
V6a factor with levels 208208 208210 208216
210212 210216 210218 212216 216218 222226 Po15
V7a factor with levels 234234 234236 234242
Po5
V8a factor with levels 159159 159163 159165
163163 163165 165165 Po5-49
V9a factor with levels 168168 168170 168172
170170 170172 172172 Po5-40
V10a factor with levels 178178 178180 180180
Po5-10
V11a factor with levels Po4-3
V12a factor with levels Po5-39
This data is given as illustration of GenClone file formatted to work with
RClone (the R package version of GenClone).
Arnaud-Haond S, Alberto F, Eguiluz VM, Hernandez-Garcia E, Duarte CM, Serrao EA (2014) Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites.
Dryad Digital Repository: doi:10.5061/dryad.3b8k6
Arnaud-Haond S, Maolic Y, Hernandez-Garcia E, Eguiluz VM, Alberto F, Serrao EA, Duarte CM (2014) Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites. Journal of Heredity 105(4): 532-541. doi:10.1093/jhered/esu015
Arnaud-Haond S & Belkhir K, 2007, GENCLONE: a computer program to analyse genotypic data, test for clonality and describe spatial clonal organization.
data(infile) #This is nearly a GenClone file, type: #write.table(infile, "infile2.csv", col.names = FALSE, row.names = FALSE, sep = ";") #Now you have a formatted GenClone file.data(infile) #This is nearly a GenClone file, type: #write.table(infile, "infile2.csv", col.names = FALSE, row.names = FALSE, sep = ";") #Now you have a formatted GenClone file.
kinship_Loiselle and kinship_Ritland compute average genetic
distances or kinship coefficients.
kinship_Loiselle(data1, haploid = FALSE, vecpop = NULL) kinship_Ritland(data1, haploid = FALSE, vecpop = NULL)kinship_Loiselle(data1, haploid = FALSE, vecpop = NULL) kinship_Ritland(data1, haploid = FALSE, vecpop = NULL)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
a dist object (or a list of dist objects for multi-population
data1) with genetic distances between pairs of units.
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).
Loiselle et al., 1995, Spatial genetic structure of a tropical understory shrub, Psychotria officinalis (Rubiaceae).
Ritland, 1996, A marker-based method for inferences about quantitative inheritance in natural populations.
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) #kinship_Loiselle(posidonia) #kinship_Ritland(posidonia)data(posidonia) #kinship_Loiselle(posidonia) #kinship_Ritland(posidonia)
list_all_tab returns a table with loci in column and unique alleles in row.
list_all_tab(data1, haploid = FALSE, vecpop = NULL)list_all_tab(data1, haploid = FALSE, vecpop = NULL)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
a table (one population) or a list of tables (several populations) with the unique alleles per locus.
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).
data(posidonia) list_all_obj(posidonia, haploid = FALSE) list_all_tab(posidonia, haploid = FALSE) corresp_loci(posidonia, haploid = FALSE)data(posidonia) list_all_obj(posidonia, haploid = FALSE) list_all_tab(posidonia, haploid = FALSE) corresp_loci(posidonia, haploid = FALSE)
MLG_tab returns a table with one row per MLG and several columns
if there's several units per MLG.
MLG_tab(data1, vecpop = NULL)MLG_tab(data1, vecpop = NULL)
data1 |
a |
vecpop |
vector, option, |
a table (one population) or a list of tables (several populations)with one row per MLG and several columns if several units share the same MLG.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) res <- MLG_tab(posidonia) resdata(posidonia) res <- MLG_tab(posidonia) res
Defining MLL (MultiLocus Lineage): ascertaining that each distinct MLG (MultiLocus Genotype) belongs to a distinct genet (Halkett et al., 2005a).
MLL_generator(data1, haploid = FALSE, vecpop = NULL, manh = FALSE, manh_w = FALSE, alpha1 = NULL, alpha2 = NULL) MLL_generator2(potential_clones = NULL, res_mlg = NULL, vecpop = NULL)MLL_generator(data1, haploid = FALSE, vecpop = NULL, manh = FALSE, manh_w = FALSE, alpha1 = NULL, alpha2 = NULL) MLL_generator2(potential_clones = NULL, res_mlg = NULL, vecpop = NULL)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
manh |
option, if |
manh_w |
option, if |
alpha1 |
numeric, option, if |
alpha2 |
numeric, option, if |
potential_clones |
table, a result table from |
res_mlg |
list, a list of MLG, result from |
MLL_generator creates automatically MLL from a given genetic distance
(alpha2) or a percentage of the distribution of genetic distance
(alpha1).
If several populations (vecpop != NULL), MLL_generator is the only
function in the package RClone to accept different arguments for
an option. alpha1 and alpha2 thus are vectors of several
numeric values, one per populations.
If manh = TRUE or manh_w = TRUE, divergence of SSR motifs
(Rozenfeld et al., 2007) is used as genetic distance.
MLL_generator2 computes a list of MLL from previous results of genet_dist
and MLG_list.
MLL_generator and MLL_generator2 compute a list of MLL
to use with others RClone functions.
MLL_generator and MLL_generator2 return a list of MLL
(one population) or a list of lists (several populations).
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).
Chakraborty & Jin, 1993, Determination of relatedness between individuals using DNA-fingerprinting.
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
Rozenfeld et al., 2007, Spectrum of genetic diversity and networks of clonal populations.
data(popsim) #MLLlist <- MLL_generator(popsim, alpha2 = 4) #or #res <- genet_dist(popsim, alpha2 = 4) #MLLlist <- MLL_generator2(res$potential_clones, MLG_list(popsim)) #take few secondsdata(popsim) #MLLlist <- MLL_generator(popsim, alpha2 = 4) #or #res <- genet_dist(popsim, alpha2 = 4) #MLLlist <- MLL_generator2(res$potential_clones, MLG_list(popsim)) #take few seconds
Pareto_index computes parameters of the Pareto distribution.
Pareto_index(data1, vecpop = NULL, listMLL = NULL, full = FALSE, graph = FALSE, legends = 1, export = FALSE)Pareto_index(data1, vecpop = NULL, listMLL = NULL, full = FALSE, graph = FALSE, legends = 1, export = FALSE)
data1 |
a |
vecpop |
vector, option, |
listMLL |
option, a custom list of MLL. |
full |
option, if |
graph |
option, if |
export |
option, if |
legends |
option, numerical, with |
Pareto's Beta is given as -slope of the linear regression of the
inverse cumulated frequency of the number of lineages (Pareto 1897 in Vidondo 1997).
The distribution of clonal size in the population c_Pareto is computed
as slope+1 (Schroeder 1991).
A list of:
Pareto |
Pareto's Beta, |
c_Pareto |
distribution of clonal size in the population, |
coefficients and regression_results |
summary of the linear regression, |
coords_Pareto |
x and y coordinates of the inverse cumulated frequencies. |
For several populations, a list of lists per population.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) Pareto_index(posidonia, graph = TRUE, legends = 2) res <- Pareto_index(posidonia, full = TRUE)[[4]] xi <- res[,1] yi <- res[,2] exp(summary(lm(log10(yi)~log10(xi)))$coefficients[1]) ##true b of y=ax+bdata(posidonia) Pareto_index(posidonia, graph = TRUE, legends = 2) res <- Pareto_index(posidonia, full = TRUE)[[4]] xi <- res[,1] yi <- res[,2] exp(summary(lm(log10(yi)~log10(xi)))$coefficients[1]) ##true b of y=ax+b
pgen and pgen_Fis compute the probability of a genotype
under the Hardy-Weinberg equilibrium assumption (with or without taking account
of departures from H-W equilibrium).
pgen(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE) pgen_Fis(data1, vecpop = NULL, genet = FALSE, RR = FALSE)pgen(data1, haploid = FALSE, vecpop = NULL, genet = FALSE, RR = FALSE) pgen_Fis(data1, vecpop = NULL, genet = FALSE, RR = FALSE)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
genet |
option, if |
RR |
option, if |
a table (one population) or a list of tables (several populations) with pgen
computed for each genotype.
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).
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
data(posidonia) pgen(posidonia, RR = TRUE) pgen_Fis(posidonia, RR = TRUE)data(posidonia) pgen(posidonia, RR = TRUE) pgen_Fis(posidonia, RR = TRUE)
A theorical diploid population of 100 units, 100 loci and 10 alleles max per locus, with c = 0.9999 (c, clonality rate) after 10000 generations.
data("popsim")data("popsim")
A data frame with 100 observations on the following 200 variables.
loc_1_1first allele of locus
loc_1_2second allele of locus
loc_2_1first allele of locus
loc_2_2second allele of locus
loc_3_1first allele of locus
loc_3_2second allele of locus
loc_4_1first allele of locus
loc_4_2second allele of locus
loc_5_1first allele of locus
loc_5_2second allele of locus
loc_6_1first allele of locus
loc_6_2second allele of locus
loc_7_1first allele of locus
loc_7_2second allele of locus
loc_8_1first allele of locus
loc_8_2second allele of locus
loc_9_1first allele of locus
loc_9_2second allele of locus
loc_10_1first allele of locus
loc_10_2second allele of locus
loc_11_1first allele of locus
loc_11_2second allele of locus
loc_12_1first allele of locus
loc_12_2second allele of locus
loc_13_1first allele of locus
loc_13_2second allele of locus
loc_14_1first allele of locus
loc_14_2second allele of locus
loc_15_1first allele of locus
loc_15_2second allele of locus
loc_16_1first allele of locus
loc_16_2second allele of locus
loc_17_1first allele of locus
loc_17_2second allele of locus
loc_18_1first allele of locus
loc_18_2second allele of locus
loc_19_1first allele of locus
loc_19_2second allele of locus
loc_20_1first allele of locus
loc_20_2second allele of locus
loc_21_1first allele of locus
loc_21_2second allele of locus
loc_22_1first allele of locus
loc_22_2second allele of locus
loc_23_1first allele of locus
loc_23_2second allele of locus
loc_24_1first allele of locus
loc_24_2second allele of locus
loc_25_1first allele of locus
loc_25_2second allele of locus
loc_26_1first allele of locus
loc_26_2second allele of locus
loc_27_1first allele of locus
loc_27_2second allele of locus
loc_28_1first allele of locus
loc_28_2second allele of locus
loc_29_1first allele of locus
loc_29_2second allele of locus
loc_30_1first allele of locus
loc_30_2second allele of locus
loc_31_1first allele of locus
loc_31_2second allele of locus
loc_32_1first allele of locus
loc_32_2second allele of locus
loc_33_1first allele of locus
loc_33_2second allele of locus
loc_34_1first allele of locus
loc_34_2second allele of locus
loc_35_1first allele of locus
loc_35_2second allele of locus
loc_36_1first allele of locus
loc_36_2second allele of locus
loc_37_1first allele of locus
loc_37_2second allele of locus
loc_38_1first allele of locus
loc_38_2second allele of locus
loc_39_1first allele of locus
loc_39_2second allele of locus
loc_40_1first allele of locus
loc_40_2second allele of locus
loc_41_1first allele of locus
loc_41_2second allele of locus
loc_42_1first allele of locus
loc_42_2second allele of locus
loc_43_1first allele of locus
loc_43_2second allele of locus
loc_44_1first allele of locus
loc_44_2second allele of locus
loc_45_1first allele of locus
loc_45_2second allele of locus
loc_46_1first allele of locus
loc_46_2second allele of locus
loc_47_1first allele of locus
loc_47_2second allele of locus
loc_48_1first allele of locus
loc_48_2second allele of locus
loc_49_1first allele of locus
loc_49_2second allele of locus
loc_50_1first allele of locus
loc_50_2second allele of locus
loc_51_1first allele of locus
loc_51_2second allele of locus
loc_52_1first allele of locus
loc_52_2second allele of locus
loc_53_1first allele of locus
loc_53_2second allele of locus
loc_54_1first allele of locus
loc_54_2second allele of locus
loc_55_1first allele of locus
loc_55_2second allele of locus
loc_56_1first allele of locus
loc_56_2second allele of locus
loc_57_1first allele of locus
loc_57_2second allele of locus
loc_58_1first allele of locus
loc_58_2second allele of locus
loc_59_1first allele of locus
loc_59_2second allele of locus
loc_60_1first allele of locus
loc_60_2second allele of locus
loc_61_1first allele of locus
loc_61_2second allele of locus
loc_62_1first allele of locus
loc_62_2second allele of locus
loc_63_1first allele of locus
loc_63_2second allele of locus
loc_64_1first allele of locus
loc_64_2second allele of locus
loc_65_1first allele of locus
loc_65_2second allele of locus
loc_66_1first allele of locus
loc_66_2second allele of locus
loc_67_1first allele of locus
loc_67_2second allele of locus
loc_68_1first allele of locus
loc_68_2second allele of locus
loc_69_1first allele of locus
loc_69_2second allele of locus
loc_70_1first allele of locus
loc_70_2second allele of locus
loc_71_1first allele of locus
loc_71_2second allele of locus
loc_72_1first allele of locus
loc_72_2second allele of locus
loc_73_1first allele of locus
loc_73_2second allele of locus
loc_74_1first allele of locus
loc_74_2second allele of locus
loc_75_1first allele of locus
loc_75_2second allele of locus
loc_76_1first allele of locus
loc_76_2second allele of locus
loc_77_1first allele of locus
loc_77_2second allele of locus
loc_78_1first allele of locus
loc_78_2second allele of locus
loc_79_1first allele of locus
loc_79_2second allele of locus
loc_80_1first allele of locus
loc_80_2second allele of locus
loc_81_1first allele of locus
loc_81_2second allele of locus
loc_82_1first allele of locus
loc_82_2second allele of locus
loc_83_1first allele of locus
loc_83_2second allele of locus
loc_84_1first allele of locus
loc_84_2second allele of locus
loc_85_1first allele of locus
loc_85_2second allele of locus
loc_86_1first allele of locus
loc_86_2second allele of locus
loc_87_1first allele of locus
loc_87_2second allele of locus
loc_88_1first allele of locus
loc_88_2second allele of locus
loc_89_1first allele of locus
loc_89_2second allele of locus
loc_90_1first allele of locus
loc_90_2second allele of locus
loc_91_1first allele of locus
loc_91_2second allele of locus
loc_92_1first allele of locus
loc_92_2second allele of locus
loc_93_1first allele of locus
loc_93_2second allele of locus
loc_94_1first allele of locus
loc_94_2second allele of locus
loc_95_1first allele of locus
loc_95_2second allele of locus
loc_96_1first allele of locus
loc_96_2second allele of locus
loc_97_1first allele of locus
loc_97_2second allele of locus
loc_98_1first allele of locus
loc_98_2second allele of locus
loc_99_1first allele of locus
loc_99_2second allele of locus
loc_100_1first allele of locus
loc_100_2second allele of locus
Computed with python and provided by S. Stoeckel.
data(popsim)data(popsim)
A sub-sample table of a large dataset of Posidonia oceanica sampled in mediterranean sea.
data("posidonia")data("posidonia")
A data frame with 40 observations on the following 14 variables.
Po15_1first allele of locus Po15
Po15_2second allele of locus Po15
first allele of locus Po4-3
second allele of locus Po4-3
first allele of locus Po5-10
second allele of locus Po5-10
first allele of locus Po5-39
second allele of locus Po5-39
first allele of locus Po5-40
second allele of locus Po5-40
first allele of locus Po5-49
second allele of locus Po5-49
Po5_1first allele of locus Po5
Po5_2second allele of locus Po5
Arnaud-Haond S, Alberto F, Eguiluz VM, Hernandez-Garcia E, Duarte CM, Serrao EA (2014)
Data from: Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites.
Dryad Digital Repository. doi:10.5061/dryad.3b8k6
Arnaud-Haond S, Maolic Y, Hernandez-Garcia E, Eguiluz VM, Alberto F, Serrao EA, Duarte CM (2014) Disentangling the influence of mutation and migration in clonal seagrasses using the Genetic Distance Spectrum for microsatellites. Journal of Heredity 105(4): 532-541. doi:10.1093/jhered/esu015
Arnaud-Haond S & Belkhir K, 2007, GENCLONE: a computer program to analyse genotypic data, test for clonality and describe spatial clonal organization.
data(posidonia)data(posidonia)
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.
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)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)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
genet |
option, if |
RR |
option, if |
MLGsim |
option, the method of psex calculation (see details). |
nbrepeat |
option, numeric, the population is simulated |
bar |
option, if |
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).
For one population:
if nbrepeat is not provided, a table with psex values,
if nbrepeat is provided, a list of a table with psex values
and p-values and a vector of sim psex.
If data1 is a multi-population table (vecpop != NULL),
a list of either tables/tables and vectors for each population.
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.
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).
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.
Fis, freq_RR, pgen and pgen_Fis
data(posidonia) psex(posidonia, RR = TRUE) psex(posidonia, RR = TRUE, MLGsim = TRUE) #psex(posidonia, RR = TRUE, nbrepeat = 1000, bar = TRUE) ##time consumingdata(posidonia) psex(posidonia, RR = TRUE) psex(posidonia, RR = TRUE, MLGsim = TRUE) #psex(posidonia, RR = TRUE, nbrepeat = 1000, bar = TRUE) ##time consuming
This file contains data to fast generate the vignette: RClone_quickmanual.
data("resvigncont")data("resvigncont")
The format is: List of 14 $ resee :List of 2 ..$ results :'data.frame': 1 obs. of 3 variables: .. ..$ Ee : num 0.0779 .. ..$ pval_Ee : num 0.434 .. ..$ nbrepeat: num 1000 ..$ simulations: num [1:1000] 0.0316 -0.1692 -0.1411 -0.1172 -0.1289 ... $ resgen :'data.frame': 1 obs. of 24 variables: ..$ N :List of 1 .. ..$ : int 40 ..$ Lineage :List of 1 .. ..$ : chr "MLG" ..$ nb_L :List of 1 .. ..$ : int 28 ..$ nb_all :List of 1 .. ..$ : num 4.14 ..$ SE :List of 1 .. ..$ : num 0.769 ..$ Fis :List of 1 .. ..$ : num 0.0508 ..$ pval_2sides :List of 1 .. ..$ : logi NA ..$ Fis_WR :List of 1 .. ..$ : num 0.0257 ..$ pval_2sides :List of 1 .. ..$ : logi NA ..$ R :List of 1 .. ..$ : num 0.692 ..$ Pareto_index:List of 1 .. ..$ : num 1.18 ..$ Sp_Loiselle :List of 1 .. ..$ : num 0.00123 ..$ pval_2sides :List of 1 .. ..$ : num NA ..$ Sp_L_WR :List of 1 .. ..$ : num 0.00124 ..$ pval_2sides :List of 1 .. ..$ : num NA ..$ Sp_Ritland :List of 1 .. ..$ : num 0.000769 ..$ pval_2sides :List of 1 .. ..$ : num NA ..$ Sp_R_WR :List of 1 .. ..$ : num 0.000803 ..$ pval_2sides :List of 1 .. ..$ : num NA ..$ H” :List of 1 .. ..$ : num 3.15 ..$ J' :List of 1 .. ..$ : num 0.945 ..$ D :List of 1 .. ..$ : num 0.971 ..$ V :List of 1 .. ..$ : num 0.792 ..$ Hill :List of 1 .. ..$ : num 33.9 $ resagg :List of 2 ..$ results : num [1, 1:3] 0.227 0 1000 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:3] "Ac" "pval" "nbrepeat" ..$ simulation: num [1:1000] 0.034 0.034 0.034 0.034 0.034 ... $ rescs :List of 2 ..$ : num 11.7 ..$ clonal_sub_tab:List of 60 .. ..$ : int 97 .. ..$ : int 157 .. ..$ : int 119 .. ..$ : int 110 .. ..$ : int 121 .. ..$ : int 64 .. ..$ : int 34 .. ..$ : int 29 .. ..$ : int 31 .. ..$ : int 18 .. ..$ : num 0.5 .. ..$ : num 7.62 .. ..$ : num 15.2 .. ..$ : num 22.9 .. ..$ : num 30.5 .. ..$ : num 38 .. ..$ : num 46.1 .. ..$ : num 53.5 .. ..$ : num 61 .. ..$ : num 68.5 .. ..$ : num 7.52 .. ..$ : num 15.2 .. ..$ : num 22.8 .. ..$ : num 30.4 .. ..$ : num 38 .. ..$ : num 45.6 .. ..$ : num 53.1 .. ..$ : num 60.7 .. ..$ : num 68 .. ..$ : num 76 .. ..$ : num 4.68 .. ..$ : num 11.1 .. ..$ : num 18.8 .. ..$ : num 26.6 .. ..$ : num 34.2 .. ..$ : num 41.5 .. ..$ : num 49.6 .. ..$ : num 57.1 .. ..$ : num 64.7 .. ..$ : num 70.9 .. ..$ : num 0.165 .. ..$ : num 0.0446 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num 0 .. ..$ : num -0.783 .. ..$ : num -1.35 .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..$ : num -Inf .. ..- attr(*, "dim")= int [1:2] 10 6 .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : chr [1:10] "1" "2" "3" "4" ... .. .. ..$ : chr [1:6] "nb_pairs" "dist_min" "dist_max" "dist_mean" ... $ resauto :List of 7 ..$ Main_results :'data.frame': 10 obs. of 7 variables: .. ..$ dist_min : num [1:10] 0.5 7.62 15.24 22.94 30.5 ... .. ..$ dist_max : num [1:10] 7.52 15.21 22.8 30.41 38 ... .. ..$ dist_mean : num [1:10] 4.68 11.15 18.81 26.65 34.21 ... .. ..$ ln(dist_mean): num [1:10] 1.54 2.41 2.93 3.28 3.53 ... .. ..$ nb_pairs : num [1:10] 97 157 119 110 121 64 34 29 31 18 .. ..$ mean_Ritland : num [1:10] 0.0892 0.0296 -0.0224 -0.0532 -0.0736 ... .. ..$ pval_kin : num [1:10] 0 0 0.39 0 0 0 0.144 0.154 0.8 0.106 ..$ Slope_and_Sp_index :'data.frame': 10 obs. of 4 variables: .. ..$ b : num [1:10] -7.01e-04 1.96e-06 2.75e-04 -6.25e-04 4.65e-04 ... .. ..$ b_log : num [1:10] -3.58e-02 3.47e-05 6.30e-03 -1.42e-02 1.01e-02 ... .. ..$ Sp : num [1:10] 7.69e-04 -7.63e-07 2.73e-04 -4.58e-04 6.18e-04 ... .. ..$ Sp_log: num [1:10] 3.93e-02 9.75e-06 6.24e-03 -9.86e-03 1.41e-02 ... ..$ Slope_resample :'data.frame': 1000 obs. of 4 variables: .. ..$ b : num [1:1000] 8.95e-05 9.99e-05 1.64e-04 1.23e-04 1.53e-04 ... .. ..$ b_log : num [1:1000] 0.004679 0.000447 0.000649 0.004408 0.003708 ... .. ..$ Sp : num [1:1000] -8.65e-05 -9.98e-05 -1.65e-04 -1.19e-04 -1.50e-04 ... .. ..$ Sp_log: num [1:1000] -0.004524 -0.000446 -0.000653 -0.004292 -0.003647 ... ..$ Kinship_resample : num [1:1000, 1:10] -0.03434 -0.00168 0.00721 -0.02697 -0.01677 ... .. ..- attr(*, "dimnames")=List of 2 .. .. ..$ : NULL .. .. ..$ : chr [1:10] "class_1" "class_2" "class_3" "class_4" ... ..$ Matrix_kinship_results:Class 'dist' atomic [1:780] -0.16518 -0.00174 -0.00174 -0.00174 -0.00174 ... .. .. ..- attr(*, "Labels")= chr [1:40] "1" "2" "3" "4" ... .. .. ..- attr(*, "Size")= int 40 .. .. ..- attr(*, "call")= language as.dist.default(m = mat_auto) .. .. ..- attr(*, "Diag")= logi FALSE .. .. ..- attr(*, "Upper")= logi FALSE ..$ Class_kinship_results :List of 10 .. ..$ : num [1:97] -0.16518 -0.00174 -0.00174 -0.00174 -0.03193 ... .. ..$ : num [1:157] -0.00174 -0.00174 -0.02292 -0.08243 -0.15206 ... .. ..$ : num [1:119] -0.0455 -0.0921 -0.0455 -0.0455 0.036 ... .. ..$ : num [1:110] -0.0455 -0.1553 -0.1433 -0.047 -0.1513 ... .. ..$ : num [1:121] -0.143 -0.143 -0.114 0.301 -0.181 ... .. ..$ : num [1:64] -0.0918 -0.1236 -0.1236 -0.1024 -0.1236 ... .. ..$ : num [1:34] -0.08461 0.10111 0.1034 -0.00678 0.05459 ... .. ..$ : num [1:29] -0.00693 -0.00693 -0.00693 -0.00693 -0.00693 ... .. ..$ : num [1:31] 0.3935 -0.0646 -0.1289 -0.0656 -0.0825 ... .. ..$ : num [1:18] 0.00503 0.26968 0.00414 -0.02171 -0.04514 ... ..$ Class_distance_results:List of 10 .. ..$ : num [1:97] 2 5.7 7.11 5.15 4.74 ... .. ..$ : num [1:157] 8.06 8.28 9.96 8.08 13.73 ... .. ..$ : num [1:119] 15.4 15.9 17.4 18.7 19.6 ... .. ..$ : num [1:110] 24.5 26.1 26.9 24.1 24.9 ... .. ..$ : num [1:121] 31.3 31.5 34.5 31.8 32.5 ... .. ..$ : num [1:64] 38.5 38.1 38.5 39.5 39.5 ... .. ..$ : num [1:34] 47.4 47.6 52 50 48.9 ... .. ..$ : num [1:29] 60.6 60.7 59.8 58.7 56.5 ... .. ..$ : num [1:31] 63.4 66 61.4 64.1 68 ... .. ..$ : num [1:18] 70 70.8 70.5 73.1 76 ... $ rescl :'data.frame': 1 obs. of 7 variables: ..$ G : num 28 ..$ R : num 0.692 ..$ H” : num 3.15 ..$ J' : num 0.945 ..$ D : num 0.971 ..$ V : num 0.792 ..$ Hill: num 33.9 $ ressimWS:List of 1 ..$ distance_matrix:Class 'dist' atomic [1:499500] 59 126 71 59 63 120 119 164 105 80 ... .. .. ..- attr(*, "Labels")= chr [1:1000] "1" "2" "3" "4" ... .. .. ..- attr(*, "Size")= int 1000 .. .. ..- attr(*, "call")= language as.dist.default(m = dist_all) .. .. ..- attr(*, "Diag")= logi FALSE .. .. ..- attr(*, "Upper")= logi FALSE $ ressim :List of 1 ..$ distance_matrix:Class 'dist' atomic [1:499500] 143 98 138 93 106 98 106 113 109 102 ... .. .. ..- attr(*, "Labels")= chr [1:1000] "1" "2" "3" "4" ... .. .. ..- attr(*, "Size")= int 1000 .. .. ..- attr(*, "call")= language as.dist.default(m = dist_all) .. .. ..- attr(*, "Diag")= logi FALSE .. .. ..- attr(*, "Upper")= logi FALSE $ respop :List of 1 ..$ distance_matrix:Class 'dist' atomic [1:153] 173 178 2 173 178 1 1 84 133 100 ... .. .. ..- attr(*, "Labels")= chr [1:18] "1" "2" "3" "4" ... .. .. ..- attr(*, "Size")= int 18 .. .. ..- attr(*, "call")= language as.dist.default(m = dist_all) .. .. ..- attr(*, "Diag")= logi FALSE .. .. ..- attr(*, "Upper")= logi FALSE $ res_PS4 :'data.frame': 6 obs. of 4 variables: ..$ pgenFis: num [1:6] 1.05e-05 1.09e-10 4.39e-05 4.39e-05 4.39e-05 ... ..$ genet : chr [1:6] "" "" "" "3" ... ..$ psexFis: chr [1:6] "" "" "" "0.00175402908240928" ... ..$ pvalue : chr [1:6] "" "" "" "0.258064516129032" ... $ res_PS3 :List of 2 ..$ :'data.frame': 40 obs. of 3 variables: .. ..$ genet : chr [1:40] "" "" "" "3" ... .. ..$ psexFis: chr [1:40] "" "" "" "0.00175402908240928" ... .. ..$ pvalue : chr [1:40] "" "" "" "0.258064516129032" ... ..$ : num [1:31] 0.004048 0.00316 0.009211 0.000587 0.007884 ... $ res_PS2 :'data.frame': 6 obs. of 4 variables: ..$ pgen : num [1:6] 2.19e-06 2.04e-10 4.77e-05 4.77e-05 4.77e-05 ... ..$ genet : chr [1:6] "" "" "" "3" ... ..$ psex : chr [1:6] "" "" "" "0.00190284159898287" ... ..$ pvalue: chr [1:6] "" "" "" "0.392857142857143" ... $ res_PS1 :List of 2 ..$ :'data.frame': 40 obs. of 3 variables: .. ..$ genet : chr [1:40] "" "" "" "3" ... .. ..$ psex : chr [1:40] "" "" "" "0.00190284159898287" ... .. ..$ pvalue: chr [1:40] "" "" "" "0.392857142857143" ... ..$ : num [1:28] 0.00268 0.00135 0.0034 0.00154 0.0043 ... $ res_SU1 :List of 5 ..$ res_MLG :'data.frame': 7 obs. of 5 variables: .. ..$ nb_loci : int [1:7] 1 2 3 4 5 6 7 .. ..$ min : int [1:7] 3 7 11 19 22 25 28 .. ..$ max : int [1:7] 13 21 26 27 28 28 28 .. ..$ mean_MLG: num [1:7] 6.26 14.27 20.14 23.57 25.44 ... .. ..$ SE : num [1:7] 0.1047 0.1362 0.0966 0.0618 0.046 ... ..$ res_alleles:'data.frame': 7 obs. of 7 variables: .. ..$ nb_loci : int [1:7] 1 2 3 4 5 6 7 .. ..$ min : int [1:7] 2 5 8 11 15 22 29 .. ..$ max : int [1:7] 7 14 18 21 24 27 29 .. ..$ mean_all: num [1:7] 4.09 8.33 12.42 16.53 20.7 ... .. ..$ SE : num [1:7] NA 132.3 88.3 70.2 60.7 ... .. ..$ He : num [1:7] 0.549 0.549 0.55 0.55 0.55 ... .. ..$ SE : num [1:7] NA 1.217 0.803 0.646 0.552 ... ..$ raw_He :'data.frame': 1000 obs. of 7 variables: .. ..$ 1_locus: num [1:1000] 0.531 0.38 0.488 0.488 0.657 ... .. ..$ 2_loci : num [1:1000] 0.621 0.771 0.459 0.519 0.509 ... .. ..$ 3_loci : num [1:1000] 0.483 0.691 0.677 0.558 0.658 ... .. ..$ 4_loci : num [1:1000] 0.517 0.616 0.613 0.559 0.616 ... .. ..$ 5_loci : num [1:1000] 0.538 0.523 0.588 0.517 0.538 ... .. ..$ 6_loci : num [1:1000] 0.534 0.534 0.512 0.6 0.534 ... .. ..$ 7_loci : num [1:1000] 0.551 0.551 0.551 0.551 0.551 ... ..$ raw_MLG :'data.frame': 1000 obs. of 7 variables: .. ..$ 1_locus: int [1:1000] 4 3 6 6 6 6 9 6 6 3 ... .. ..$ 2_loci : int [1:1000] 19 20 12 12 13 12 21 14 17 19 ... .. ..$ 3_loci : int [1:1000] 18 21 23 24 24 19 18 20 18 20 ... .. ..$ 4_loci : int [1:1000] 24 25 21 26 25 23 26 20 21 26 ... .. ..$ 5_loci : int [1:1000] 26 27 24 26 26 25 24 27 26 25 ... .. ..$ 6_loci : int [1:1000] 25 25 26 27 25 27 28 28 28 26 ... .. ..$ 7_loci : int [1:1000] 28 28 28 28 28 28 28 28 28 28 ... ..$ raw_all :'data.frame': 1000 obs. of 7 variables: .. ..$ 1_locus: int [1:1000] 4 2 3 3 3 3 7 3 3 2 ... .. ..$ 2_loci : int [1:1000] 10 14 6 5 7 5 10 6 9 10 ... .. ..$ 3_loci : int [1:1000] 10 18 17 13 14 8 8 9 9 14 ... .. ..$ 4_loci : int [1:1000] 17 17 20 17 17 12 17 16 19 17 ... .. ..$ 5_loci : int [1:1000] 20 19 23 19 20 24 23 24 19 18 ... .. ..$ 6_loci : int [1:1000] 26 26 22 26 26 26 26 27 27 22 ... .. ..$ 7_loci : int [1:1000] 29 29 29 29 29 29 29 29 29 29 ...
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).
#v1 <- vignette("RClone_quickmanual") #print(v1)#v1 <- vignette("RClone_quickmanual") #print(v1)
Monte Carlo procedure to ensure that the sets of loci (sample_units) or
units (sample_loci) provide enough power to discriminate MLG
(MultiLocus Genotypes).
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)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)
data1 |
a |
haploid |
logical, option, |
vecpop |
vector, option, |
nbrepeat |
numeric, the number of sampling. |
He |
option, if |
graph |
option, if |
export |
option, if |
bar |
option, if |
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 |
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.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
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"))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"))
sort_all sorts alleles of diploid data by increasing order.
sort_all(data1)sort_all(data1)
data1 |
a |
To use properly RClone functions on diploid data, you MUST
be sure that your alleles are sorted by increasing order.
Run this function before any analysis.
a table of exact format of data1, but with alleles sorted.
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
convert_GC for tables with one locus per column.
data(posidonia) posidonia == sort_all(posidonia)data(posidonia) posidonia == sort_all(posidonia)
transcript_GC allows conversion from GenClone files to RClone
files.
transcript_GC(obj, ele, num1, num2, num3)transcript_GC(obj, ele, num1, num2, num3)
obj |
a |
ele |
option, separator element for import. |
num1 |
numeric, the number of loci. |
num2 |
numeric, the ploidy level. 2 for diploids and 1 for haploids. |
num3 |
numeric, the length of each allele. |
GenClone files are generally .txt files named infile.txt.
You must save it as .csv file with ";" as separators and, if
necessary, change "," by ".".
transcript_GC returns a list of:
data_genet |
a table of genotypes, one allele per column and one unit per row, |
data_coord |
a table of x/y coordinates, |
names_loci |
a vector of names of the loci, |
names_units |
a vector of names of the units. |
transcript_GC works only with infile files full of informations
(loci names, ploidy names, etc.).
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).
Arnaud-Haond et al., 2007, Standardizing methods to address clonality in population studies.
sort_all for sorting users tables with one allele per column.
data(infile) #This is nearly a GenClone file, type: #write.table(infile, "infile.csv", col.names = FALSE, row.names = FALSE, sep = ";") #Now you have a formatted GenClone file: #res <- transcript_GC("infile.csv", ";", 2, 7, 3) #data1 <- res$data_genet #coord <- res$data_coorddata(infile) #This is nearly a GenClone file, type: #write.table(infile, "infile.csv", col.names = FALSE, row.names = FALSE, sep = ";") #Now you have a formatted GenClone file: #res <- transcript_GC("infile.csv", ";", 2, 7, 3) #data1 <- res$data_genet #coord <- res$data_coord
A sub-sample table of a large dataset of Zostera marina sampled in Brittany, France.
data("zostera")data("zostera")
A data frame with 59 observations on the following 12 variables.
populationa character vector indicating the population
xa character vector indicating the population
ya character vector indicating the population
GA12first locus
GA16second locus
GA17Dthird locus
GA17Hfourth locus
GA19fifth locus
GA2sixth locus
GA20seventh locus
GA23eighth locus
GA35ninth allele of locus
Becheler R, Benkara E, Moalic Y, Hily C, Arnaud-Haond S (2013)
Data from: Scaling of processes shaping the clonal dynamics and genetic mosaic of seagrasses through temporal genetic monitoring.
Dryad Digital Repository. doi:10.5061/dryad.1vp70
Becheler R, Benkara E, Moalic Y, Hily C, Arnaud-Haond S (2013) Scaling of processes shaping the clonal dynamics and genetic mosaic of seagrasses through temporal genetic monitoring. Heredity 112(2): 114-121.
data(zostera) popvec <- zostera[,1] coord_zostera <- zostera[,2:3] zostera <- convert_GC(zostera[,4:ncol(zostera)], 3)data(zostera) popvec <- zostera[,1] coord_zostera <- zostera[,2:3] zostera <- convert_GC(zostera[,4:ncol(zostera)], 3)