runCluster {flowSpy} | R Documentation

## Specific Clustering Method Toolkits

### Description

Compute a specific clustering using the combined flow cytometry data. "som" `SOM`, "hclust" `hclust`, "clara" `clara`, "phenograph", "kmeans" `kmeans` are provided.

### Usage

    runCluster(
      object,
      cluster.method = c("som", "kmeans", "clara", "phenograph", "hclust", "mclust"),
      verbose = FALSE,
      ...
    )

### Arguments

`object` | an FSPY object
`cluster.method` | character. Four clustering method are provided: som, clara, kmeans and phenograph. Clustering method "hclust" and "mclust" are not recommended because of long computing time.
`verbose` | logic. Whether to print calculation progress.
`...` | options to pass on to the clustering functions.

### Value

An FSPY object with cluster

### See Also

`SOM`, `hclust`, `clara`, `kmeans`. You can use `runSOM`, `runClara`, `runPhenotype`, `runKmeans`, `runMclust` and `runHclust` to run clustering respectively.

### Examples

    if (FALSE) {
    # After building an FSPY object
    # Set random seed to make results reproducible

    set.seed(1)
    fspy <- runCluster(fspy, cluster.method = "som", xdim = 3, ydim = 3, verbose = TURE)

    # K-means clustering
    fspy <- runCluster(fspy, cluster.method = "kmeans", k = 9, verbose = TRUE)

    # Clara clustering
    fspy <- runCluster(fspy, cluster.method = "clara", k = 9, verbose = TRUE)

    # phenoGraph clustering
    fspy <- runCluster(fspy, cluster.method = "phenograph", verbose = TRUE)

    # hclust clustering
    # not recommended for large cell size
    fspy <- runCluster(fspy, cluster.method = "hclust", k = 9, verbose = TRUE)

    # mclust clustering
    # not recommended for large cell size
    fspy <- runCluster(fspy, cluster.method = "mclust", verbose = TRUE)
    }

[Package flowSpy version 1.4.0 Index]