Generate a matrix for NMF de-composition.
sig_prepare(object, ...)# S3 method for CopyNumber
sig_prepare(object, reference_components = FALSE,
cores = 1, seed = 123456, min_comp = 2, max_comp = 10,
min_prior = 0.001, model_selection = "BIC", nrep = 1,
niter = 1000, rowIter = 1000, ...)
# S3 method for MAF
sig_prepare(object, ref_genome = NULL, prefix = NULL,
add = TRUE, ignoreChr = NULL, useSyn = TRUE, ...)
# S3 method for GenomicVariation
sig_prepare(object, ...)
a CopyNumber object or MAF object or GenomicVariation (not support for now) object.
custom setting for operating object. Detail see S3 method for
corresponding class (e.g. CopyNumber
).
default is FALSE
, calculate mixture components
from CopyNumber object.
If set it to NULL
, use pre-compiled components data which come from
CNV signature paper.
If can also be a list
contain flexmix object of copy-number features,
obtain this from get_components function.
number of compute cores to run this task.
You can use parallel::detectCores()
function to check how
many cores you can use.
seed number.
minimal number of components to fit, default is 2. Can also be a vector with length 6, which apply to each feature.
maximal number of components to fit, default is 10. Can also be a vector with length 6, which apply to each feature.
minimal prior value, default is 0.001. Details about custom setting please refer to flexmix package.
model selection strategy, default is 'BIC'. Details about custom setting please refer to flexmix package.
number of run times for each value of component, keep only the solution with maximum likelihood.
maximal number of iteration to achive converge.
step size of iteration for rows of ech CNV feature.
BSgenome object or name of the installed BSgenome package. Example: BSgenome.Hsapiens.UCSC.hg19 Default NULL, tries to auto-detect from installed genomes.
Prefix to add or remove from contig names in MAF file.
If prefix is used, default is to add prefix to contig names in MAF file. If false prefix will be removed from contig names.
Chromsomes to ignore from analysis. e.g. chrM
Logical. Whether to include synonymous variants in analysis. Defaults to TRUE
a list
contains a matrix
used for NMF de-composition.
CopyNumber
: Signature analysis prepare for CopyNumber object
MAF
: Signature analysis prepare for CopyNumber object
GenomicVariation
: Signature analysis prepare for GenomicVariation object
The result matrix generated further need to transpose before calling NMF if user use NMF::nmf by hand.
Mayakonda, Anand, et al. "Maftools: efficient and comprehensive analysis of somatic variants in cancer." Genome research 28.11 (2018): 1747-1756.
Other signature analysis series function: sig_assign_samples
,
sig_estimate
, sig_extract
,
sig_get_activity
,
sig_get_correlation
,
sig_get_similarity
,
sig_summarize_subtypes
# NOT RUN {
# Load copy number object
load(system.file("extdata", "toy_copynumber.RData",
package = "sigminer", mustWork = TRUE
))
# Prepare copy number signature analysis
cn_prepare <- sig_prepare(cn)
# }
Run the code above in your browser using DataLab