combine: Combining or merging different Bioconductor data structures

Description Usage Arguments Value Note See Also Examples

Description

Combining or merging different Bioconductor data structures

Usage

1
2
3
4
5
6
7
combine(x, y, ...)

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

## S4 method for signature 'SingleCellExperiment,SingleCellExperiment'
combine(x, y)

Arguments

x

Object.

y

Object.

...

Additional arguments.

Value

SummarizedExperiment.

Note

Updated 2020-01-20.

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

See Also

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
data(
    RangedSummarizedExperiment,
    SingleCellExperiment,
    package = "acidtest"
)
str_pad <- stringr::str_pad

## 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)
sampleData(c)
print(c)

## SingleCellExperiment ====
x <- SingleCellExperiment
colnames(x) <- paste0(
    "cell",
    str_pad(
        string = seq_len(ncol(x)),
        width = 4L,
        pad = "0"
    )
)

y <- x
colnames(y) <- paste0(
    "cell",
    str_pad(
        string = seq_len(ncol(y)) + ncol(y),
        width = 4L,
        pad = "0"
    )
)

## Combine the two objects.
c <- combine(x, y)
sampleData(c)
print(c)

acidgenomics/basejump documentation built on Aug. 15, 2020, 10:21 a.m.