CAM3MGCluster: MG cluster detection for CAM3

View source: R/CAM3MGCluster.R

CAM3MGClusterR Documentation

MG cluster detection for CAM3

Description

This function finds corner clusters as MG clusters (clusters containing marker genes).

Usage

CAM3MGCluster(PrepResult, fast.mode = TRUE)

Arguments

PrepResult

An object of class "CAMPrepObj" obtained from CAMPrep function.

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.

Details

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.

Value

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.

Examples

#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)

ChiungTingWu/CAM3 documentation built on Feb. 14, 2024, 9:22 a.m.