clusterStats {MetaCyto} | R Documentation

## Derive summary statistics for clusters

### Description

A function that derives summary statistics for clusters.

### Usage

    clusterStats(fcsFrame, clusterList, fcsNames)

### Arguments

`fcsFrame` | A flow Frame object returned from preprocessing function. Must contain a parameter called "sample_id" that specify the origin of each cell using integer IDs.
`clusterList` | A list, each element should be a vector containing the IDs of all cells that belong to a cluster.
`fcsNames` | A vector of fcs file names. Each element corresponds to an integer ID in the "sample_id" parameter in fcsFrame.

### Value

Returns a data frame, rows correspond to each fcs file, columns correspond to MFI of markers or fractions.

### Examples

    # Find fcs files
    files=system.file("extdata","SDY420/ResultFiles/CyTOF_result",
                      package="MetaCyto")
    files=list.files(files,pattern="fcs$",full.names=TRUE)
    # Preprocess
    fcs = preprocessing(fcsFiles=files,assay ="CyTOF",b=1/8)
    # Search clusters
    cluster_list=searchCluster(fcsFrame=fcs,
                               clusterLabel=c("CD3+|CD8+","CD3-|CD19+"))
    # derive summary statistics
    cluster_stats=clusterStats(fcsFrame=fcs,
                               clusterList=cluster_list$clusterList,
                               fcsNames=files)

[Package MetaCyto version 1.2.1 Index]