Combine multiple objects

combine(x, y, ...)

# S4 method for SummarizedExperiment,SummarizedExperiment
combine(x, y)

Arguments

x

Object.

y

Object.

...

Additional arguments.

Value

SummarizedExperiment.

Note

Updated 2020-12-21.

We're attempting to make this as strict as possible, requiring:

  • Rows (genes) across objects must be identical.

  • rowRanges and/or rowData metadata must be identical.

  • colData must contain the same columns.

  • Specific metadata must be identical (see metadata argument).

See also

Examples

data(RangedSummarizedExperiment, package = "AcidTest") ## SummarizedExperiment ==== x <- RangedSummarizedExperiment colnames(x) <- paste0( "sample", str_pad( string = seq_len(ncol(x)), width = 2L, pad = "0" ) ) y <- x colnames(y) <- paste0( "sample", str_pad( string = seq(from = ncol(y) + 1L, to = ncol(y) * 2L), width = 2L, pad = "0" ) ) ## Combine the two objects. c <- combine(x, y)
#> → Combining objects into `RangedSummarizedExperiment`.
#> → Binding columns in `assays()`: `counts`.
#> → Checking row data.
#> → Updating column data.
#> → Updating metadata.
#> DataFrame with 24 rows and 3 columns #> condition sampleName interestingGroups #> <factor> <factor> <factor> #> sample01 A sample01 A #> sample02 A sample02 A #> sample03 A sample03 A #> sample04 A sample04 A #> sample05 A sample05 A #> ... ... ... ... #> sample20 B sample20 B #> sample21 B sample21 B #> sample22 B sample22 B #> sample23 B sample23 B #> sample24 B sample24 B
print(c)
#> class: RangedSummarizedExperiment #> dim: 500 24 #> metadata(4): version date interestingGroups combine #> assays(1): counts #> rownames(500): gene001 gene002 ... gene499 gene500 #> rowData names(9): broadClass description ... geneName seqCoordSystem #> colnames(24): sample01 sample02 ... sample23 sample24 #> colData names(1): condition