View source: R/discovery_prediction.R
discover_signatures | R Documentation |
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, samples first
need to be stored in a musica
object using the
create_musica_from_variants or create_musica_from_counts
function and mutation count tables need to be created using functions such as
build_standard_table if create_musica_from_counts was not used.
discover_signatures(
musica,
modality,
num_signatures,
algorithm = "lda",
result_name = "result",
model_id = NULL,
seed = 1,
nstart = 10,
par_cores = 1,
make_copy = FALSE,
table_name = NULL
)
musica |
A |
modality |
Modality 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. |
algorithm |
Method to use for mutational signature discovery. One of
|
result_name |
Name for result_list entry to save the results to. Default
|
model_id |
Identifier for the result. If |
seed |
Seed to be used for the random number generators in the
signature discovery algorithms. Default |
nstart |
Number of independent random starts used in the mutational
signature algorithms. Default |
par_cores |
Number of parallel cores to use. Only used if
|
make_copy |
If |
table_name |
Use modality instead |
Returns nothing or a new musica
object,
depending on the make_copy
parameter.
data(musica)
g <- select_genome("19")
build_standard_table(musica, g, "SBS96", overwrite = TRUE)
discover_signatures(
musica = musica, modality = "SBS96",
num_signatures = 3, algorithm = "lda", seed = 12345, nstart = 1
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.