vis_pval_distr_num_pat: Plot histogram and empirical cumulative distribution function...

Description Usage Arguments Details Value Author(s) Examples

View source: R/plot_functions.R

Description

This function visualizes the distribution of p-values.

Usage

1
vis_pval_distr_num_pat(res_sim, output_pdf = "direct")

Arguments

res_sim

tibble containing the simulated pairs of genes/pathways. It contains the columns 'num_patients', and 'pval', and can be generated with generate_test_stat_hist and then concatenating the tibbles.

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

It is especially useful, when exploring the results with simulated data under the null hypothesis, i.e. when delta is zero. In that scenario, the p-values are expected to be uniformly distributed. This function can take the p-values from generate_test_stat_hist where the concatenated tibble contains different values for 'num_pat_pair', i.e. the number of patients the simulated pairs are mutated in. The input tibble is expected to have the two columns 'pval', and 'num_patients'. Left panel: histogram of all p-values from the whole tibble. Right panel: ecdf of the p-values with different colors for different numbers of patients that the pairs were mutated in.

Value

None, the function plots a p-value histogram.

Author(s)

Ariane L. Moore

Examples

1
2
3
4
res_sim <- dplyr::tibble(num_patients=c(rep(2,100), 
                          rep(3,100), rep(4,100)),
                          pval=c(runif(300)))
vis_pval_distr_num_pat(res_sim)

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