tree_df_to_genotypes: tree_df_to_genotypes(n, tree_df) This function processes a...

View source: R/input_output.R

tree_df_to_genotypesR Documentation

tree_df_to_genotypes(n, tree_df) This function processes a data frame of mutation trees and output a list of subclonal genotypes. Note that the wild type (a vector of zeros) is also included.

Description

tree_df_to_genotypes(n, tree_df) This function processes a data frame of mutation trees and output a list of subclonal genotypes. Note that the wild type (a vector of zeros) is also included.

Usage

tree_df_to_genotypes(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 matrix of subclonal genotypes


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