Description Usage Arguments Details Value Author(s) References Examples
Defining MLL (MultiLocus Lineage): ascertaining that each distinct MLG (MultiLocus Genotype) belongs to a distinct genet (Halkett et al., 2005a).
1 2 3 4 5 | 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 <diane.bailleul.pro@gmail.com>
Author: Sophie Arnaud-Haond <sophie.arnaud@ifremer.fr>
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | 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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.