Learn R Programming

rliger (version 1.0.1)

removeMissingObs: Remove cells/genes with no expression across any genes/cells

Description

Removes cells/genes from chosen slot with no expression in any genes or cells respectively.

Usage

removeMissingObs(
  object,
  slot.use = "raw.data",
  use.cols = TRUE,
  verbose = TRUE
)

Value

liger object with modified raw.data (or chosen slot) (dataset names preserved).

Arguments

object

liger object (scale.data or norm.data must be set).

slot.use

The data slot to filter (takes "raw.data" and "scale.data") (default "raw.data").

use.cols

Treat each column as a cell (default TRUE).

verbose

Print messages (TRUE by default)

Examples

Run this code
ligerex <- createLiger(list(ctrl = ctrl, stim = stim))
if (any(rowSums(ctrl) == 0) || any(rowSums(stim) == 0)) {
    # example datasets do not have missing data, thus put in a condition
    # Though the function will return unchanged object if no missing found
    ligerex <- removeMissingObs(ligerex)
}

Run the code above in your browser using DataLab