Before segmentation, the decrease in heterozygosity d=2|b-1/2|
defined
in Bengtsson et al, 2010 is calculated from the input data. d
is only
defined for heterozygous SNPs, that is, SNPs for which
data$genotype==1/2
. d
may be seen as a "mirrored" version of
allelic ratios (b
): it converts them to a piecewise-constant signals
by taking advantage of the bimodality of b
for heterozygous SNPs. The
rationale for this transformation is that allelic ratios (b
) are only
informative for heterozygous SNPs (see e.g. Staaf et al, 2008).
Before segmentation, the outliers in the copy number signal are droped
according the method explained by Venkatraman, E. S. and Olshen, A. B., 2007.
The resulting data are then segmented using the jointSeg
function, which combines an initial segmentation according to argument
method
and pruning of candidate change points by dynamic programming
(skipped when the initial segmentation *is* dynamic programming).
If argument stat
is not provided, then dynamic programming is run on
the two dimensional statistic "(c,d)"
.
If argument stat
is provided, then dynamic programming is run on
stat
; in this case we implicitly assume that stat
is a
piecewise-constant signal.