extract_num_clones_tbl: Extract number of clones.

Description Usage Arguments Details Value Author(s) Examples

View source: R/data_handling_functions.R

Description

Extract number of clones in each patient.

Usage

1

Arguments

clone_tbl

The tibble generated with create_tbl_ent_clones.

Details

Given a clone tibble as created with create_tbl_ent_clones this function extracts the information, how many clones there are in each patient. The counted clones will be those with at least one non-zero entry, i.e. at least one gene/pathway assigned to the clone.

Value

A named vector with the number of clones in each patient. The name of each element is the respective patient_id.

Author(s)

Ariane L. Moore

Examples

1
2
3
4
5
6
7
8
9
clone_tbl <- dplyr::tibble(
    file_name=c(rep("fn1", 2), rep("fn2", 2)),
    patient_id=c(rep("pat1", 2), rep("pat2", 2)),
    altered_entity=c("pw1", "pw2", "pw1", "pw3"),
    clone1=c(0, 0, 0, 0),
    clone2=c(0, 1, 0, 1),
    clone3=c(1, 1, 0, 1),
    clone4=c(1, 0, 0, 0))
extract_num_clones_tbl(clone_tbl)

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