an R6 class representing several genomic structures. Each genomic structure contained is an object of class singleStructureGenerator. Note that default clone(deep=TRUE) fails to clone singleStructureGenerator objects contained, use method $copy() instead.
new()Create a new combiStructureGenerator object.
Note that this object can be generated within a treeMultiRegionSimulator object.
combiStructureGenerator$new(infoStr, params = NULL, testing = FALSE)infoStrA data frame containing columns 'n' for the number of sites, and 'globalState' for the favoured global methylation state. If initial equilibrium frequencies are given the dataframe must contain 3 additional columns: 'u_eqFreq', 'p_eqFreq' and 'm_eqFreq'
paramsDefault NULL. When given: data frame containing model parameters.
testingDefault FALSE. TRUE for testing output.
A new combiStructureGenerator object.
get_singleStr()Public method: Get one singleStructureGenerator object in $singleStr
combiStructureGenerator$get_singleStr(i)iindex of the singleStructureGenerator object in $singleStr
the singleStructureGenerator object in $singleStr with index i
get_singleStr_number()Public method: Get number of singleStructureGenerator objects in $singleStr
combiStructureGenerator$get_singleStr_number()number of singleStructureGenerator object contained in $singleStr
get_island_number()Public method: Get number of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)
combiStructureGenerator$get_island_number()number of singleStructureGenerator in $singleStr objects with $globalState "U" (CpG islands)
get_island_index()Public method: Get index of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)
combiStructureGenerator$get_island_index()index of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)
set_IWE_events()Public method: Set information of the IWE events sampled in a tree branch
combiStructureGenerator$set_IWE_events(a)avalue to which IWE_events should be set
NULL
get_IWE_events()Public method: Get information of the IWE events sampled in a tree branch
combiStructureGenerator$get_IWE_events()information of the IWE events sampled in a tree branch
set_name()Public method: Set the name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ends in a tree leaf.
combiStructureGenerator$set_name(a)avalue to which name should be set
NULL
get_name()Public method: Get the name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ended in a tree leaf.
combiStructureGenerator$get_name()Name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ended in a tree leaf. For iner tree nodes return NULL
get_own_index()Public method: Set own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$get_own_index()NULL
set_own_index()Public method: Get own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$set_own_index(i)iindex of focal object
Own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
get_parent_index()Public method: Get parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$get_parent_index()Parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
set_parent_index()Public method: Set parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$set_parent_index(i)iset parent_index to this value
NULL
get_offspring_index()Public method: Get offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$get_offspring_index()Offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
set_offspring_index()Public method: Set offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$set_offspring_index(i)iset offspring_index to this value
NULL
add_offspring_index()Public method: Add offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).
combiStructureGenerator$add_offspring_index(i)iindex to be added
NULL
get_mu()Public method.
combiStructureGenerator$get_mu()Model parameter for the rate of the IWE evolutionary process (per island and branch length).
set_singleStr()Public method: Clone each singleStructureGenerator object in $singleStr
combiStructureGenerator$set_singleStr(singStrList)singStrListobject to be cloned
NULL
copy()Public method: Clone combiStructureGenerator object and all singleStructureGenerator objects in it
combiStructureGenerator$copy()cloned combiStructureGenerator object
branch_evol()Simulate CpG dinucleotide methylation state evolution along a tree branch. The function samples the IWE events on the tree branch and simulates the evolution through the SSE and IWE processes.
combiStructureGenerator$branch_evol(branch_length, dt, testing = FALSE)branch_lengthLength of the branch.
dtLength of SSE time steps.
testingDefault FALSE. TRUE for testing purposes.
It handles both cases where IWE events are sampled or not sampled within the branch.
Default NULL. If testing = TRUE it returns information for testing purposes.
clone()The objects of this class are cloneable with this method.
combiStructureGenerator$clone(deep = FALSE)deepWhether to make a deep clone.