Fit a generalized binary covariance decomposition (GBCD) to single cell RNA-seq data containing multiple tumors.

fit_gbcd(
  Y,
  Kmax,
  prior = ebnm::ebnm_generalized_binary,
  maxiter1 = 500,
  maxiter2 = 200,
  maxiter3 = 500,
  control = list(),
  verbose = 1
)

fit_gbcd_control_default()

Arguments

Y

Cell x gene matrix of normalized and log-transformed gene expression data.

Kmax

Positive integer (at least 2) specifying an upper bound on the number of GEPs. Note that Kmax is approximately but often not exactly the final number of GEPs.

prior

Nonnegative prior for GEP memberships, usually the generalized binary prior.

maxiter1

Positive integer specifying the maximum number of backfit iterations during the GEP membership matrix L initialization.

maxiter2

Positive integer specifying the maximum number of backfit iterations during the GEP membership matrix L estimation.

maxiter3

Positive integer specifying the maximum number of backfit iterations during the GEP signature matrix F estimation.

control

List of control parameters with the following elements: “warmstart”, a logical indicator specifying whether to use warmstart to initialize the prior g when solving EBNM subproblems (see ebnm for details); “extrapolate”, a logical indicator specifying whether to use extrapolation to accelerate backfitting GEP memberships (see flashier for details); “corr_thres”, a numeric scalar between 0 and 1 such that we only keep columns \(l_k\) whose Pearson correlation with \(\tilde{l}_k\) exceeds “corr_thres”.

verbose

Integer specifying whether and how to display progress updates, as described in flashier.

Value

A list including the following elements:

L

cell x GEP matrix containing the posterior estimates of the GEP membership matrix L.

F

List containing the posterior summaries of the GEP signature matrix F.

Examples

# Add a small example here.