genclone-class | R Documentation |
GENclone is an S4 class that extends the
genind
object.
SNPclone is an S4 class
that extends the genlight
object.
They will have
all of the same attributes as their parent classes, but they will contain
one extra slot to store extra information about multilocus genotypes.
The genclone and snpclone classes will allow for more optimized methods of clone correction.
Previously for genind and genlight objects,
multilocus genotypes were not retained after a data set was subset by
population. The new mlg
slot allows us to assign the
multilocus genotypes and retain that information no matter how we subset
the data set. This new slot can either contain numeric values for
multilocus genotypes OR it can contain a special internal
MLG
class that allows for custom multilocus genotype
definitions and filtering.
mlg
a vector representing multilocus genotypes for the data set OR an
object of class MLG
.
The genclone
class extends class
"genind"
, directly.
The snpclone
class
extends class "genlight"
, directly.
When calculating multilocus genotypes for genclone objects, a rank
function is used, but calculation of multilocus genotypes for snpclone
objects is distance-based (via bitwise.dist
and
mlg.filter
). This means that genclone objects are sensitive
to missing data, whereas snpclone objects are insensitive.
Zhian N. Kamvar
as.genclone
as.snpclone
genind
genlight
strata
setPop
MLG
mll
mlg.filter
## Not run:
# genclone objects can be created from genind objects
#
data(partial_clone)
partial_clone
(pc <- as.genclone(partial_clone))
# snpclone objects can be created from genlight objects
#
set.seed(999)
(gl <- glSim(100, 0, n.snp.struc = 1e3, ploidy = 2, parallel = FALSE))
(sc <- as.snpclone(rbind(gl, gl, parallel = FALSE), parallel = FALSE))
#
# Use mlg.filter to create a distance threshold to define multilocus genotypes.
mlg.filter(sc, threads = 1L) <- 0.25
sc # 82 mlgs
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.