Clomial.generate.data: Generates simulated data to test performance of Clomial...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/Clomial.generate.data.R

Description

Data sets are simulated based on binomial distribution using random parameters for the model. The accuracy of the EM procedure can be estimated by comparing the inferred parameters vs. the known ones which were used to generate the data.

Usage

1
2
Clomial.generate.data(N, C, S, averageCoverage, mutFraction,
doSample1Normal = FALSE,erroRate=0,doCheckDc=TRUE)

Arguments

N

The number of genomic loci.

C

The number of clones.

S

The number of samples.

averageCoverage

The average coverage over each loci, each sample.

mutFraction

Should be in range 0-1. Each loci in every sample can be mutated with this probability.

doSample1Normal

If TRUE, no contamination with the tumor content is allowed for the normal sample. I.e. the first column of the generated P matrix will start with 1, and the rest of its entries will be equal to 0.

erroRate

The sequencing noise can be simulated by assigning a positive value to this parameter, which is the probability of reading a normal allele as the alternative allele, and vica versa.

doCheckDc

If TRUE, generating with be repeated until no row of Dc is all zeros to guarantee all loci have positive coverage in at least one sample.

Details

See the reference below for details.

Value

A list will be made with the following entries:

Dc

A matrix of simulated coverage for all loci and samples.

Dt

A matrix of alternative allele counts for all loci and samples.

Ptrue

The true clone frequency matrix used for generating the data.

U

The true genotype matrix used for generating the data.

Likelihood

The log-likelihood of the model with the true parameters.

Phi

The matrix of the second parameters of the binomial distributions; each entry is the probability that a read contains the variant allele at a locus in a sample.

Author(s)

Habil Zare

References

Inferring clonal composition from multiple sections of a breast cancer, Zare et al., Submitted.

See Also

Clomial, Clomial.likelihood

Examples

1
2
3
4
set.seed(1)
simulated <- Clomial.generate.data(N=20, C=4, S=10,
  averageCoverage=1000, mutFraction=0.1)
simulated$Dc

Clomial documentation built on Nov. 8, 2020, 8:16 p.m.