mergeSEs: mergeSEs

Description Usage Arguments Value Examples

View source: R/mergeSEs.R

Description

Merges a list of SummarizedExperiment-class, either by row.names or through specified rowData fields. In cases of many-to-many (or one-to-many) mappings, 'aggFun' determines whether the records are aggregated by linking ID (if an aggregation method is given) or all combinations are returned (if 'aggFun=NULL' - default).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
mergeSEs(
  ll,
  use.assays = NULL,
  do.scale = TRUE,
  commonOnly = TRUE,
  colColumns = NULL,
  mergeBy = NULL,
  aggFun = NULL,
  addDatasetPrefix = TRUE,
  defValues = list(),
  keepRowData = TRUE,
  BPPARAM = SerialParam()
)

Arguments

ll

A (named) list of SummarizedExperiment-class

use.assays

Names (or indexes) of the assays to use. By default, all common assays are used.

do.scale

A logical vector indicating (globally or for each assay) whether to perform row unit-variance scaling on each dataset before merging (default TRUE).

commonOnly

Logical; whether to restrict to rows present in all datasets (default TRUE).

colColumns

A character vector specifying 'colData' columns to include (if available in at least one of the datasets). If NULL, everything is kept.

mergeBy

The 'rowData' column to merge with. If NULL, row.names are used.

aggFun

The aggregation function to use when multiple rows have the same 'mergeBy' value. If merging multiple assays, a different function per assay can be passed as a named list (see aggSE). If NULL (default), entries will be reused to have each combination.

addDatasetPrefix

Logical; whether the name of the dataset should be appended to the sample names (default TRUE).

defValues

An optional named list of default 'colData' values when some columns are missing from some SEs.

keepRowData

Logical, whether to keep the rowData (default TRUE).

BPPARAM

For multithreading the aggregation step.

Value

An object of class SummarizedExperiment-class

Examples

1
2
data("SE", package="SEtools")
mergeSEs( list( se1=SE[,1:10], se2=SE[,11:20] ) )

SEtools documentation built on Nov. 8, 2020, 8:21 p.m.