D-HEST Institute for Neurosciences, ETH Zürich & Laboratory of Statistical Bioinformatics, University Zürich
The SEtools package is a set of convenience functions for the Bioconductor class SummarizedExperiment. It facilitates merging, melting, and plotting SummarizedExperiment objects.
NOTE that the heatmap-related functions habe been moved to a standalone package, sechm, and have been deprecated from this package.
Getting started
Package installation
if (!requireNamespace("BiocManager", quietly = TRUE))
install.packages("BiocManager")
BiocManager::install("SEtools")
Or, to install the latest development version:
BiocManager::install("plger/SEtools")
Example data
To showcase the main functions, we will use an example object which contains (a subset of) whole-hippocampus RNAseq of mice after different stressors:
suppressPackageStartupMessages({
library(SummarizedExperiment)
library(SEtools)
})
data("SE", package="SEtools")
SE
It is also possible to merge by rowData columns, which are specified through the mergeBy argument.
In this case, one can have one-to-many and many-to-many mappings, in which case two behaviors are possible:
By default, all combinations will be reported, which means that the same feature of one object might appear multiple times in the output because it matches multiple features of another object.
If a function is passed through aggFun, the features of each object will by aggregated by mergeBy using this function before merging.
SEtools
Pierre-Luc Germain, 14.01.2020
D-HEST Institute for Neurosciences, ETH Zürich & Laboratory of Statistical Bioinformatics, University Zürich
The SEtools package is a set of convenience functions for the Bioconductor class SummarizedExperiment. It facilitates merging, melting, and plotting
SummarizedExperimentobjects.NOTE that the heatmap-related functions habe been moved to a standalone package, sechm, and have been deprecated from this package.
Getting started
Package installation
Or, to install the latest development version:
Example data
To showcase the main functions, we will use an example object which contains (a subset of) whole-hippocampus RNAseq of mice after different stressors:
This is taken from Floriou-Servou et al., Biol Psychiatry 2018.
Merging and aggregating SEs
All assays were merged, along with rowData and colData slots.
By default, row z-scores are calculated for each object when merging. This can be prevented with:
If more than one assay is present, one can specify a different scaling behavior for each assay:
Merging by rowData columns
It is also possible to merge by rowData columns, which are specified through the
mergeByargument. In this case, one can have one-to-many and many-to-many mappings, in which case two behaviors are possible:aggFun, the features of each object will by aggregated bymergeByusing this function before merging.Aggregating a SE
A single SE can also be aggregated by using the
aggSEfunction:If the aggregation function(s) are not specified,
aggSEwill try to guess decent aggregation functions from the assay names.Melting SE
To facilitate plotting features with ggplot2, the
meltSEfunction combines assay values along with row/column data: