| treeMultiRegionSimulator {MethEvolSIM} | R Documentation |
treeMultiRegionSimulator
Description
an R6 class representing the methylation state of GpGs in different genomic structures in the nodes of a tree.
The whole CpG sequence is an object of class combiStructureGenerator. Each genomic structure in it is contained in an object of class singleStructureGenerator.
Public fields
BranchPublic attribute: List containing objects of class combiStructureGenerator
branchLengthPublic attribute: Vector with the corresponding branch lengths of each $Branch element
Methods
Public methods
Method treeEvol()
Simulate CpG dinucleotide methylation state evolution along a tree. The function splits a given tree and simulates evolution along its branches. It recursively simulates evolution in all of the subtrees in the given tree until the tree leafs
Usage
treeMultiRegionSimulator$treeEvol( Tree, dt = 0.01, parent_index = 1, testing = FALSE )
Arguments
TreeString. Tree in Newick format. When called recursivelly it is given the corresponding subtree.
dtLength of SSE time steps.
parent_indexDefault 1. When called recursivelly it is given the corresponding parent branch index.
testingDefault FALSE. TRUE for testing purposes.
Returns
NULL
Method new()
Create a new treeMultiRegionSimulator object. $Branch is a list for the tree branches, its first element represents the tree root.
Note that one of either infoStr or rootData needs to be given. Not both, not neither.
Usage
treeMultiRegionSimulator$new( infoStr = NULL, rootData = NULL, tree, params = NULL, dt = 0.01, testing = FALSE )
Arguments
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'
rootDatacombiStructureGenerator object. When given, the simulation uses its parameter values.
treetree
paramsDefault NULL. When given: data frame containing model parameters. Note that rootData is given, its parameter values are used.
dtlength of the dt time steps for the SSE evolutionary process
testingDefault FALSE. TRUE for testing output.
Returns
A new treeMultiRegionSimulator object.
Method clone()
The objects of this class are cloneable with this method.
Usage
treeMultiRegionSimulator$clone(deep = FALSE)
Arguments
deepWhether to make a deep clone.