View source: R/runSegmentation.R
runSegmentation | R Documentation |
Runs a segmentation algorithm using the ratio data.
runSegmentation(
scCNA,
method = c("CBS", "multipcf"),
seed = 17,
alpha = 1e-05,
merge_levels_alpha = 1e-05,
gamma = 40,
undo.splits = "prune",
name = "segment_ratios",
BPPARAM = bpparam()
)
scCNA |
The scCNA object |
method |
A character with the segmentation method of choice. |
seed |
Numeric. Set seed for CBS permutation reproducibility |
alpha |
A numeric with the significance levels for the test to accept
change-points for CBS segmentation. See |
merge_levels_alpha |
A numeric with the significance levels for the merge levels test to accept two different segments. |
gamma |
A numeric passed on to 'multipcf' segmentation. Penalty for each
discontinuity in the curve. |
undo.splits |
A character string specifying how change-points are to be
undone, if at all. Default is "none". Other choices are "prune", which uses
a sum of squares criterion, and "sdundo", which undoes splits that are not
at least this many SDs apart. See |
name |
Character. Target slot for the resulting segment ratios. |
BPPARAM |
A BiocParallelParam specifying how the function should be parallelized. |
CBS: #' runSegmentation
Fits a piece-wise constant function
to the transformed the smoothed bin counts. Bin counts are smoothed with
smooth.CNA
using the Circular Binary Segmentation
(CBS) algorithm from segment
with default it
applies undo.prune with value of 0.05.
multipcf: Performs the joint segmentation from the
copynumber
package using the multipcf
function. By fitting piecewise constant curves with common breakpoints
for all samples.
The resulting segment means are further refined with MergeLevels to join adjacent segments with non-significant differences in segmented means.
The segment profile for all cells inside the scCNA object.
copykit_obj <- mock_bincounts(ncells = 10)
copykit_obj <- runSegmentation(copykit_obj)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.