unexplainedSamples: Estimate samples not fully explained by signature fit

Description Usage Arguments Value Examples

View source: R/SignatureFitLib.R

Description

Given a catalogue of samples, signatures and exposures, compute the sum of the absolute deviations (SAD) between the original catalogue and the reconstructed samples (i.e. signatures x exposures) and normalise this sum by the total number of mutations in the sample. Then, for each sample, compare its normalised SAD to the normalised SAD of the other samples and check if it is significantly different. In practice, a p-value is computed fitting a gaussian distribution to the other samples.

Usage

1
2
3
4
5
6
7
unexplainedSamples(
  fileout = NULL,
  catalogue,
  sigs,
  exposures,
  pvalue_threshold = 0.01
)

Arguments

fileout

if specified, generate a plot, otherwise no plot is generated

catalogue

original catalogue, channels as rows and samples as columns

sigs

mutational signautures used for fitting, channels as rows, signatures as columns

exposures

exposures/activities of signatures in each sample. Signatures as rows, samples as columns

pvalue_threshold

threshold for statistical significance

Value

table of unexplained samples

Examples

1
2
3
4
5
6
7
8
res <- SignatureFit_withBootstrap(cat = catalogue,
                  signature_data_matrix = cosmic30,
                  nboot = 5,
                  threshold_percent = 0.1,
                  threshold_p.value = 0.1)
s_table <- unexplainedSamples(catalogue=catalogue,
                  sigs=cosmic30,
                  exposures=res$E_median_filtered)

pdiakumis/hrdetect documentation built on May 17, 2020, 5:30 p.m.