removeMissing: Remove missing cells or features from liger object

View source: R/preprocess.R

removeMissingR Documentation

Remove missing cells or features from liger object

Description

Remove missing cells or features from liger object

Usage

removeMissing(
  object,
  orient = c("both", "feature", "cell"),
  minCells = NULL,
  minFeatures = NULL,
  useDatasets = NULL,
  newH5 = TRUE,
  filenameSuffix = "removeMissing",
  verbose = getOption("ligerVerbose", TRUE),
  ...
)

removeMissingObs(
  object,
  slot.use = NULL,
  use.cols = TRUE,
  verbose = getOption("ligerVerbose", TRUE)
)

Arguments

object

liger object

orient

Choose to remove non-expressing features ("feature"), empty barcodes ("cell"), or both of them ("both"). Default "both".

minCells

Keep features that are expressed in at least this number of cells, calculated on a per-dataset base. A single value for all datasets or a vector for each dataset. Default NULL only removes none expressing features.

minFeatures

Keep cells that express at least this number of features, calculated on a per-dataset base. A single value for all datasets or a vector for each dataset. Default NULL only removes none expressing cells.

useDatasets

A character vector of the names, a numeric or logical vector of the index of the datasets to be processed. Default NULL removes empty entries from all datasets.

newH5

Logical, whether to create a new H5 file on disk for each H5-based dataset on subset. Default TRUE

filenameSuffix

When subsetting H5-based datasets to new H5 files, this suffix will be added to all the filenames. Default "removeMissing".

verbose

Logical. Whether to show information of the progress. Default getOption("ligerVerbose") or TRUE if users have not set.

...

Arguments passed to subsetLigerDataset

slot.use

Deprecated. Always look at rawData slot of inner ligerDataset objects.

use.cols

Deprecated. Previously means "treating each column as a cell" when TRUE, now means orient="cell".

Value

Updated (subset) object.

Note

removeMissingObs will be deprecated. removeMissing covers and expands the use case and should be easier to understand.

Examples

# The example dataset does not contain non-expressing genes or empty barcodes
pbmc <- removeMissing(pbmc)

rliger documentation built on Oct. 30, 2024, 1:07 a.m.