nmf.LassoK {SparseSignatures} | R Documentation

## nmf.LassoK

### Description

Perform the discovery of K somatic mutational signatures given a set of observed counts x.

### Usage

    nmf.LassoK(x, K, beta = NULL, background_signature = NULL,
      nmf_runs = 10, lambda_rate = 0.2, iterations = 20,
      max_iterations_lasso = 10000, num_processes = Inf, parallel = NULL,
      seed = NULL, verbose = TRUE)

### Arguments

`x` | count matrix.
`K` | numeric value (greater than 1) indicating the number of signatures to be discovered.
`beta` | starting beta for the estimation. If it is NULL, starting beta is estimated by NMF.
`background_signature` | background signature to be used. If not provided, a warning is thrown.
`nmf_runs` | number of iteration of NMF to be performed for a robust estimation of starting beta. If beta is not NULL, this parameter is ignored.
`lambda_rate` | value of LASSO to be used between 0 and 1. This value should be greater than 0. 1 is the value of LASSO that would shrink all the signatures to 0 within one step. The higher lambda_rate is, the sparser are the resulting signatures, but too large values result in a poor fit of the counts.
`iterations` | Number of iterations to be performed. Each iteration correspond to a first step where the counts are fitted and a second step where sparsity is enhanced.
`max_iterations_lasso` | Number of maximum iterations to be performed during the sparsification.
`num_processes` | Number of processes to be used during parallel execution. If executing in single process mode, this is ignored.
`parallel` | Cluster object for parallel execution.
`seed` | Seed for reproducibility.
`verbose` | boolean; Shall I print all messages?

### Value

A list with the discovered signatures. It includes 5 elements: alpha: matrix of the discovered alpha values beta: matrix of the discovered signatures starting_beta: initial signatures on which the method has been apploid best_loglik: log-likelihood of the best signatures configuration loglik_progression: log-likelihood values during the iterations. This values should be increasing, if not the selected value of lambda is too high

### Examples

    data(starting_betas_example)
    beta = starting_betas_example[["5_signatures","Value"]]
    res = nmf.LassoK(x=patients,K=5,beta=beta,background=background,lambda_rate=0.10,iterations=5,num_processes=NA)

[Package SparseSignatures version 1.6.0 Index]