Learn R Programming

sigminer (version 0.1.11)

sig_prepare: Prepare variation signature analysis

Description

Generate a matrix for NMF de-composition.

Usage

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, ...)

Arguments

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).

reference_components

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.

cores

number of compute cores to run this task. You can use parallel::detectCores() function to check how many cores you can use.

seed

seed number.

min_comp

minimal number of components to fit, default is 2. Can also be a vector with length 6, which apply to each feature.

max_comp

maximal number of components to fit, default is 10. Can also be a vector with length 6, which apply to each feature.

min_prior

minimal prior value, default is 0.001. Details about custom setting please refer to flexmix package.

model_selection

model selection strategy, default is 'BIC'. Details about custom setting please refer to flexmix package.

nrep

number of run times for each value of component, keep only the solution with maximum likelihood.

niter

maximal number of iteration to achive converge.

rowIter

step size of iteration for rows of ech CNV feature.

ref_genome

BSgenome object or name of the installed BSgenome package. Example: BSgenome.Hsapiens.UCSC.hg19 Default NULL, tries to auto-detect from installed genomes.

prefix

Prefix to add or remove from contig names in MAF file.

add

If prefix is used, default is to add prefix to contig names in MAF file. If false prefix will be removed from contig names.

ignoreChr

Chromsomes to ignore from analysis. e.g. chrM

useSyn

Logical. Whether to include synonymous variants in analysis. Defaults to TRUE

Value

a list contains a matrix used for NMF de-composition.

Methods (by class)

  • CopyNumber: Signature analysis prepare for CopyNumber object

  • MAF: Signature analysis prepare for CopyNumber object

  • GenomicVariation: Signature analysis prepare for GenomicVariation object

Details

The result matrix generated further need to transpose before calling NMF if user use NMF::nmf by hand.

References

Mayakonda, Anand, et al. "Maftools: efficient and comprehensive analysis of somatic variants in cancer." Genome research 28.11 (2018): 1747-1756.

See Also

Other signature analysis series function: sig_assign_samples, sig_estimate, sig_extract, sig_get_activity, sig_get_correlation, sig_get_similarity, sig_summarize_subtypes

Examples

Run this code
# 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