downsample_spectra: Downsample a set of mutational spectra

View source: R/downsample.R

downsample_spectraR Documentation

Downsample a set of mutational spectra

Description

Downsample a set of mutational spectra

Usage

downsample_spectra(spec, downsample_threshold = NULL, thres = NULL)

Arguments

spec

Input spectra as a numerical matrix or similar data.frame; each column is a spectrum, each row is a mutation type (e.g. CAG -> CTG).

downsample_threshold

See downsample and show_downsample_curves.

thres

Deprecated alternative to downsample_threshold.

Value

A list with elements:

  • down_spec: A numeric matrix with same shape as spec, with the mutation counts in each column reduced based on the corresponding ratio in the second element of this list, down_factor.

  • down_factor Numeric vector of the ratios of downsample(colSums(spec)) to colSums(spec).


steverozen/mSigHdp documentation built on Feb. 6, 2023, 1:36 a.m.