getCsdGeno {SIMplyBee} | R Documentation |
Get genotypes from the csd locus
Description
Level 0 function that returns genotypes from the csd locus. See
SimParamBee
for more information about the csd locus and how
we have implemented it.
Usage
getCsdGeno(
x,
caste = NULL,
nInd = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getQueenCsdGeno(x, collapse = FALSE, simParamBee = NULL)
getFathersCsdGeno(
x,
nInd = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getVirginQueensCsdGeno(x, nInd = NULL, collapse = FALSE, simParamBee = NULL)
getWorkersCsdGeno(x, nInd = NULL, collapse = FALSE, simParamBee = NULL)
getDronesCsdGeno(
x,
nInd = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
Arguments
x |
|
caste |
NULL or character, NULL when |
nInd |
numeric, for how many individuals; if |
dronesHaploid |
logical, return haploid result for drones? |
collapse |
logical, if the return value should be a single matrix with haplotypes of all the individuals |
simParamBee |
|
Details
The returned genotypes are spanning multiple bi-allelic SNP of
a non-recombining csd locus / haplotype. In most cases you will want to use
getCsdAlleles
.
Value
matrix with genotypes when x
is Pop-class
, list
of matrices with genotypes when x
is Colony-class
(list nodes named by caste) and list of a list of matrices with genotypes
when x
is MultiColony-class
, outer list is named by
colony id when x
is MultiColony-class
; NULL
when
x
is NULL
Functions
-
getQueenCsdGeno()
: Access csd genotypes of the queen -
getFathersCsdGeno()
: Access csd genotypes of the fathers -
getVirginQueensCsdGeno()
: Access csd genotypes of the virgin queens -
getWorkersCsdGeno()
: Access csd genotypes of the virgin queens -
getDronesCsdGeno()
: Access csd genotypes of the virgin queens
Examples
founderGenomes <- quickHaplo(nInd = 8, nChr = 1, segSites = 100)
SP <- SimParamBee$new(founderGenomes)
basePop <- createVirginQueens(founderGenomes)
drones <- createDrones(x = basePop[1], nInd = 1000)
droneGroups <- pullDroneGroupsFromDCA(drones, n = 10, nDrones = nFathersPoisson)
# Create a Colony and a MultiColony class
colony <- createColony(x = basePop[2])
colony <- cross(colony, drones = droneGroups[[1]])
colony <- buildUp(x = colony, nWorkers = 6, nDrones = 3)
colony <- addVirginQueens(x = colony, nInd = 4)
apiary <- createMultiColony(basePop[3:4], n = 2)
apiary <- cross(apiary, drones = droneGroups[c(2, 3)])
apiary <- buildUp(x = apiary, nWorkers = 6, nDrones = 3)
apiary <- addVirginQueens(x = apiary, nInd = 5)
# Use getCsdGeno on a Population
getCsdGeno(getQueen(colony))
getCsdGeno(getWorkers(colony))
# Using dronesHaploid = TRUE returns drones as haploids instead of double haploids
getCsdGeno(getDrones(colony), nInd = 3, dronesHaploid = TRUE)
# Using dronesHaploid = FALSE returns drones as double haploids
getCsdGeno(getDrones(colony), nInd = 3, dronesHaploid = FALSE)
# Use getCsdGeno on a Colony
getCsdGeno(colony)
getCsdGeno(colony, caste = "queen")
getQueenCsdGeno(colony)
getCsdGeno(colony, caste = "workers")
getWorkersCsdGeno(colony)
# Same aliases exist for all the castes!
# Use getCsdGeno on a MultiColony - same behaviour as for the Colony!
getCsdGeno(apiary)
getCsdGeno(apiary, nInd = 2)