Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

optimizeSubset

Perform factorization for subset of data


Description

Uses an efficient strategy for updating that takes advantage of the information in the existing factorization. Can use either cell names or cluster names to subset. For more basic subsetting functionality (without automatic optimization), see subsetLiger.

Usage

optimizeSubset(
  object,
  cell.subset = NULL,
  cluster.subset = NULL,
  lambda = NULL,
  thresh = 1e-04,
  max.iters = 100,
  datasets.scale = NULL
)

Arguments

object

liger object. Should call optimizeALS before calling.

cell.subset

List of cell names to retain from each dataset (same length as number of datasets).

cluster.subset

Clusters for which to keep cells (ie. c(1, 5, 6)). Should pass in either cell.subset or cluster.subset but not both.

lambda

Regularization parameter. By default, uses last used lambda.

thresh

Convergence threshold. Convergence occurs when |obj0-obj|/(mean(obj0,obj)) < thresh (default 1e-4).

max.iters

Maximum number of block coordinate descent iterations to perform (default 100).

datasets.scale

Names of datasets to rescale after subsetting (default NULL).

Value

liger object with H, W, and V slots reset. Scale.data (if desired) will also be updated to reflect the subset.

Examples

## Not run: 
# now want to look at only subset of data
# Requires a vector of cell names from data 1 and a vector of cell names from data 2
ligerex2 <- optimizeSubset(ligerex, cell.subset = list(cell_names_1, cell_names_2))

## End(Not run)

rliger

Linked Inference of Genomic Experimental Relationships

v1.0.0
GPL-3
Authors
Joshua Welch [aut, ctb], Chao Gao [aut, ctb, cre], Jialin Liu [aut, ctb], Joshua Sodicoff [aut, ctb], Velina Kozareva [aut, ctb], Evan Macosko [aut, ctb], Paul Hoffman [ctb], Ilya Korsunsky [ctb], Robert Lee [ctb]
Initial release
2021-04-18

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.