Calculate decision boundaries between components of copy number GMMs
Source:R/GaussianMixtureCalls.R
getGMMBoundaries.Rd
Calculate decision boundaries between components of copy number GMMs
Arguments
- TapestriExperiment
TapestriExperiment
object.- chromosome.scope
"chr" or "arm", for using models for either whole chromosomes or chromosome arms. Default "chr".
Examples
# \donttest{
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#> ℹ Moving gRNA probe to `altExp` slot "grnaCounts".
#> ℹ Moving barcode probe to `altExp` slot "barcodeCounts".
#> ℹ Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
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)
#> ℹ Smoothing copy number by median...
#> ✔ Smoothing copy number by median... [1.7s]
#>
tap.object <- calcGMMCopyNumber(tap.object,
cell.barcodes = colnames(tap.object),
control.copy.number = control.copy.number,
model.components = 1:5
)
#> ℹ Calculating GMMs using 300 input cells.
#> ℹ Generating probe values for 500 simulated cells...
#> ✔ Generating probe values for 500 simulated cells... [1s]
#>
#> ℹ Fitting Gaussian distributions to simulated cells...
#> ✔ Fitting Gaussian distributions to simulated cells... [10.2s]
#>
#> ℹ Calculating posterior probabilities...
#> ✔ Calculating posterior probabilities... [315ms]
#>
#> ℹ Calling copy number from posterior probabilities...
#> ✔ Calling copy number from posterior probabilities... [53ms]
#>
#> ✔ Saving whole chromosome copy number calls to altExp: smoothedCopyNumberByChr,
#> assay: gmmCopyNumber...
#> ✔ Saving chromosome arm copy number calls to altExp: smoothedCopyNumberByArm,
#> assay: gmmCopyNumber...
#> ✔ Saving GMM models and metadata to `gmmParams` slot...
boundaries <- getGMMBoundaries(tap.object,
chromosome.scope = "chr"
)
# }