Merge a simulation's abundance data, feature metadata, and sample metadata
into one data.table
. This function is useful for making plots using
ggplot2.
Arguments
- simData
List with the following elements, such as returned by
simphony()
:- abundData
Matrix of abundance values, with rownames for features and colnames for samples.
- sampleMetadata
data.table
with columnssample
andcond
.- featureMetadata
data.table
with columnsfeature
andcond
.
- features
Character vector of features for which to get abundance data. If
NULL
, then all features.
Examples
library('data.table')
featureGroups = data.table(amp = c(0, 1))
simData = simphony(featureGroups)
mergedSimData = mergeSimData(simData, simData$featureMetadata$feature[1:2])