ISS_clustCompare: Compare among ISS clusters based on Random Forest algorithm

Description Usage Arguments Details Note Examples

View source: R/6.5_ISS_ClustCompare.R

Description

Compare two cluster and find their similarity (Supervised).

Usage

1
2
ISS_clustCompare(preditorData, prediction, ntree = 100,
  method = "prob")

Arguments

preditorData

Data to be used to compare. Input data in class MolDiaISS. Output of readISS and must be clustered.

prediction

Data that need to compare. Input data in class MolDiaISS. Output of readISS and must be clustered.

ntree

Number of trees to grow. randomForest. See This should not be set to too small a number, to ensure that every input row gets predicted at least a few times.

method

Methods to return comarison results. Possible values are "vote" and "prob". Defaut is "prob".

Details

This function will be apply to compare Two cluster by Random forest algorithm.

Note

This function need optimization to run properly. Work fine with small data but not with big data .

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
## Read data: Left and right HC
left_hypo  <- readISS(file = system.file("extdata", "Hypocampus_left.csv", package="MolDia"),
                  cellid = "CellId",centX = "centroid_x", centY = "centroid_y")
right_hypo <- readISS(file = system.file("extdata", "Hypocampus_right.csv", package="MolDia"),

                                     cellid = "CellId",centX = "centroid_x", centY = "centroid_y")
## Data preprocessing
left_hypo  <- ISS_preprocess(data = left_hypo, normalization.method = "LogNormalize",
                               do.scale = TRUE, do.center = TRUE)
right_hypo <- ISS_preprocess(data = right_hypo, normalization.method = "LogNormalize",
                               do.scale = TRUE, do.center = TRUE)

## Cluster data based on SEURAT pipeline
left_hypo   <- ISS_cluster(data =  left_hypo, pc = 0.9, resolution = 0.05)
right_hypo  <- ISS_cluster(data = right_hypo, pc = 0.9, resolution = 0.05)

## Cluster compare
comapre_left_right <- ISS_clustCompare(preditorData = left_hypo, prediction = right_hypo, ntree = 10)
comapre_right_left <- ISS_clustCompare(preditorData = right_hypo, prediction = left_hypo, ntree = 10)

mashranga/MolDia documentation built on May 26, 2019, 9:36 a.m.