this is a wrapper of cnv_chooseSigNumber, cnv_extractSignatures and cnv_quantifySigExposure these three functions.

cnv_autoCaptureSignatures(sample_by_component, nTry = 12, nrun = 10,
  cores = 1, seed = 123456, plot = TRUE, testRandom = TRUE)

Arguments

sample_by_component

a sample-by-component matrix, generate from cnv_generateSbCMatrix function.

nTry

the maximal tried number of signatures, default is 12. Of note, this value should far less than number of features or samples.

nrun

the number of run to perform for each value in range of 2 to nTry, default is 10. According to NMF package documentation, nrun set to 50 is enough to achieve robust result.

cores

number of compute cores to run this task. You can use detectCores function to check how many cores you can use. If you are using cnv_pipe feature, please do not use maximal number of cores in your computer, it may cause some unexpected problems.

seed

seed number.

plot

logical. If TRUE, plot best rank survey.

testRandom

if generate random data from input to test measurements. Default is TRUE.

Value

a list contains results of NMF best rank survey, run, signature matrix, exposure list etc..

Examples

# NOT RUN {
## load example copy-number data from tcga
load(system.file("inst/extdata", "example_cn_list.RData", package = "VSHunter"))
## generate copy-number features
tcga_features = cnv_derivefeatures(CN_data = tcga_segTabs, cores = 1, genome_build = "hg19")
## fit mixture model  (this will take some time)
tcga_components = cnv_fitMixModels(CN_features = tcga_features, cores = 1)
## generate a sample-by-component matrix
tcga_sample_component_matrix = cnv_generateSbCMatrix(tcga_features, tcga_components, cores = 1)
## optimal rank survey13
tcga_results = cnv_autoCaptureSignatures(tcga_sample_component_matrix, nrun=10, cores = 1)
# }