simulate_initialData {MethEvolSIM} | R Documentation |
Simulate Initial Data
Description
This function simulates initial data based on the provided information and parameters.
Usage
simulate_initialData(infoStr, params = NULL)
Arguments
infoStr |
A data frame containing columns 'n' for the number of sites, and 'globalState' for the favoured global methylation state. If customized equilibrium frequencies are given, it also contains columns 'u_eqFreq', 'p_eqFreq' and 'm_eqFreq' with the equilibrium frequency values for unmethylated, partially methylated and methylated. |
params |
Optional data frame with specific parameter values. Structure as in get_parameterValues() output. If not provided, default values will be used. |
Details
The function performs several checks on the input data and parameters to ensure they meet the required criteria and simulates DNA methylation data.
Value
A list containing the simulated data ($data) and parameters ($params).
Examples
# Example data
infoStr <- data.frame(n = c(10, 100, 10), globalState = c("M", "U", "M"))
# Simulate initial data with default parameters
simulate_initialData(infoStr = infoStr)
# Simulate data evolution along a tree with custom parameters
custom_params <- get_parameterValues()
custom_params$iota <- 0.5
simulate_initialData(infoStr = infoStr, params = custom_params)