This function provides an interface to software SigProfiler. More please see https://github.com/AlexandrovLab/SigProfilerExtractor. Typically, a reference genome is not required because the input is a matrix (my understanding).

sigprofiler_extract(
nmf_matrix,
output,
range = 2:5,
nrun = 10L,
refit = FALSE,
refit_plot = FALSE,
is_exome = FALSE,
init_method = c("nndsvd_min", "random", "alexandrov-lab-custom", "nndsvd", "nndsvda",
"nndsvdar"),
cores = -1L,
genome_build = c("hg19", "hg38", "mm10"),
use_conda = FALSE,
py_path = NULL,
sigprofiler_version = "1.1.0"
)

sigprofiler_import(
output,
order_by_expo = FALSE,
type = c("suggest", "refit", "all")
)

## Arguments

nmf_matrix a matrix used for NMF decomposition with rows indicate samples and columns indicate components. output directory. signature number range, i.e. 2:5. the number of iteration to be performed to extract each signature number. if TRUE, then refit the denovo signatures with nnls. Same meaning as optimize option in sig_extract or sig_auto_extract. if TRUE, SigProfiler will make denovo to COSMIC sigantures decompostion plots. However, this may fail due to some matrix cannot be identified by SigProfiler plot program. if TRUE, the exomes will be extracted. the initialization algorithm for W and H matrix of NMF. Options are 'random', 'nndsvd', 'nndsvda', 'nndsvdar', 'alexandrov-lab-custom' and 'nndsvd_min'. number of cores used for computation. I think this option is useless when input is matrix, keep it in case it is useful. if TRUE, create an independent conda environment to run SigProfiler. path to Python executable file, e.g. '/Users/wsx/anaconda3/bin/python'. version of SigProfilerExtractor. If this package is not installed, the specified package will be installed. If this package is installed, this option is useless. if TRUE, order the import signatures by their exposures, e.g. the signature contributed the most exposure in all samples will be named as Sig1. one of 'suggest' (for suggested solution), 'refit' (for refit solution) or 'all' (for all solutions).

## Value

For sigprofiler_extract(), returns nothing. See output directory.

For sigprofiler_import(), a list containing Signature object.

## Examples

if (FALSE) {
sigprofiler_extract(cn_tally_M$nmf_matrix, "~/test/test_sigminer", use_conda = TRUE ) sigprofiler_extract(cn_tally_M$nmf_matrix, "~/test/test_sigminer",