Extracting Mixture Data

Description

The S4 generic function mixData extract mixture data from an object, i.e. information on its underlying constituents/components. For example, for gene expression deconvolution, the CellMix stores such data as an NMFstd-class model object.

The function mixData<- assign mixture data onto objects.

Usage

mixData(object, ...)

mixData(object) <- value

Arguments

object
object from which to extract the mixture data
...
extra argument to allow extension. See each method's description for more details,.
value
replacement value. In the case of ExpressionMix objects, this will be an object of class NMFstd-class.

Methods

  1. mixDatasignature(object = "ExpressionMix"): Extracts mixture data from an ExpressionMix object.

    Because ExpressionMix-class inherits from linkS4class{NMFstd}, this methods simply returns the the object coerced as an NMFstd object.

  2. mixData<-signature(object = "ExpressionMix", value = "NMFstd"): Sets mixture data in an ExpressionMix object.

    Because ExpressionMix-class inherits from linkS4class{NMFstd}, this method simply copies all slots in value in into the corresponding slots in object, and then checks that the result object is valid.

Examples


e <- ExpressionMix(rmatrix(10,5))
e
## ExpressionMix (storageMode: lockedEnvironment)
## assayData: 10 features, 5 samples 
##   element names: exprs 
## protocolData: none
## phenoData: none
## featureData: none
## experimentData: use 'experimentData(object)'
## Annotation:  
## Composition: none
# the mixture data is stored as an NMF model
mixData(e)
## <Object of class:NMFstd>
## features: 10 
## basis/rank: 0 
## samples: 5

# assign a random mixture data with 5 cell types
m <- rnmf(3, e)
# ensure proportions sum-up to one
coef(m) <- scoef(m)
mixData(e) <- m