citrus.calculateFoldFeatureSet: Build cluster features for folds of clustering

Description Usage Arguments Value Author(s) Examples

View source: R/citrus.featureFunctions.R

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

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# 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)

junyzhou10/test documentation built on Nov. 4, 2019, 3:27 p.m.