Learn R Programming

scater (version 1.0.4)

get_exprs: Generic accessor for expression data from an SCESet object.

Description

Access by name a matrix of expression values, one row for each feature (gene, exon, region, etc), and one column for each cell stored an element of the assayData slot of the SCESet object.

Usage

get_exprs(object, exprs_values)
"get_exprs"(object, exprs_values)
"get_exprs"(object, exprs_values = "exprs")

Arguments

object
a SCESet object.
exprs_values
character string indicating which values should be used as the expression values for this plot. Valid arguments are "tpm" (default; transcripts per million), "norm_tpm" (normalised TPM values), "fpkm" (FPKM values), "norm_fpkm" (normalised FPKM values), "counts" (counts for each feature), "norm_counts", "cpm" (counts-per-million), "norm_cpm" (normalised counts-per-million), "exprs" (whatever is in the 'exprs' slot of the SCESet object; default), "norm_exprs" (normalised expression values) or "stand_exprs" (standardised expression values) or any other slots that have been added to the "assayData" slot by the user.

Value

a matrix of expression values

Examples

Run this code
data("sc_example_counts")
data("sc_example_cell_info")
example_sceset <- newSCESet(countData = sc_example_counts)
get_exprs(example_sceset, "counts")

## new slots can be defined and accessed
set_exprs(example_sceset, "scaled_counts") <- t(t(counts(example_sceset)) /
colSums(counts(example_sceset)))
get_exprs(example_sceset, "scaled_counts")[1:6, 1:6]

Run the code above in your browser using DataLab