plot_ecdf_test_stat: Plot empirical cumulative distribution functions of the test...

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_functions.R

Description

This function plots the ECDFs of the test statistic under the null hypothesis.

Usage

1
2
plot_ecdf_test_stat(ecdf_list, plot_idx = c(2, 3), num_panel_rows = 1,
  output_pdf = "direct")

Arguments

ecdf_list

The list of ECDF's as generated with generate_ecdf_test_stat.

plot_idx

The index of which of the list entries of the ecdf_list to plot. Default: c(2,3).

num_panel_rows

The ECDF's will be plotted altogether, hence par(mfrow=c(x, y)) is used. Here, x is the number of panel rows, which has to be set with this parameter, and y will be taken as ceil(#ECDF's/x). E.g., if you have 20 ECDF's in total, you can set num_panel_rows=4, and then your 20 ECDF's will be plotted in panels with four rows, and five columns. Default=1.

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

The ECDF's of the test statistic under the null for a data set can be generated with generate_ecdf_test_stat. Afterwards, they can be visualized with this function. It is assumed that the first ECDF in the ecdf_list is the ECDF for the case where pairs are mutated in two patients.

Value

None, the function plots ecdf curves.

Author(s)

Ariane L. Moore

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
avg_rates_m <- c(pat1=0.1, pat2=0.034, pat3=0.21, pat4=0.063)
list_of_num_trees_all_pats <- list(pat1=c(20, 20, 19), 
                              pat2=c(20, 18, 20),
                              pat3=c(19, 20, 20), 
                              pat4=c(20, 20, 20))
list_of_clon_excl_all_pats <- list(pat1=c(5, 0, 1), 
                              pat2=c(10, 2, 0),
                              pat3=c(18, 12, 0), 
                              pat4=c(0, 2, 0))
num_pat_pair_max <- 2
num_pairs_sim <- 10
ecdf_list <- generate_ecdf_test_stat(avg_rates_m, 
                                     list_of_num_trees_all_pats, 
                                     list_of_clon_excl_all_pats, 
                                     num_pat_pair_max, 
                                     num_pairs_sim)
plot_ecdf_test_stat(ecdf_list, plot_idx=2)

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