norm_exprs {scater} | R Documentation

## Additional accessors for the typical elements of a SingleCellExperiment object.

### Description

Convenience functions to access commonly-used assays of the `SingleCellExperiment` object.

### Usage

    norm_exprs(object)

    norm_exprs(object) <- value

    stand_exprs(object)

    stand_exprs(object) <- value

    fpkm(object)

    fpkm(object) <- value

### Arguments

`object` | `SingleCellExperiment` class object from which to access or to which to assign assay values. Namely: "exprs", norm_exprs", "stand_exprs", "fpkm". The following are imported from `SingleCellExperiment`: "counts", "normcounts", "logcounts", "cpm", "tpm".
`value` | a numeric matrix (e.g. for `exprs`)

### Value

a matrix of normalised expression data

a matrix of standardised expressiond data

a matrix of FPKM values

A matrix of numeric, integer or logical values.

### Author(s)

Davis McCarthy

### Examples

    data("sc_example_counts")
    data("sc_example_cell_info")
    example_sce <- SingleCellExperiment(
    assays = list(counts = sc_example_counts), colData = sc_example_cell_info)

    example_sce <- normalize(example_sce)
    head(logcounts(example_sce)[,1:10])
    head(exprs(example_sce)[,1:10]) # identical to logcounts()

    example_sce <- SingleCellExperiment(
    assays = list(norm_counts = sc_example_counts), colData = sc_example_cell_info)

    counts(example_sce) <- sc_example_counts
    norm_exprs(example_sce) <- log2(calculateCPM(example_sce, use_size_factors = FALSE) + 1)

    stand_exprs(example_sce) <- log2(calculateCPM(example_sce, use_size_factors = FALSE) + 1)

    tpm(example_sce) <- calculateTPM(example_sce, effective_length = 5e4)

    cpm(example_sce) <- calculateCPM(example_sce, use_size_factors = FALSE)

    fpkm(example_sce)

[Package scater version 1.8.4 Index]