create_tbl_tree_collection: Get clone alteration tibble across the collection of trees.

Description Usage Arguments Details Value Author(s) Examples

View source: R/data_handling_functions.R

Description

Read in the patient's gene-to-clone assignment across a collection of trees

Usage

1
2
create_tbl_tree_collection(input_files, no_noisy_ents = 0.9,
  max_num_clones = 7)

Arguments

input_files

A vector containing the paths to the files with the tables of altered genes/pathways and their clone affiliation from the collection of tree inferences.

no_noisy_ents

Minimum fraction for genes/pathways of how often they have to occur across the collection of trees in order to be in the tibble. This makes sure that noisy genes, which were not assigned to many trees are excluded. Default: 0.9.

max_num_clones

The upper bound for the number of clones that were found per tumor. Default: 7.

Details

Creates a tibble containing the information of which genes/pathways are altered in which clone in a patient across a collection of tree inferences. It expects a list containing the paths to the comma-separated tables where the first column is the name of the altered gene or pathway. The other columns are for the clones in the respective tumor. Such tables can be generated by repeatedly performing the phylogenetic tree inference with e.g. the package Cloe, or by sampling from the posterior. The tables are expected to be comma-separated and to have the columns 'altered_entity', 'clone1', 'clone2', ..., 'cloneN', depending on how many clones were detected in the respective tumor. Each row then contains in the first column the name of the mutated gene or affected pathway, e.g. "ENSG00000134086", and in the other columns it has either zeros or ones, indicating in which clone the respective gene/pathway is altered.

Value

A clean tibble with the information of which gene/pathway is altered in which clone in the patient, and with an entry for each tree inference where it occurred. Has the columns 'file_name', 'patient_id', 'altered_entity', 'clone1', 'clone2', ... up to the maximal number of clones (Default: until 'clone7'), and 'tree_id' as an indication in which tree the assignment was found. Note that the labelling of the clones does not matter and only needs to stay fixed within each patient and tree inference.

Author(s)

Ariane L. Moore

Examples

1
2
3
4
5
6
ext_data_dir <- system.file('extdata', package='GeneAccord')
this_patient <- "01"
input_files_01 <- paste(ext_data_dir, 
    "/clonal_genotypes/cloe_seed", seq(5, 100, by=5), 
    "/", this_patient, ".csv", sep="") 
create_tbl_tree_collection(input_files_01)

GeneAccord documentation built on Nov. 8, 2020, 8:04 p.m.