deconComponents | R Documentation |
This is the main function used by the decon
method to estimate
relative cellularity. In general, this function is not meant to be called
directly.
deconComponents(object, geneSet, nComp = 1, method = c("SVD", "NMF", "ICA", "MDS"))
object |
An object of class |
geneSet |
An object of class |
nComp |
Numeric of length 1, specifying how many components to calculate for the matrix. See details for discussion of how components are calculated. |
method |
Method used to estimate eigengenes. At present only "SVD" is supported. Other methods should only be used for testing purposes. |
This function calculates the gene set-wise relative expression values for
the expression data found in object
. This is typically used as a
helper function for the decon
function, which calls this on
a per-gene set basis.
Expression summaries are calculated as follows. First, genes are
standardized to have zero mean and unit standard deviation, retaining the
values used to center and scale the data. The singular value decomposition
(svd) of the matrix is then calculated. For each component that is
requested (1:nComp
), all other eigenvalues in the d
matrix
of the svd is set to 0, and the svd matrices are multiplied to yield a
normalized expression matrix. The values in the normalized expression
matrix are then decentered and descaled using the values from the original
expression matrix. The relative expression values for the component is the
per-sample mean of this matrix.
A matrix with as many rows as there are samples in object
, and as
many columns as specified by nComp
. NOTE: Dimensions are not
dropped, even when only a single component is returned.
J.A. Hackney
svd
, decon
## Not run: library(GEOquery) library(hgu133plus2.db) ### Get tissue/cell specific gene sets deconGSC <- DeconGeneSetCollection() ### Load a dataset of mixed immune cell lines GSE11058 <- getGEO("GSE11058")[[1]] exprs(GSE11058) <- log2(exprs(GSE11058)) annotation(GSE11058) <- "hgu133plus2" ### Map identifiers deconU133GSC <- mapIdentifiers(deconGSC, AnnotationIdentifier(), revmap(hgu133plus2ENTREZID)) ### Just get the estimates for a single gene set, with none of the ### bells and whistles of the decon function. tcellEigengene <- deconComponents(GSE11058, deconU133GSC[["T"]]) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.