Description Usage Arguments Examples
View source: R/nearestSamples.R
impute the gate (flagged as failure by external algorithm) with refGate from nearest neighbour sample
1 | nearestSamples(gs, node, failed, passed = NULL, ...)
|
gs |
a |
node |
a |
failed |
a |
passed |
a |
... |
other arguments passed to |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ## Not run:
library(flowWorkspace)
gs <- load_gs("gs-tcell/")
#Finding reference sample for: 1349_3_Tcell_A06.fcs
res <- nearestSamples(gs, node = "CD3", failed = "1349_3_Tcell_A06.fcs")
# res is a named vector stores the mapping between bad(failed) and good(reference) samples
#fix the gate for the bad samples
regateNearestSamples(gs, res, "CD3")
#run it on 2d gate and customize some parameters
#and enable parallel computing to speed it up
res <- nearestSamples(gs, node = "CD4", failed = "1349_3_Tcell_A06.fcs", gridsize = c(70, 70), mc.cores = 4)
#fix the 2d gate for the bad samples
regateNearestSamples(gs, res, "CD4")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.