Skip to contents

This function computes summary statistics for signature-level bootstraps, including quantiles, min/max contribution proportions, and an experimental p-value.

Usage

sig_summarise_bootstraps(
  bootstraps,
  threshold = 0.05,
  outliers_as_strings = FALSE
)

Arguments

bootstraps

A data frame containing bootstrap results in a sigverse-style format. See sigshared::example_bootstraps() for an example format.

threshold

The minimum proportion of mutations that must be explained by a signature for it to be considered present in a bootstrap. This threshold is used for calculating the experimental p-value via sig_compute_experimental_p_value().

outliers_as_strings

Logical. Return outliers as a character vector of '|' delimited strings rather than as a list-column (ignored if return_dataframe = FALSE). Can customise the delimiter using the delim argument

Value

A data frame containing the following columns:

signatures

Names of the signatures.

quantiles, iqr, min, max,outlier_thresholds

Statistical summary columns (quantiles, min, and max) of the contribution proportions across bootstraps.

outliers

either a list column or a character of '|' outlier strings (depending on outliers_as_strings argument

p_value

Computed experimental p-value for each signature, based on the threshold.

Examples

library(sigshared)
bootstraps <- example_bootstraps()
sig_summarise_bootstraps(bootstraps, threshold = 0.05)
#>   signatures min max   q1   q3 iqr median outlier_low_threshold
#> 1 Signature1 0.3 0.5 0.35 0.45 0.1    0.4                   0.2
#> 2 Signature2 0.5 0.7 0.55 0.65 0.1    0.6                   0.4
#>   outlier_high_threshold outliers p_value
#> 1                    0.6                0
#> 2                    0.8                0