plot_rates_clon_excl {GeneAccord} | R Documentation |
This function plots the average rates of clonal exclusivity for each patient.
plot_rates_clon_excl(avg_rates_m, clone_tbl, output_pdf = "direct")
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" |
In addition to the average rate of clonal exclusivity, it also visualizes the average number of clones of each patient.
None, the function plots the average rates of clonal exclusivity.
Ariane L. Moore
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)