combiStructureGenerator {MethEvolSIM}R Documentation

combiStructureGenerator

Description

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.

Methods

Public methods


Method new()

Create a new combiStructureGenerator object.

Note that this object can be generated within a treeMultiRegionSimulator object.

Usage
combiStructureGenerator$new(infoStr, params = NULL, 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'

params

Default NULL. When given: data frame containing model parameters.

testing

Default FALSE. TRUE for testing output.

Returns

A new combiStructureGenerator object.


Method get_singleStr()

Public method: Get one singleStructureGenerator object in $singleStr

Usage
combiStructureGenerator$get_singleStr(i)
Arguments
i

index of the singleStructureGenerator object in $singleStr

Returns

the singleStructureGenerator object in $singleStr with index i


Method get_singleStr_number()

Public method: Get number of singleStructureGenerator objects in $singleStr

Usage
combiStructureGenerator$get_singleStr_number()
Returns

number of singleStructureGenerator object contained in $singleStr


Method get_island_number()

Public method: Get number of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)

Usage
combiStructureGenerator$get_island_number()
Returns

number of singleStructureGenerator in $singleStr objects with $globalState "U" (CpG islands)


Method get_island_index()

Public method: Get index of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)

Usage
combiStructureGenerator$get_island_index()
Returns

index of singleStructureGenerator objects in $singleStr with $globalState "U" (CpG islands)


Method set_IWE_events()

Public method: Set information of the IWE events sampled in a tree branch

Usage
combiStructureGenerator$set_IWE_events(a)
Arguments
a

value to which IWE_events should be set

Returns

NULL


Method get_IWE_events()

Public method: Get information of the IWE events sampled in a tree branch

Usage
combiStructureGenerator$get_IWE_events()
Returns

information of the IWE events sampled in a tree branch


Method set_name()

Public method: Set the name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ends in a tree leaf.

Usage
combiStructureGenerator$set_name(a)
Arguments
a

value to which name should be set

Returns

NULL


Method get_name()

Public method: Get the name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ended in a tree leaf.

Usage
combiStructureGenerator$get_name()
Returns

Name of the leaf if evolutionary process (simulated from class treeMultiRegionSimulator) ended in a tree leaf. For iner tree nodes return NULL


Method get_own_index()

Public method: Set own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$get_own_index()
Returns

NULL


Method set_own_index()

Public method: Get own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$set_own_index(i)
Arguments
i

index of focal object

Returns

Own branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).


Method get_parent_index()

Public method: Get parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$get_parent_index()
Returns

Parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).


Method set_parent_index()

Public method: Set parent branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$set_parent_index(i)
Arguments
i

set parent_index to this value

Returns

NULL


Method get_offspring_index()

Public method: Get offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$get_offspring_index()
Returns

Offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).


Method set_offspring_index()

Public method: Set offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$set_offspring_index(i)
Arguments
i

set offspring_index to this value

Returns

NULL


Method add_offspring_index()

Public method: Add offspring branch index in the tree along which the evolutionary process is simulated (from class treeMultiRegionSimulator).

Usage
combiStructureGenerator$add_offspring_index(i)
Arguments
i

index to be added

Returns

NULL


Method get_mu()

Public method.

Usage
combiStructureGenerator$get_mu()
Returns

Model parameter for the rate of the IWE evolutionary process (per island and branch length).


Method set_singleStr()

Public method: Clone each singleStructureGenerator object in $singleStr

Usage
combiStructureGenerator$set_singleStr(singStrList)
Arguments
singStrList

object to be cloned

Returns

NULL


Method copy()

Public method: Clone combiStructureGenerator object and all singleStructureGenerator objects in it

Usage
combiStructureGenerator$copy()
Returns

cloned combiStructureGenerator object


Method 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.

Usage
combiStructureGenerator$branch_evol(branch_length, dt, testing = FALSE)
Arguments
branch_length

Length of the branch.

dt

Length of SSE time steps.

testing

Default FALSE. TRUE for testing purposes.

Details

It handles both cases where IWE events are sampled or not sampled within the branch.

Returns

Default NULL. If testing = TRUE it returns information for testing purposes.


Method clone()

The objects of this class are cloneable with this method.

Usage
combiStructureGenerator$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


[Package MethEvolSIM version 0.1.4 Index]