citrus.calculateFoldFeatureSet: Build cluster features for folds of clustering

View source: R/citrus.featureFunctions.R

citrus.calculateFoldFeatureSetR Documentation

Build cluster features for folds of clustering

Description

Build cluster features for each fold of clustering. If multiple folds of clustering have been performed, citrus.calculateFoldFeatureSet builds features for clustered and leftout samples for each fold.

Usage

citrus.calculateFoldFeatureSet(citrus.foldClustering, citrus.combinedFCSSet,
  featureType = "abundances", minimumClusterSizePercent = 0.05, ...)

Arguments

citrus.foldClustering

A citrus.foldClustering object

citrus.combinedFCSSet

A citrus.combinedFCSSet object

featureType

Type of feature to be calculated. Valid options are: abundances and medians. See citrus.calculateFeatures for additional argument details.

minimumClusterSizePercent

Minimum cluster size percent used to select clusters for analysis. See citrus.selectClusters.

...

Additional arguments passed to feature-type specific calculation functions.

Value

A citrus.foldFeatureSet object with properties:

foldLargeEnoughClusters

List of selected clusters for each fold of clustering.

foldFeatures

List of features constructed from fold clustered samples.

leftoutFeatures

List of features constructed from non-clustered samples that were mapped to the fold clustering space.

allLargeEnoughClusters

Selected clusters from clustering of all samples.

allFeatures

Features constructed from clustering of all samples.

minimumClusterSizePercent

User-specified minimum cluster size percent.

folds

List of sample folds.

nFolds

Number of folds.

Author(s)

Robert Bruggner

Examples

# Where the data lives
dataDirectory = file.path(system.file(package = "citrus"),"extdata","example1")

# Create list of files to be analyzed
fileList = data.frame("unstim"=list.files(dataDirectory,pattern=".fcs"))

# Read the data
citrus.combinedFCSSet = citrus.readFCSSet(dataDirectory,fileList)

# List disease group of each sample
labels = factor(rep(c("Healthy","Diseased"),each=10))

# List of columns to be used for clustering
clusteringColumns = c("Red","Blue")

# Cluster each fold
citrus.foldClustering = citrus.clusterAndMapFolds(citrus.combinedFCSSet,clusteringColumns,labels,nFolds=4)

# Build fold features and leftout features
citrus.foldFeatureSet = citrus.calculateFoldFeatureSet(citrus.foldClustering,citrus.combinedFCSSet)

nolanlab/citrus documentation built on April 19, 2024, 6:49 p.m.