View source: R/citrus.featureFunctions.R
| citrus.calculateFoldFeatureSet | R Documentation | 
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.
citrus.calculateFoldFeatureSet(citrus.foldClustering, citrus.combinedFCSSet,
  featureType = "abundances", minimumClusterSizePercent = 0.05, ...)
citrus.foldClustering | 
 A   | 
citrus.combinedFCSSet | 
 A   | 
featureType | 
 Type of feature to be calculated. Valid options are:   | 
minimumClusterSizePercent | 
 Minimum cluster size percent used to select clusters for analysis. See   | 
... | 
 Additional arguments passed to feature-type specific calculation functions.  | 
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.  | 
Robert Bruggner
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.