calcSmoothCopyNumber {karyotapR} | R Documentation |
Smooth copy number values across chromosomes and chromosome arms
Description
calcSmoothCopyNumber()
takes copyNumber
slot values for probes on a chromosome and smooths them by median (default) for each chromosome
and chromosome arm, resulting in one copy number value per chromosome and chromosome arm for each cell barcode.
Cell-chromosome values are then discretized into integers by conventional rounding (1.5 <= x < 2.5 rounds to 2).
Smoothed copy number and discretized smoothed copy number values are stored as smoothedCopyNumber
and discreteCopyNumber
assays,
in altExp
slots smoothedCopyNumberByChr
for chromosome-level smoothing, and smoothedCopyNumberByArm
for chromosome arm-level smoothing.
Usage
calcSmoothCopyNumber(TapestriExperiment, method = "median")
Arguments
TapestriExperiment |
|
method |
Character, smoothing method: median (default) or mean. |
Value
TapestriExperiment
with smoothedCopyNumber
and discreteCopyNumber
assays in altExp
slots smoothedCopyNumberByChr
and smoothedCopyNumberByArm
.
Examples
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
tap.object <- calcNormCounts(tap.object)
control.copy.number <- generateControlCopyNumberTemplate(tap.object,
copy.number = 2,
sample.feature.label = "cellline1"
)
tap.object <- calcCopyNumber(tap.object,
control.copy.number,
sample.feature = "test.cluster"
)
tap.object <- calcSmoothCopyNumber(tap.object)