Description Usage Arguments Details Value References Examples
Initialization of the latent features of the c3co model
1 2 3 |
Y1 |
A matrix containing the segmented minor copy number (n patients in rows and J segments in columns). |
Y2 |
A matrix containing the segmented major copy number (n patients in rows and J segments in columns). |
K |
An integer value, the number of latent features in the model.
Defaults to |
flavor |
A character value specifying how initialization is performed. Defaults to stats::hclust. See Details. |
stat |
Statistic used to perform initialization. Should be either
|
verbose |
A logical value indicating whether to print extra information.
Defaults to |
The latent features are inferred as follows according to the
value of argument flavor
:
If flavor == "hclust"
(default), the latent features are centers of clusters
derived by hierarchical agglomerative clustering on the Euclidean distance
between the input copy number profiles, and using Ward linkage
(stats::hclust()
).
If flavor == "nmf"
, the latent features are the coefficients of the non-negative
matrix factorization in K
of the input copy number profiles.
If flavor == "svd"
, the latent features are the first K
right singular
vectors of the singular value decomposition of the input copy number
profiles. The flavor is not recommended as it may produce matrices
with non-positive entries
If flavor == "archetypes"
, the latent features are defined using archetypal
analysis.
If flavor == "subsampling"
, the latent features are chosen at random among existing
profiles.
A list with two components:
Z1
An J-by-K
matrix, the initial value for the J minor
copy numbers of the K
latent features
Z2
An J-by-K
matrix, the initial value for the J major
copy numbers of the K
latent features
Warning: Note that the Z1
and Z2
components are actually the
transposed version of those matrices. This notation mistake will be
fixed in a future release.
Gaujoux R and Seoighe C (2010). A flexible R package for nonnegative matrix factorization. BMC Bioinformatics, 11(1), pp. 367.
Cutler A and Breiman L. (1994) Archetypal analysis. Technometrics, 36(4):338-3474.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ## Simulate locus-level (C1,C2) copy-number data
dataAnnotTP <- acnr::loadCnRegionData(dataSet="GSE11976", tumorFrac=1)
dataAnnotN <- acnr::loadCnRegionData(dataSet="GSE11976", tumorFrac=0)
len <- 500*10 ## Number of loci
K <- 3L ## Number of subclones
n <- 12L ## Number of samples
bkps <- list(c(100, 250)*10, c(150, 400)*10, c(150, 400)*10)
regions <- list(c("(0,3)", "(0,1)", "(1,2)"),
c("(1,1)", "(0,1)", "(1,1)"),
c("(0,2)", "(0,1)", "(1,1)"))
datSubClone <- buildSubclones(len=len, nbClones=K, bkps=bkps, regions=regions,
dataAnnotTP=dataAnnotTP, dataAnnotN=dataAnnotN)
W <- rSparseWeightMatrix(nb.samp=n, nb.arch=K, sparse.coeff=0.90)
simu <- mixSubclones(subClones=datSubClone, W=W)
## Segment the copy-number data
seg <- segmentData(simu)
## Initialize C3CO model
Y1 <- t(seg$Y1)
Y2 <- t(seg$Y2)
resH <- initializeZt(Y1, Y2, K=K) ## corresponds to flavor "hclust")
resNMF <- initializeZt(Y1, Y2, K=K, flavor="nmf")
## Not run:
## often fails because of singularities:
resArch <- initializeZt(Y1, Y2, K=K, flavor="archetypes")
## End(Not run)
resSVD <- initializeZt(Y1, Y2, K=K, flavor="svd")
resC <- initializeZt(Y1, Y2, K=K, flavor="subsampling")
resNMF1 <- initializeZt(Y1, K=K, flavor="nmf")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.