cnv_chooseSigNumber: Choose optimal number of signatures

Description Usage Arguments Value Author(s) See Also Examples

Description

This function use NMF package to evaluate the optimal number of signatures. The most common approach is to choose the smallest rank for which cophenetic correlation coefficient starts decreasing (Used by this function). Another approach is to choose the rank for which the plot of the residual sum of squares (RSS) between the input matrix and its estimate shows an inflection point.

Usage

1
2
3
4
cnv_chooseSigNumber(sample_by_component, nTry = 12, nrun = 10,
  cores = 1, seed = 123456, plot = TRUE,
  consensusmap_name = "nmf_consensus", testRandom = TRUE,
  nmfalg = "brunet")

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 30~50 is enough to achieve robust result.

cores

number of compute cores to run this task. You can use parallel::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 rank survey.

consensusmap_name

a character, basename of consensus map output path.

testRandom

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

nmfalg

specification of the NMF algorithm.

Value

a list contains information of NMF run and rank survey.

Author(s)

Geoffrey Macintyre, Shixiang Wang

See Also

Other CNV analysis functions: cnv_autoCaptureSignatures, cnv_derivefeatures, cnv_extractSignatures, cnv_fitMixModels, cnv_generateSbCMatrix, cnv_getLengthFraction, cnv_pipe, cnv_plotDistributionProfile, cnv_plotFeatureDistribution, cnv_plotMixComponents, cnv_plotSignatures, cnv_quantifySigExposure, cnv_readprofile

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## 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 survey
 tcga_sig_choose = cnv_chooseSigNumber(tcga_sample_component_matrix,
 nrun = 10, cores = 1, plot = FALSE)

## End(Not run)

ShixiangWang/VSHunter documentation built on June 27, 2019, 4:56 p.m.