estimateKappaByC1Density.PairedPSCBS | R Documentation |
Estimate global background in segmented copy numbers based on the location of peaks in a weighted density estimator of the minor copy number mean levels.
The global background, here called \kappa
,
may have multiple origins where normal contamination is one,
but not necessarily the only one.
Assumptions: This estimator assumes that there are segments with C1=0 and C1=1, i.e. some deletions and, typically, some normal segements.
## S3 method for class 'PairedPSCBS'
estimateKappaByC1Density(this, typeOfWeights=c("dhNbrOfLoci", "sqrt(dhNbrOfLoci)"),
adjust=1, from=0, minDensity=0.2, ..., verbose=FALSE)
typeOfWeights |
A |
adjust |
A |
from |
A |
minDensity |
A non-negative |
... |
Not used. |
verbose |
See |
Returns the background estimate as a numeric
scalar.
Retrieve segment-level minor copy numbers and corresponding weights:
Grabs the segment-level C1 estimates.
Calculate segment weights.
The default (typeOfWeights="dhNbrOfLoci"
) is to use
weights proportional to the number of heterozygous SNPs.
An alternative (typeOfWeights="sqrt(dhNbrOfLoci)"
) is
to use the square root of those counts.
Identify subset of regions with C1=0:
Estimates the weighted empirical density function (truncated at zero below). Tuning parameter 'adjust'.
Find the first two peaks (with a density greater than tuning parameter 'minDensity').
Assumes that the two peaks corresponds to C1=0 and C1=1.
Defines threshold Delta0.5 as the center location between these two peaks.
Estimate the global background signal:
For all segments with C1 < Delta0.5, calculate the weighted median of their C1:s.
Let kappa be the above weighted median. This is the estimated background.
Henrik Bengtsson
Instead of calling this method explicitly, it is recommended
to use the *estimateKappa()
method.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.