| Generating simulated tumor and data sets | R Documentation | 
Generating and saving a set of simulated tumors and data that can be used in clonal heterogeneity analysis to assess accuracy of algorithms.
generateSimulationSet(simPath, dataPath, nPerK, rounds=400, nu=0,
                      pcnv=1, norm.contam=FALSE, dataPars=NULL)
| simPath | path to which simulated tumors will be saved. | 
| dataPath | path to which simulated SNP array and/or SNV data will be saved. | 
| nPerK | a vector of integers denoting the number of tumors to generate for each possible number of clones, where the nth entry dictates how many n-clone tumors will be generated. | 
| rounds | integer; the number of branches or total 'historical' clones generated in the tumor simulation. | 
| nu | an integer; the average number of mutations occuring per clonal branching event. | 
| pcnv | a real number between 0 to 1; the probability of a CNV occurring at each clonal branching event. | 
| norm.contam | a logical value; determines whether to include normal contamination in simulated tumor. | 
| dataPars | a list of parameters for data generation; see Details. | 
A set of simulation can be generated including both the simulated clonally heterogeneous tumors and the data generated therefrom. The size and general characteristics of the tumor set, as well as the types of data to be created from it (SNP array data and/or SNV data), are determined by the input parameter s. The script included generates three simulated data sets, each with 300 simulations, one with only copy number alterations (and only SNP array data), one with only single nucleotide variants (SNVs) and SNV data, and one with both.
The generateSimulationSet function generates and saves two
lists for each simulation:
a simulated tumor (saved in the path simpath), with
objects: psi, a vector of clonal fractions, and
clones, which is a list of tumor clones, each of which in
turn consists of a data frame cn and a data frame
seq; and 
a simulated data object (saved in the path datapath),
with objects: cn.data and se .data. Each component
is itself a data frame. Note that in some cases, one of these data
frames may have zero rows or may be returned as an NA.
Each list in the cn component contains seven columns:
chrthe chromosome number;
startthe starting locus of each genomic segment;
endthe ending locus of each genomic segment;
Athe first allelic copy number at each genomic segment;
Bthe second allelic copy number at each genomic segment;
segthe segment number; and
parent.indexthe index of the clone from which this clone is descended (equals 0 if the clone is an original tumor clone).
Each list in the seq component contains seven columns:
chrthe chromosome number;
startthe locus of the simulated SNVs;
segthe segment on which each SNV occurs;
mut.idthe id unique id number for each simulated SNV;
mutated.copiesthe number of copies of the mutated allele at each SNV;
alllelewhich allele (A or B) is mutated at each SNV; and
normal.copiesthe number of copies of the unmutated allele at each SNV.
The cn.data component contains seven columns:
chrthe chromosome number;
seqa unique segment identifier;
LRRsimulated segment-wise log ratios;
BAFsimulated segment-wise B allele frequencies;
X and Ysimulated intensities for two separate alleles/haplotypes per segment; and
markersthe simulated number of SNPS per segment.
The seq.data component contains eight columns:
chrthe chromosome number;
seqa unique "segment" identifier;
mut.ida unique mutation identifier;
refCounts and varCountsthe simulated numbers of reference and variant counts per mutation;
VAFthe simulated variant allele frequency;
totalCountsthe simulated total number of read counts; and
statusa character (that should probably be a factor) indicating whether a variant should be viewed as somatic or germline.
Kevin R. Coombes krc@silicovore.com, Mark Zucker zucker.64@buckeyemail.osu.edu
Zucker MR, Abruzzo LV, Herling CD, Barron LL, Keating MJ, Abrams ZB, Heerema N, Coombes KR. Inferring Clonal Heterogeneity in Cancer using SNP Arrays and Whole Genome Sequencing. Bioinformatics. To appear. doi: 10.1093/bioinformatics/btz057.
# Simulation set with just CNVs, 300 simulations in total, 60 with 1
#clone, 60 with 2 clones... 60 with 5 clones.
## Not run: 
generateSimulationSet(simPath = 'sims-cnv', dataPath = 'data-cnv',
    nPerK = rep(60,5), rounds = 400, nu = 0, pcnv = 1, norm.contam = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.