TornadoExperiment: TornadoExperiment objects

Description Usage Arguments Value Getters Setters Other methods Examples

View source: R/class_tornado_experiment.R

Description

The TornadoExperiment class extends the SummarizedExperiment class, inheriting their methods and providing greater control over a 3rd dimension of assay data. This constructor is not intended to be called directly and one should see the TornadoExperiment class merely as a data container class. Instead, TornadoExperiment objects should spawn from the use of the build_tornado() function.

Usage

1
2
3
4
5
6
7

Arguments

...

Arguments passed on to SummarizedExperiment::SummarizedExperiment

assays

A list or SimpleList of matrix-like elements, or a matrix-like object (e.g. an ordinary matrix, a data frame, a DataFrame object from the S4Vectors package, a sparseMatrix derivative from the Matrix package, a DelayedMatrix object from the DelayedArray package, etc...). All elements of the list must have the same dimensions, and dimension names (if present) must be consistent across elements and with the row names of rowRanges and colData.

rowData

A DataFrame object describing the rows. Row names, if present, become the row names of the SummarizedExperiment object. The number of rows of the DataFrame must equal the number of rows of the matrices in assays.

rowRanges

A GRanges or GRangesList object describing the ranges of interest. Names, if present, become the row names of the SummarizedExperiment object. The length of the GRanges or GRangesList must equal the number of rows of the matrices in assays. If rowRanges is missing, a SummarizedExperiment instance is returned.

colData

An optional DataFrame describing the samples. Row names, if present, become the column names of the RangedSummarizedExperiment.

metadata

An optional list of arbitrary content describing the overall experiment.

binData

A DataFrame object with descriptions of the bins in the 3rd dimension of the array.

colKey, rowKey, binKey

A character(1) containing a column name in the corresponding data that identify samples, feature sets or bins respectively. These keys exist mainly such that plotting methods can extract relevant data less ambiguously.

Value

A TornadoExperiment class object.

Getters

In addition to what works for SummarizedExperiment objects, if x is a TornadoExperiment object, then:

nbin(x)

gives the number of bins in x. Analogous to nrow() and ncol() for the 3rd dimension.

binnames(x)

gives the names of the bins in x. Analogous to rownames() and colnames() but for bins

binData(x)

gets the binData slot that contains information about the 3rd dimension of the x.

colKey(x); rowKey(x); binKey(x)

retrieve the keys associated with that dimension of x.

Setters

In addition to what works for SummarizedExperiment objects, if x is a TornadoExperiment object, then:

binnames(x) <- value

sets the names of the bins in x.

binData(x) <- value

sets the binData slot if value is a DataFrame with nbin(x) rows.

colKey(x) <- value; rowKey(x) <- value; binKey(x) <- value

sets the keys associated with dimensions of x when value is a character(1) object and a valid column name in the relevant data slots.

Other methods

In addition to what works for SummarizedExperiment objects, if x is a TornadoExperiment object, then:

x[i, j, k]

subsets x for the first (i), second (j) and third (k) dimension.

Examples

1
# See ?build_tornado

teunbrand/tornadoplot documentation built on Dec. 23, 2021, 8:48 a.m.