Learn R Programming

PSCBS (version 0.23.0)

estimateKappaByC1Density.PairedPSCBS: Estimate global background in segmented copy numbers

Description

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.

Usage

## S3 method for class 'PairedPSCBS':
estimateKappaByC1Density(this, adjust=1, minDensity=0.2, ..., verbose=FALSE)

Arguments

adjust
A numeric scale factor specifying the size of the bandwidth parameter used by the density estimator.
minDensity
A non-negative numeric threshold specifying the minimum density a peak should have in order to consider it a peak.
...
Not used.
verbose
See Verbose.

Value

  • Returns the background estimate as a numeric scalar.

Algorithm

  • Retrieve segment-level minor copy numbers and corresponding weights:
    1. Grabs the segment-level C1 estimates.
    2. Calculate segment weights proportional to the number of heterozygous SNPs.
  • Identify subset of regions with C1=0:
    1. Estimates the weighted empirical density function (truncated at zero below). Tuning parameter 'adjust'.
    2. Find the first two peaks (with a density greater than tuning parameter 'minDensity').
    3. Assumes that the two peaks corresponds to C1=0 and C1=1.
    4. Defines threshold Delta0.5 as the center location between these two peaks.
  • Estimate the normal contamination:
    1. For all segments with C1 < Delta0.5, calculate the weighted median of their C1:s.
    2. Let kappa be the above weighted median. This is the estimated background.

See Also

Instead of calling this method explicitly, it is recommended to use the *estimateKappa() method.