transformData {clusterExperiment} | R Documentation |
Provides the transformed data
## S4 method for signature 'matrixOrHDF5' transformData(object, transFun = NULL, isCount = FALSE) ## S4 method for signature 'ClusterExperiment' transformData(object, ...) ## S4 method for signature 'SingleCellExperiment' transformData(object, ...) ## S4 method for signature 'SummarizedExperiment' transformData(object, ...)
object |
a matrix, SummarizedExperiment, SingleCellExperiment or ClusterExperiment object. |
transFun |
a transformation function to be applied to the data. If the
transformation applied to the data creates an error or NA values, then the
function will throw an error. If object is of class
|
isCount |
if |
... |
Values passed on the the 'matrix' method. |
The data matrix defined by assay(x)
is transformed based on
the transformation function either defined in x (in the case of a
ClusterExperiment
object) or by user given values for other classes.
A DataFrame defined by assay(x)
suitably transformed
mat <- matrix(data=rnorm(200), ncol=10) mat[1,1] <- -1 #force a negative value labels <- gl(5, 2) cc <- ClusterExperiment(mat, as.numeric(labels), transformation = function(x){x^2}) #define transformation as x^2 z<-transformData(cc)