Internal function to map bins by KNN

Share:

Description

Internal function to map bins by KNN

Arguments

object

flowSample to map the bins of

tube.1.labels

integer vector of bin labels for the events in tube 1

n.neighbours=1

number of neighbours to use for KNN mapping of bins from clustered tube

snow.cluster=NULL

Optional snow cluster to use for parallel execution.

dequant=T

If TRUE, adds a small (region of 1e-8) value to flow data to help break ties when binning.

Details

Takes a FlowSample and labels for the events in tube 1, and maps these to all other tubes.

Value

a BinnedFlowSample

Examples

1
2
3
4
5
6
7
8
data(amlsample)
tube1.expr <- exprs(tube.set(aml.sample)[[1]])
kmeans.res <- kmeans(tube1.expr, 100)
kmeans.labels <- kmeans.res$cluster

#Now create a binnedFlowExprSet using the cluster labels for tube 1
clustered.sample <- mapBinsKNN(aml.sample, kmeans.labels)
sort(table(bin.labels(clustered.sample)[[3]]))