Description Usage Arguments Details Value Author(s) Examples
Simulating chromosomes with clonal or subclonal copy number variations.
1 | genSimChroms(N, chr, loci, minLen, maxLen, datapath, chlens, save)
|
N |
an integer; the number of simulated chromosomes to be generated. |
chr |
an integer; the total number of germline variants and somatic mutations to simulate in the tumor genome. |
loci |
an integer; the number of single nucleotide polymorphisms (SNPs) to simulate as meaurements made to estimate copy number. |
minLen |
an integer; the minimum length of simulated CNVs. |
maxLen |
an integer; the maximum length of simulated CNVs. |
chlens |
a vector of integers; the lengths of human chrsomosomes. |
save |
a logical value; indicates whether output should be saved. |
Each simulated chromosome has a defined number of SNPs, or markers, as determined by the chromosome number and the chromosome lengths used. The positions of each CNV are generated using the minimum and maximum length inputs and the fraction of cells with each CNV are generated by sampling from a dirichlet distribution. Other characteristics - such as whether there are one or two CNVs, and, if two, whether one is nested within the other, are determined by sampling values at random.
The genSimChroms
function returns a list of objects, each containing
two objects itself: a simulated chromosome (sim
) and the data
generated therefrom (dat
). If the option 'save' is set to
TRUE
, the function will return no output and instead save
the data for each simulation individually in the specified datapath and
also save the list of simulated chromosomes (the underlying truth
from which the data was generated) as a file 'chrSims.rda' in the
specified path.
The sim
component contains two objects:
psi
the vector indicating the fraction of cells with each CNV;
clones
a list data frames describing each tumor clone's chromosome segments;
The clones
component contains a list of objects, each containing
a data frame:
chr
the chromosome number;
start
the start point of each segment;
end
the end point of each segment;
A
an integer; the number of copies of the B allele at each segment;
B
an integer; the number of copies of the A allele at each segment;
parent.index
an integer indicating which clone each clone is descended from;
seg
integer; segment ID;
The dat
component is output from the function
snpDataGen
Kevin R. Coombes krc@silicovore.com, Mark Zucker zucker.64@buckeyemail.osu.edu
1 2 3 4 5 | f.loci <- system.file("auxiliary/loci.Rda", package="TACG")
loci <- get(load(f.loci))
f.chlens <- system.file('auxiliary/chlens.Rda',package="TACG")
chlens <- get(load(f.chlens))
temp <- genSimChroms(N=3, chr=17, loci=loci, minLen=200000, maxLen=10000000, datapath=NULL, chlens=chlens, save=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.