Description Usage Arguments Details Value Examples
View source: R/buildSubclones.R
Build (pure) subclones by resampling real copy-number data
1 2 | buildSubclones(len, nbClones, bkps, regions, dataAnnotTP = NULL,
dataAnnotN = NULL, eps = 0.25)
|
len |
The number of loci in each subclone. |
nbClones |
The number of subclones. |
bkps |
A list of vectors of breakpoint positions for each subclone. |
regions |
A list of altered regions for each subclone. |
dataAnnotTP |
A data frame containing tumor data from which the subclone data are sampled, with columns:
If |
dataAnnotN |
A data frame containing paired normal data from which the
subclone data are sampled. Same format as argument |
eps |
A numeric value, the signal to noise ratio for simulated data. |
The subclones are designed to mimic intra-tumor heterogeneity. In particular, all of the subclones generated by a single call to this function share the same germline genotypes. Their relative frequency corresponds to that of the input data.
If dataAnnotTP
is provided, then the output data are simply sampled
from it. Else, they are simulated as follows: (i) generate genotypes and
minor and major copy number profiles, (ii) transform them back into more
classical copy number estimates: total copy number and allele B fractions,
ie the format described above for argument dataAnnotTP
.
A list of locus-level data sets for each subclone. Each data set is
of the format described above for argument dataAnnotTP
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | len <- 500*10 ## Number of loci
K <- 2L ## Number of subclones
bkps <- list(c(100, 250)*10, c(150, 400)*10)
regions <- list(c("(0,1)", "(0,2)", "(1,2)"), c("(1,1)", "(0,1)", "(1,1)"))
## Resampling read copy number data
dataAnnotTP <- acnr::loadCnRegionData(dataSet="GSE13372", tumorFraction=1)
dataAnnotN <- acnr::loadCnRegionData(dataSet="GSE13372", tumorFraction=0)
datR <- buildSubclones(len=len, nbClones=K, bkps=bkps, regions=regions,
dataAnnotTP=dataAnnotTP, dataAnnotN=dataAnnotN)
## Simulated data
datS <- buildSubclones(len=len, nbClones=K, bkps=bkps, regions=regions)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.