View source: R/CAM3MGCluster.R
CAM3MGCluster | R Documentation |
This function finds corner clusters as MG clusters (clusters containing marker genes).
CAM3MGCluster(PrepResult, fast.mode = TRUE)
PrepResult |
An object of class " |
fast.mode |
Use fast mode of greedy search or not. The normal mode may give more accurate results, but computation time is much longer. The default is TRUE. |
This function is used internally by CAM3Run
function
to detect clusters containing marker genes,
or used when you want to perform CAM step by step.
This function provides two solutions. The forward and backward greedy search. Then the best one of certain source number is selected based on reconstruction errors of all data points in original space.
A list of class "CAMMGObj
" containing the
following components:
idx |
No use in CAM3, will be deprecated in future version. |
corner |
The indexes of clusters as detected corners. The first row is detected by the forward greedy search, and the second row is detected by the backward greedy search. |
error |
Two values. The first one is the reconstruction error of forward greedy search, and the second one is for the backward greedy search. |
#obtain data
data(ratMix3)
data <- ratMix3$X
#preprocess data
rPrep3 <- CAM3Prep(data, dim.rdc = 3, thres.low = 0.30, thres.high = 0.95)
#Marker gene cluster detection with greedy search
rMGC3 <- CAM3MGCluster(rPrep)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.