plot_clone_size: Plot a clone size histogram, and test for.

Description Usage Arguments Value Examples

View source: R/plot_clone_size.R

Description

This function creates a ggplot barplot of the clone size values foe each clone in the patient's data. The size of a clone is defined as the number of mutations assigned to it, and is provided in input.

The barplot is annotated to report wether a subclone with a driver is significantly larger than the expected size for a subclone without driver. To carry out this test subclones without drivers are used to estimate the parameters of a univariate Gaussian distribution (mean and standard deviation), the p-value is then computed from the fit distribution through the 'pnorm' function.

The confidence level for the test can be passed as parameter.

Usage

1
plot_clone_size(x, alpha_level = 0.05)

Arguments

x

An mtree tree.

alpha_level

Alpha level for the test, default is 0.05.

...

Extra parameters, not used.

Value

A ggplot plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
data(mtree_input)

x = mtrees(
mtree_input$binary_clusters, 
mtree_input$drivers,
mtree_input$samples,
mtree_input$patient,
mtree_input$sspace.cutoff,
mtree_input$n.sampling,
mtree_input$store.max
)
   
plot_clone_size(x[[1]])

caravagn/mtree documentation built on Sept. 17, 2020, 1:13 a.m.