discover_signatures: Discover mutational signatures

Description Usage Arguments Value Examples

View source: R/discovery_prediction.R

Description

Mutational signatures and exposures will be discovered using methods such as Latent Dirichlet Allocation (lda) or Non-Negative Matrix Factorization (nmf). These algorithms will deconvolute a matrix of counts for mutation types in each sample to two matrices: 1) a "signature" matrix containing the probability of each mutation type in each sample and 2) an "exposure" matrix containing the estimated counts for each signature in each sample. Before mutational discovery can be performed, variants from samples first need to be stored in a musica object using the create_musica function and mutation count tables need to be created using functions such as build_standard_table.

Usage

1
2
3
4
5
6
7
8
9
discover_signatures(
  musica,
  table_name,
  num_signatures,
  method = "lda",
  seed = 1,
  nstart = 10,
  par_cores = FALSE
)

Arguments

musica

A musica object.

table_name

Name of the table to use for signature discovery. Needs to be the same name supplied to the table building functions such as build_standard_table.

num_signatures

Number of signatures to discover.

method

Method to use for mutational signature discovery. One of "lda" or "nmf". Default "lda".

seed

Seed to be used for the random number generators in the signature discovery algorithms. Default 1.

nstart

Number of independent random starts used in the mutational signature algorithms. Default 10.

par_cores

Number of parallel cores to use. Only used if method = "nmf". If set to FALSE, then no parallelization will be perfomred. Default FALSE.

Value

Returns a A musica_result object containing signatures and exposures.

Examples

1
2
3
4
5
data(musica)
g <- select_genome("19")
build_standard_table(musica, g, "SBS96", overwrite = TRUE)
discover_signatures(musica = musica, table_name = "SBS96",
num_signatures = 3, method = "lda", seed = 12345, nstart = 1)

musicatk documentation built on Nov. 8, 2020, 5:16 p.m.