Description Usage Arguments Value Examples
Estimate c3co model parameters from segment-level copy number data
1 2 |
Y1, Y2 |
Numeric n-by-J matrices containing segment-level copy numbers,
where n is the number of samples and J the number of segments. If |
parameters.grid |
A list composed of two vectors named |
warn |
If |
intercept |
logical: should an intercept be included in the model?
Defaults to |
... |
Further arguments to be passed to |
verbose |
A logical indicating whether to print extra information.
Defaults to |
A list of k objects of class c3coFit, where k is the number of candidate number of subclones.
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 34 35 36 37 38 39 40 41 | ## Simulate locus-level (C1,C2) copy-number data
set.seed(7)
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 <- 14L ## Number of samples
bkps <- list(c(100, 250)*10, c(150, 400)*10, c(150, 400)*10)
regions <- list(c("(0,3)", "(0,2)", "(1,2)"),
c("(1,1)", "(0,1)", "(1,1)"), c("(0,2)", "(0,1)", "(1,1)"))
datSubClone <- buildSubclones(len, K, bkps, regions, dataAnnotTP, dataAnnotN)
W <- rSparseWeightMatrix(nb.samp=n, nb.arch=K, sparse.coeff=0.7)
dat <- mixSubclones(subClones=datSubClone, W=W)
## Segment the copy-number data
seg <- segmentData(dat)
## Fit C3CO model
l1 <- seq(from=1e-8, to=1e-5, length.out=5L)
parameters.grid <- list(lambda1=l1, nb.arch=1:3)
fitList <- fitC3co(t(seg$Y1), t(seg$Y2), parameters.grid=parameters.grid)
## FIXME (cf Issue #67):
## fitListC <- fitC3co(t(seg$Y), parameters.grid=parameters.grid)
## A simpler example with toy data
K <- 3L ## Number of subclones
J <- 6L ## Number of segments
n <- 20L ## Number of samples
l1 <- 1e-4
candP <- 2:J
parameters.grid <- list(lambda=l1, nb.arch=candP)
dat <- getToyData(n=n, len=100L, nbClones=K, nbSegs=J, eps=0.2) ## almost noiseless!
sdat <- dat$segment
res <- fitC3co(sdat$Y, parameters.grid=parameters.grid)
pvePlot2(res$config$best, ylim=c(0.6, 1))
mus <- sapply(res$fit, FUN=function(x) x@mu)
## the mus are all identical??
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.