generate_trees: Generate a set of trees based on a Mutual Hazard Network

View source: R/simulations.R

generate_treesR Documentation

Generate a set of trees based on a Mutual Hazard Network

Description

This function generate a set of trees based on an MHN, which is either provided by the user or generated randomly within the function.

Usage

generate_trees(
  n = 10,
  N = 100,
  lambda_s = 1,
  Theta = NULL,
  sparsity = 0.5,
  exclusive_ratio = 0.5,
  smallest_tree_size = 1,
  largest_tree_size = NULL,
  mutations = NULL,
  perturb = FALSE,
  epsilon = 0.05
)

Arguments

n

Number of mutational events (Default: 10).

N

Number of trees (Default: 100).

lambda_s

The rate of the sampling event (Default: 1).

Theta

A mutual hazard network (Default: NULL for the function to generate).

sparsity

Percentage of off diagonal elements with a value of zero in the MHN (Default: 0.5).

exclusive_ratio

Percentage of non-zero elements that are negative, meaning that one mutation is inhibiting another mutation (Default: 0.9).

smallest_tree_size

The smallest size of the tree (Default: 1). The tree only containing the root node has a size of zero.

largest_tree_size

The largest size of the tree. By default, the tree size is no bigger than the number of mutations n (or half if n > 10).

mutations

A list of mutation names, which must be unique values (Default: NULL).

perturb

A flag for the function to perturb the generated tree structures (Default: FALSE).

epsilon

Noise level for perturbing the trees (Default: 0.05).

Value

A treeMHN object with the true MHN for generating the trees

Author(s)

Xiang Ge Luo


cbg-ethz/TreeMHN documentation built on Jan. 29, 2024, 1:29 p.m.