SummarizedExperiment

SummarizedExperiment

A SummarizedExperiment contains zero or more assays, consisting of multi-dimensional arrays (usually matrices) of experimental data, as well as DataFrames containing further annotations on the rows or columns of those arrays. The SummarizedExperiment class defines methods for the following generics:

Assays are expected to provide methods for the following generics:

Constructor

new SummarizedExperiment(assays, optionsopt)

Source:
Parameters:
Name Type Attributes Default Description
assays Object | Map

Object or Map where keys are the assay names and values are multi-dimensional arrays of experimental data. All arrays should have the same number of rows and columns.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
assayOrder Array <optional>
<nullable>
null

Array of strings specifying the ordering of the assays. If non-null, this should have the same values as the keys of assays. If null, an arbitrary ordering is obtained from assays.

rowData DataFrame <optional>
<nullable>
null

Data frame of row annotations. If non-null, this should have a number of rows equal to the number of rows in each entry of assays. If null, an empty DataFrame is automatically created.

columnData DataFrame <optional>
<nullable>
null

Data frame of column annotations. If non-null, this should have a number of columns equal to the number of columns in each entry of assays. If null, an empty DataFrame is automatically created.

rowNames Array <optional>
<nullable>
null

Array of strings of length equal to the number of rows in the assays, containing row names. Alternatively null, if no row names are present.

columnNames Array <optional>
<nullable>
null

Array of strings of length equal to the number of columns in the assays, containing column names. Alternatively null, if no column names are present.

metadata Object | Map <optional>
{}

Object or Map containing arbitrary metadata as key-value pairs.

Extends

Classes

SummarizedExperiment

Methods

$removeAssay(i) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
i string | number

Identity of the assay to add, either by name or index.

Returns:

A reference to this SummarizedExperiment after removing the specified assay.

Type
SummarizedExperiment

$setAssay(i, value) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
i string | number

Identity of the assay to add, either by name or index.

  • If i is a number, the assay at the specified index is replaced. i should be non-negative and less than the number of assays.
  • If i is a string, any assay with the same name is replaced. If no such assay exists, a new assay is appended to the list of assays.
value *

Multi-dimensional array-like object to set/add as the assay.

Returns:

A reference to this SummarizedExperiment with modified assays.

Type
SummarizedExperiment

$setAssayNames(names) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
names Array

Array of strings containing the assay names. This should be of the same length as the number of assays and contain unique values.

Returns:

A reference to this SummarizedExperiment with modified assay names.

Type
SummarizedExperiment

$setColumnData(value) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
value DataFrame

Data frame containing the column annotations. This should have one row for each columns of this SummarizedExperiment.

Returns:

A reference to this SummarizedExperiment with modified column data.

Type
SummarizedExperiment

$setColumnNames(names, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
names Array

Array of strings of length equal to the number of columns in this SummarizedExperiment, containing column names. Alternatively null, to remove all column names.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified column names. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

$setMetadata(value) → {Annotated}

Source:
Overrides:
Parameters:
Name Type Description
value Object

Object containing the metadata.

Returns:

A reference to this Annotated object.

Type
Annotated

$setRowData(value) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
value DataFrame

Data frame containing the row annotations. This should have one row for each row of this SummarizedExperiment.

Returns:

A reference to this SummarizedExperiment with modified row data.

Type
SummarizedExperiment

$setRowNames(names) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
names Array

Array of strings of length equal to the number of rows in this SummarizedExperiment, containing row names. Alternatively null, to remove all row names.

Returns:

A reference to this SummarizedExperiment with modified row names.

Type
SummarizedExperiment

$sliceAssays(i) → {SummarizedExperiment}

Source:
Parameters:
Name Type Description
i Array

Array of strings or indices specifying the assays to retain in the slice. This should refer to unique assay names.

Returns:

A reference to this SummarizedExperiment with sliced assays.

Type
SummarizedExperiment

assay(i) → {*}

Source:
Parameters:
Name Type Description
i string | number

Assay to retrieve, either by name or index.

Returns:

The contents of assay i as an multi-dimensional array-like object.

Type
*

assayNames() → {Array}

Source:
Returns:

Array of assay names.

Type
Array

columnData() → {DataFrame}

Source:
Returns:

Data frame of column data, with one row per column in this SummarizedExperiment.

Type
DataFrame

columnNames() → (nullable) {Array}

Source:
Returns:

Array of strings containing column names, or null if no column names are available.

Type
Array

metadata() → {Map}

Source:
Overrides:
Returns:

Map containing arbitrary metadata.

Type
Map

numberOfAssays() → {number}

Source:
Returns:

Number of assays.

Type
number

numberOfColumns() → {number}

Source:
Returns:

Number of columns in this SummarizedExperiment.

Type
number

numberOfRows() → {number}

Source:
Returns:

Number of rows in this SummarizedExperiment.

Type
number

removeAssay(i, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
i string | number

Identity of the assay to add, either by name or index.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment after removing the specified assay. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

rowData() → {DataFrame}

Source:
Returns:

Data frame of row data, with one row per row in this SummarizedExperiment.

Type
DataFrame

rowNames() → (nullable) {Array}

Source:
Returns:

Array of strings containing row names, or null if no row names are available.

Type
Array

setAssay(i, value, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
i string | number

Identity of the assay to add, either by name or index.

  • If i is a number, the assay at the specified index is replaced. i should be non-negative and less than the number of assays.
  • If i is a string, any assay with the same name is replaced. If no such assay exists, a new assay is appended to the list of assays.
value *

Multi-dimensional array-like object to set/add as the assay.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

A SummarizedExperiment with modified assays. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

setAssayNames(names, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
names Array

Array of strings containing the assay names. This should be of the same length as the number of assays and contain unique values.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified assay names. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

setColumnData(value, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
value DataFrame

Data frame containing the column annotations. This should have one row for each columns of this SummarizedExperiment.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified column data. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

setColumnNames(names, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
names Array

Array of strings of length equal to the number of columns in this SummarizedExperiment, containing column names. Alternatively null, to remove all column names.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified column names. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

setMetadata(value, optionsopt) → {Annotated}

Source:
Overrides:
Parameters:
Name Type Attributes Default Description
value Object | Map

Object containing the metadata.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this Annotated instance in place. If false, a new instance is returned.

Returns:

The Annotated object after replacing the metadata. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
Annotated

setRowData(value, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
value DataFrame

Data frame containing the row annotations. This should have one row for each row of this SummarizedExperiment.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified row data. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

setRowNames(names, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
names Array

Array of strings of length equal to the number of rows in this SummarizedExperiment, containing row names. Alternatively null, to remove all row names.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with modified row names. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment

sliceAssays(i, optionsopt) → {SummarizedExperiment}

Source:
Parameters:
Name Type Attributes Default Description
i Array

Array of strings or indices specifying the assays to retain in the slice. This should refer to unique assay names.

options Object <optional>
{}

Optional parameters.

Properties
Name Type Attributes Default Description
inPlace boolean <optional>
false

Whether to mutate this SummarizedExperiment instance in place. If false, a new instance is returned.

Returns:

The SummarizedExperiment with sliced assays. If inPlace = true, this is a reference to the current instance, otherwise a new instance is created and returned.

Type
SummarizedExperiment