Skip to contents

Calculate decision boundaries between components of copy number GMMs

Usage

getGMMBoundaries(TapestriExperiment, chromosome.scope = "chr")

Arguments

TapestriExperiment

TapestriExperiment object.

chromosome.scope

"chr" or "arm", for using models for either whole chromosomes or chromosome arms. Default "chr".

Value

tibble containing boundary values of GMMs for each feature.id.

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"
)
# }