addFeatureStats {splatter} | R Documentation

## Add feature statistics

### Description

Add additional feature statistics to a SingleCellExperiment object

### Usage

    addFeatureStats(
      sce,
      value = c("counts", "cpm", "tpm", "fpkm"),
      log = FALSE,
      offset = 1,
      no.zeros = FALSE
    )

### Arguments

`sce` | SingleCellExperiment to add feature statistics to.
`value` | the expression value to calculate statistics for. Options are "counts", "cpm", "tpm" or "fpkm". The values need to exist in the given SingleCellExperiment.
`log` | logical. Whether to take log2 before calculating statistics.
`offset` | offset to add to avoid taking log of zero.
`no.zeros` | logical. Whether to remove all zeros from each feature before calculating statistics.

### Details

Currently adds the following statistics: mean, variance, coefficient of variation, median and median absolute deviation. Statistics are added to the `rowData` slot and are named `Stat[Log]Value[No0]` where `Log` and `No0` are added if those arguments are true. UpperCamelCase is used to differentiate these columns from those added by analysis packages.

### Value

SingleCellExperiment with additional feature statistics

[Package splatter version 1.14.1 Index]