Description Usage Arguments Details Value Author(s) Examples
Generate a copy number profile by resampling input data
1 2 3 |
length |
length of the profile |
nBkp |
number of breakpoints. If |
bkp |
a numeric vector of breakpoint positions that may be used to
bypass the breakpoint generation step. Defaults to |
regData |
a data.frame containing copy number data for different types of copy number regions. Columns:
|
regions |
a character vector of region labels that may be used to bypass the
region label generation step. Defaults to |
regAnnot |
a data.frame containing annotation data for each copy number region. Columns:
If |
minLength |
minimum length of region between breakpoints. Defaults to 0. |
regionSize |
If |
connex |
If |
This function generates a random copy number profile of
length 'length', with 'nBkp' breakpoints randomly chosen. Between two
breakpoints, the profile is constant and taken among the different
types of regions in regData
.
Elements of regData[["region"]]
must be of the form
"(C1,C2)"
, where C1
denotes the minor copy number
and C2
denotes the major copy number. For example,
Normal
Hemizygous deletion
Homozygous deletion
Single copy gain
Copy-neutral LOH
Balanced two-copy gain
Unbalanced two-copy gain
Single-copy gain with LOH
If 'connex' is set to TRUE (the default), transitions between copy number regions are constrained in such a way that for any breakpoint, one of the minor and the major copy number does not change. Equivalently, this means that all breakpoints can be seen in both total copy numbers and allelic ratios.
profile |
the profile (a |
bkp |
a vector of bkp positions (the last row index before a breakpoint) |
regions |
a character vector of region labels |
Morgane Pierre-Jean and Pierre Neuvial
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | affyDat <- loadCnRegionData(dataSet="GSE29172", tumorFraction=1)
sim <- getCopyNumberDataByResampling(1e4, 5, minLength=100, regData=affyDat)
plotSeg(sim$profile, sim$bkp)
## another run with identical parameters
bkp <- sim$bkp
regions <- sim$regions
sim2 <- getCopyNumberDataByResampling(1e4, regData=affyDat, bkp=bkp, regions=regions)
plotSeg(sim2$profile, bkp)
## change tumor fraction but keep same "truth"
affyDatC <- loadCnRegionData(dataSet="GSE29172", tumorFraction=0.5)
simC <- getCopyNumberDataByResampling(1e4, regData=affyDatC, bkp=bkp, regions=regions)
plotSeg(simC$profile, bkp)
## restrict to only normal, single copy gain, and copy-neutral LOH
## with the same bkp
affyDatR <- subset(affyDat, region %in% c("(1,1)", "(0,2)", "(1,2)"))
simR <- getCopyNumberDataByResampling(1e4, regData=affyDatR, bkp=bkp)
plotSeg(simR$profile, bkp)
## Same 'truth', on another dataSet
regions <- simR$regions
illuDat <- loadCnRegionData(dataSet="GSE11976", tumorFraction=1)
sim <- getCopyNumberDataByResampling(1e4, regData=illuDat, bkp=bkp, regions=regions)
plotSeg(sim$profile, sim$bkp)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.