sampleData: Sample Data

Description Usage Arguments Details Value Examples

Description

Metadata that describes the samples.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S4 method for signature 'SummarizedExperiment'
sampleData(object)

## S4 replacement method for signature 'SummarizedExperiment,DataFrame'
sampleData(object) <- value

## S4 method for signature 'SingleCellExperiment'
sampleData(object,
  blacklist = c("^ident$", "^origIdent$", "^res[.0-9]+$", "^sScore$",
  "^g2mScore$", "^phase$"))

## S4 replacement method for signature 'SingleCellExperiment,DataFrame'
sampleData(object) <- value

## S4 method for signature 'SummarizedExperiment'
sampleNames(object)

Arguments

object

Object.

value

Value to assign.

blacklist

character. Column names that should never be treated as sample-level metadata. Applies to objects where the columns don't map to samples (e.g. SingleCellExperiment), and we need to collapse the colData dynamically.

Details

This is a complement to the standard SummarizedExperiment::colData() function, but improves support for accessing sample metadata for datasets where multiple items in the columns map to a single sample (e.g. cells for a single-cell RNA-seq experiment).

Value

DataFrame.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(rse, sce, package = "basejump.data")

## SummarizedExperiment ====
x <- rse
sampleData(x)

## Assignment support
sampleData(x)[["batch"]] <- 1L
## `batch` column should be now defined.
sampleData(x)

## SingleCellExperiment ====
x <- sce
sampleData(x)

## Assignment support.
sampleData(x)[["batch"]] <- 1L
## `batch` column should be now defined.
sampleData(x)

steinbaugh/basejump.experiment documentation built on Nov. 5, 2018, 10:36 p.m.