CAM3ASest | R Documentation |
This function estimates A and S matrix based on marker gene clusters detected by CAM3.
CAM3ASest(MGResult, PrepResult, data, corner.strategy = 2, generalNMF = FALSE)
MGResult |
An object of class " |
PrepResult |
An object of class " |
data |
Matrix of mixture expression profiles which need to be the same
as the input of |
corner.strategy |
The method to detect corner clusters. 1: minimum sum of margin-of-errors; 2: minimum sum of reconstruction errors. The default is 2. |
generalNMF |
If TRUE, the decomposed proportion matrix has no sum-to-one constraint for each row. Without this constraint, the scale ambiguity of each column vector in proportion matrix will not be removed. The default is FALSE. |
This function is used internally by CAM3Run
function to
estimate proportion matrix (A), subpopulation-specific expression matrix (S)
and mdl values. It can also be used when you want to perform CAM step by
step.
The mdl value is based on original data with A matrix estimated by transforming dimension-reduced A matrix back to original space. The mdl value is the sum of two terms: code length of data under the model and code length of model. Both mdl value and the first term (code length of data) will be returned.
An object of class "CAMASObj
" containing the
following components:
Aest |
Estimated proportion matrix. |
Sest |
Estimated subpopulation-specific expression matrix. |
Aest.proj |
Estimated proportion matrix, before removing scale ambiguity. |
Ascale |
The estimated scales to remove scale ambiguity of each column vector in Aest. Sum-to-one constraint on each row of Aest is used for scale estimation. |
AestO |
No use in CAM3, will be deprecated in future version. |
SestO |
No use in CAM3, will be deprecated in future version. |
AestO.proj |
No use in CAM3, will be deprecated in future version. |
AscaleO |
No use in CAM3, will be deprecated in future version. |
datalength |
Code length of data. |
mdl |
The mdl value. |
#obtain data
data(ratMix3)
data <- ratMix3$X
#preprocess data
rPrep3 <- CAMPrep3(data, dim.rdc = 3, thres.low = 0.30, thres.high = 0.95)
#Marker gene cluster detection with greedy search
rMGC3 <- CAM3MGCluster(3, rPrep3)
#A and S matrix estimation
rASest3 <- CAM3ASest(rMGC3, rPrep3, data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.