mapBinsKNN: Internal function to map bins by KNN

Description Arguments Details Value Examples

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]]))

Example output

Loading required package: flowCore
Loading required package: flowFP
Loading required package: flowViz
Loading required package: lattice

 36  73  67  33  75  44   2  24  47  59  81  82  11  53  70  95  43  79  30  52 
  1   2   3   6   6   7   8   8   8   8   9   9  10  10  10  10  11  11  12  12 
 89  92  26  38  55  56  57   5  10  16  18  22  68  31  35  58  94  20  45  48 
 12  12  13  13  13  13  13  14  14  14  14  14  14  15  15  15  15  16  16  16 
 87  25  66   8  27  78  93   1   3  49  69  84  62  72   4  13  37  50  51   7 
 16  17  17  18  18  18  18  19  19  19  19  19  20  20  21  21  21  21  21  22 
 17  41  61  64  90  42  86  19  28  91  98  40  96  97  21  63 100   9  71  83 
 22  22  22  22  22  23  24  25  25  25  25  26  26  26  27  27  27  28  28  28 
 88  65  85  15  60  12  34  14  23  80  99  46  76  54  74  29  32  39  77   6 
 28  29  29  30  30  31  31  32  32  33  33  34  34  36  37  38  38  38  40  41 

flowBin documentation built on Nov. 8, 2020, 8:25 p.m.