buildSubclones: Build (pure) subclones by resampling real copy-number data

Description Usage Arguments Details Value Examples

View source: R/buildSubclones.R

Description

Build (pure) subclones by resampling real copy-number data

Usage

1
2
buildSubclones(len, nbClones, bkps, regions, dataAnnotTP = NULL,
  dataAnnotN = NULL, eps = 0.25)

Arguments

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:

c

total copy number

b

B allele fraction

region

type of DNA copy number alteration

genotype

germline genotype

If NULL (default), this data frame is simulated using a simple model with Gaussian errors (on the scale of log-copy-numbers).

dataAnnotN

A data frame containing paired normal data from which the subclone data are sampled. Same format as argument dataAnnotTP. Must not be NULL if argument dataAnnotTP is not NULL.

eps

A numeric value, the signal to noise ratio for simulated data.

Details

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.

Value

A list of locus-level data sets for each subclone. Each data set is of the format described above for argument dataAnnotTP.

Examples

 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)

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