tree_df_to_trees: tree_df_to_trees(n, tree_df) This function processes a data...

View source: R/input_output.R

tree_df_to_treesR Documentation

tree_df_to_trees(n, tree_df) This function processes a data frame of mutation trees and output a list of processed mutation trees

Description

tree_df_to_trees(n, tree_df) This function processes a data frame of mutation trees and output a list of processed mutation trees

Usage

tree_df_to_trees(n, tree_df)

Arguments

n

Number of mutational events

tree_df

A data frame with the following columns:

  • Tree_ID: IDs of mutation trees, unique for each patient

  • Node_ID: IDs of each node in the tree, including the root node (with ID "1"), unique for each node

  • Mutation_ID: IDs of each mutational event, the root node has a mutation ID of "0", other mutation IDs can be duplicated in the tree to allow for parallel mutations

  • Parent_ID: IDs of the parent node ID. The root node has itself as parent (ID "1").

Value

A named list of a tree data frame and the corresponding trees


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