getSegSiteGeno {SIMplyBee} | R Documentation |
Access genotypes for all segregating sites of individuals in a caste
Description
Level 0 function that returns genotypes for all segregating sites of individuals in a caste.
Usage
getSegSiteGeno(
x,
caste = NULL,
nInd = NULL,
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getQueenSegSiteGeno(x, chr = NULL, collapse = FALSE, simParamBee = NULL)
getFathersSegSiteGeno(
x,
nInd = NULL,
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
getVirginQueensSegSiteGeno(
x,
nInd = NULL,
chr = NULL,
collapse = FALSE,
simParamBee = NULL
)
getWorkersSegSiteGeno(
x,
nInd = NULL,
chr = NULL,
collapse = FALSE,
simParamBee = NULL
)
getDronesSegSiteGeno(
x,
nInd = NULL,
chr = NULL,
dronesHaploid = TRUE,
collapse = FALSE,
simParamBee = NULL
)
Arguments
x |
|
caste |
NULL or character, NULL when |
nInd |
numeric, number of individuals to access, if |
chr |
numeric, chromosomes to retrieve, if |
dronesHaploid |
logical, return haploid result for drones? |
collapse |
logical, if the return value should be a single matrix with genotypes of all the individuals |
simParamBee |
|
Value
matrix with genotypes when x
is Colony-class
and
list of matrices with genotypes when x
is
MultiColony-class
, named by colony id when x
is
MultiColony-class
Functions
-
getQueenSegSiteGeno()
: Access genotype data for all segregating sites of the queen -
getFathersSegSiteGeno()
: Access genotype data for all segregating sites of fathers -
getVirginQueensSegSiteGeno()
: Access genotype data for all segregating sites of virgin queens -
getWorkersSegSiteGeno()
: Access genotype data for all segregating sites of workers -
getDronesSegSiteGeno()
: Access genotype data for all segregating sites of drones
See Also
getSegSiteGeno
and pullSegSiteGeno
Examples
founderGenomes <- quickHaplo(nInd = 4, nChr = 1, segSites = 50)
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 = 5)
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)
# Input is a population
getSegSiteGeno(x = getQueen(colony))
queens <- getQueen(apiary, collapse = TRUE)
getSegSiteGeno(queens)
# Input is a colony
getSegSiteGeno(colony, caste = "queen")
getQueenSegSiteGeno(colony)
getSegSiteGeno(colony, caste = "workers", nInd = 3)
getWorkersSegSiteGeno(colony)
# same aliases exist for all the castes!
# Get genotypes for all individuals
getSegSiteGeno(colony, caste = "all")
# Get all genotypes in a single matrix
getSegSiteGeno(colony, caste = "all", collapse = TRUE)
# Input is a MultiColony - same behaviour as for the Colony
getSegSiteGeno(apiary, caste = "queen")
getQueenSegSiteGeno(apiary)
# Get the genotypes of all individuals either by colony or in a single matrix
getSegSiteGeno(apiary, caste = "all")
getSegSiteGeno(apiary, caste = "all", collapse = TRUE)