take_pairs_and_get_patients: Get the patients in which pairs are mutated

Description Usage Arguments Details Value Author(s) Examples

View source: R/data_handling_functions.R

Description

Take the final pairs and return the patients id's, in which they are mutated, and the patients id's in which they are clonally exclusive.

Usage

1
take_pairs_and_get_patients(clone_tbl_all_trees, pairs_of_interest_tbl)

Arguments

clone_tbl_all_trees

The tibble containing the information of which gene/pathway is mutated in which clone from which patient across a collection of trees. Can be generated with create_tbl_tree_collection, repeatedly for each patient, and then combining them.

pairs_of_interest_tbl

A tibble containing pairs of mutated genes/pathways. More precisely, it contains the columns 'entity_A' and 'entity_B'.

Details

This function takes the final pairs of interest, and returns a tibble with the information for each gene pair, in which patient the pair was mutated, and in which of these patients the pair was clonally exclusive in the majority of the trees in the tree inference collection.

Value

A tibble similar to the input pairs_of_interest_tbl but with two additional columns, namely 'mutated_in', and 'clonally_exclusive_in'. The column 'mutated_in' contains the patient id's that the pair is mutated in separated by a semicolon. The column 'clonally_exclusive_in' contains the semicolon separated patient id's of the ones in which the pairs was also clonally exclusive in the majority of the trees in the collection of tree inferences.

Author(s)

Ariane L. Moore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
clone_tbl <- dplyr::tibble(file_name=rep(c(rep(c("fn1", "fn2"), 
    each=3)), 2),
    patient_id=rep(c(rep(c("pat1", "pat2"), 
    each=3)), 2),
    altered_entity=c(rep(c("geneA", "geneB", "geneC"), 
    4)),
    clone1=c(0, 1, 0, 1, 0, 1, 0, 
    1, 1, 1, 0, 0),
    clone2=c(1, 0, 1, 0, 1, 1, 1, 
    0, 0, 1, 0, 1),
    tree_id=c(rep(5, 6), rep(10, 6)))
pairs_of_interest <- dplyr::tibble(entity_A=c("geneA", "geneB"), 
    entity_B=c("geneB", "geneC"))
take_pairs_and_get_patients(clone_tbl, pairs_of_interest)

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