mixSubclones: Create a mixture of subclones

Description Usage Arguments Details Value Examples

View source: R/mixSubclone.R

Description

Create a mixture of subclones

Usage

1
mixSubclones(subClones, W)

Arguments

subClones

A list of K subclones, as provided by buildSubclones(). Each subclone is a data.frame with the following columns:

ct

total copy number in the tumor

baft

B allele fraction in the tumor

genotype

germline genotype in 0, 0.5, 1

cn

total copy number in the matched normal

bafn

B allele fraction in the matched normal

W

A n x K matrix of weights in [0,1], as generated by rSparseWeightMatrix().

Details

The mixture is performed at the scale of minor and major copy numbers (which is the scale at which copy number events occur). Therefore the data is first mapped to this scale, then mixed, then mapped back to the original (tcn, dh) scale.

By construction, dh, minor and major CN are only defined for heterozygous SNPs. Therefore, in the output data, the corresponding columns are missing for homozygous SNPs. Total copy numbers are not missing, so it makes sense to keep the homozygous SNPs in the output data as they will be exploited at the segmentation step.

Value

A list of n samples obtained by mixing the pure subclones according to the proportions specified in argument W.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
dataAnnotTP <- acnr::loadCnRegionData(dataSet="GSE11976", tumorFrac=1)
dataAnnotN <- acnr::loadCnRegionData(dataSet="GSE11976", tumorFrac=0)
len <- 500*10  ## Number of loci
K <- 2L        ## Number of subclones
n <- 3L        ## Number of samples
bkps <- list(c(100, 250)*10, c(150, 400)*10)
regions <- list(c("(0,3)", "(0,2)", "(1,2)"), c("(1,1)", "(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)
mixture <- mixSubclones(datSubClone, W=W)

pneuvial/c3co documentation built on May 25, 2019, 10:21 a.m.