plot_rates_clon_excl: Barplot of rates of clonal exclusivity and number of clones.

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_functions.R

Description

This function plots the average rates of clonal exclusivity for each patient.

Usage

1
plot_rates_clon_excl(avg_rates_m, clone_tbl, output_pdf = "direct")

Arguments

avg_rates_m

A named vector with the average rates of clonal exclusivity for each patient. The name of each element is the patient id to be used in the barplot.

clone_tbl

The tibble containing the gene-to-clone assignments from all patients and all trees from the collection of trees.

output_pdf

The name of the pdf to be generated. Or if output_pdf is "direct", then the plot is generated directly and not to a pdf. Default: "direct"

Details

In addition to the average rate of clonal exclusivity, it also visualizes the average number of clones of each patient.

Value

None, the function plots the average rates of clonal exclusivity.

Author(s)

Ariane L. Moore

Examples

1
2
3
4
5
6
7
8
9
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(1, 6), rep(2, 6)))
avg_rates_m <- c(pat1=0.014, pat2=0.3)
plot_rates_clon_excl(avg_rates_m, clone_tbl)

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