Last chance! 50% off unlimited learning
Sale ends in
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.genclone
class extends class
"genind "
, directly.
The snpclone
class
extends class "genlight "
, directly.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.as.genclone
as.snpclone
genind
genlight
strata
setPop
MLG
mll
mlg.filter
# 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))
(sc <- as.snpclone(gl))
#
# Use mlg.filter to create a distance threshold to define multilocus genotypes.
mlg.filter(sc) <- 0.25
sc # 82 mlgs
Run the code above in your browser using DataLab