calcGMMCopyNumber {karyotapR} | R Documentation |
Call copy number for each cell-chromosome using Gaussian mixture models
Description
Uses control cells to simulate expected smoothed copy number distributions for all chromosomes across each of model.components
(copy number level).
Then uses the distributions to calculate posterior probabilities for each cell-chromosome belonging to each of copy number level.
Each cell-chromosome is assigned the copy number value for which its posterior probability is highest.
This is done for both whole chromosomes and chromosome arms.
Usage
calcGMMCopyNumber(
TapestriExperiment,
cell.barcodes,
control.copy.number,
model.components = 1:5,
model.priors = NULL,
...
)
Arguments
TapestriExperiment |
|
cell.barcodes |
character, vector of cell barcodes to fit GMM. Usually corresponds to diploid control. |
control.copy.number |
|
model.components |
numeric, vector of copy number GMM components to calculate, default |
model.priors |
numeric, relative prior probabilities for each GMM component. If |
... |
Additional parameters to be passed to internal functions. |
Value
TapestriExperiment
object with copy number calls based on the calculated GMMs, saved to gmmCopyNumber
slot of smoothedCopyNumberByChr
and smoothedCopyNumberByArm
altExps.
GMM parameters for each feature.id
are saved to the metadata
slot.
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)
tap.object <- calcGMMCopyNumber(tap.object,
cell.barcodes = colnames(tap.object),
control.copy.number = control.copy.number,
model.components = 1:5
)