rtab: rtab

View source: R/rtab.R

rtabR Documentation

rtab

Description

Sample Cell Type Table

Usage

rtab(scan, om, elt = length(scan), tol = 0.001, impute.unseen = TRUE)

Arguments

scan

the object produced by gibbsScan or a list whose last element has components “dataToEta”, “dataToLambda”. “eta”, and “lambda” akin to those of a ctScan object.

om

a filtration matrix such as made by omega

elt

which element of the scan to use in sampling.

tol

lower limit on probability of observing a clone

impute.unseen

if TRUE unseen clones will be sampled. This might be FALSE if scan represents a population that is to be sampled.

Details

Given the ctScan fit of a dataset, create a sample table from the posterior.

Value

table of counts

Author(s)

Charles Berry

Examples

ascan <- list()
ascan$dataToEta <- rep(1:7,each=3)
ascan$dataToLambda <- rep(1:3, 7)
ascan$lambda <- c( 1.0, 5.0, 20.0)
ascan$eta <- cbind( diag(3) * 0.7 + 0.1, 1/3, -0.3 * diag(3)+0.4)
ascan <- list( ascan )
om <-  diag(9:7)/10 + 0.025
atab <- rtab(ascan, om)

BushmanLab/cellTypeCompositions documentation built on June 14, 2022, 9:29 p.m.