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

Branch

Public attribute: List containing objects of class combiStructureGenerator

branchLength

Public 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
Tree

String. Tree in Newick format. When called recursivelly it is given the corresponding subtree.

dt

Length of SSE time steps.

parent_index

Default 1. When called recursivelly it is given the corresponding parent branch index.

testing

Default 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
infoStr

A 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'

rootData

combiStructureGenerator object. When given, the simulation uses its parameter values.

tree

tree

params

Default NULL. When given: data frame containing model parameters. Note that rootData is given, its parameter values are used.

dt

length of the dt time steps for the SSE evolutionary process

testing

Default 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
deep

Whether to make a deep clone.


[Package MethEvolSIM version 0.1.1 Index]