Title: | Filtering of Flow Cytometry Samples |
---|---|
Description: | Filtering, also known as gating, of flow cytometry samples using the curvHDR method, which is described in Naumann, U., Luta, G. and Wand, M.P. (2010) <DOI:10.1186/1471-2105-11-44>. |
Authors: | Matt Wand [aut, cre], George Luta [aut], Ulrike Naumann [aut], Mathew W. McLean [ctb], Dai Feng [ctb], Luke Tierney [ctb], Florian Hahne [ctb] |
Maintainer: | Matt Wand <[email protected]> |
License: | GPL (>= 2) |
Version: | 1.2-2 |
Built: | 2024-11-02 04:43:10 UTC |
Source: | https://github.com/cran/curvHDR |
Filter univariate or bivariate data using the curvHDR method. The motivating application is flow cytometry, where the filters endeavour to mimic human-perceived gates.
curvHDRfilter(x, HDRlevel, growthFac = NULL, signifLevel = 0.05, bwFac = 1, gridsize = NULL, removeDebri = TRUE, minSampSize = NULL, HpiGridSize = NULL, quiet = TRUE, graphChk = FALSE)
curvHDRfilter(x, HDRlevel, growthFac = NULL, signifLevel = 0.05, bwFac = 1, gridsize = NULL, removeDebri = TRUE, minSampSize = NULL, HpiGridSize = NULL, quiet = TRUE, graphChk = FALSE)
x |
array containing the input data, typically corresponding
to flow cytometric
measurements. |
HDRlevel |
number between 0 and 1 corresponding to the level of the highest density region within each high curvature region. |
growthFac |
growth factor parameter. High curvature regions are grown
to have ‘volume’ |
signifLevel |
number between 0 and 1 corresponding to the
significance level for curve region determination. The default value
of |
bwFac |
bandwidth factor. The default bandwidth is multiplied
by |
gridsize |
vector of number of grid points in each direction |
removeDebri |
Boolean flag for removal of ‘debri’ points in the
input data. The default value of |
minSampSize |
curvHDR regions with less than |
HpiGridSize |
gridsize used for plug-in bandwidth
selection in the case where the input data
is trivariate. The default value of
|
quiet |
Boolean flag for ‘quiet’
running. If |
graphChk |
Boolean flag for graphical checking. If |
data |
the input data (for use in plotting). |
insideFilter |
logical variable indicating the rows of the input data matrix corresponding to points inside the curvHDR filter. |
polys |
the curvHDR filter. Depending on the dimension d this is a list of intervals (d=1), polygons (d=2) or polyhedra (d=3). |
HDRlevel |
highest density region level |
G. Luta, U. Naumann and M.P. Wand
Naumann, U., Luta, G. and Wand, M.P. (2009).
The curvHDR method for gating flow cytometry samples.
BMC Bioinformatics, 11:44, 1-13.
library(curvHDR) # Univariate curvHDR examples: xUniv <- c(rnorm(1000,-2),rnorm(1000,2)) gate1a <- curvHDRfilter(xUniv) plot(gate1a) print(gate1a$poly) # List of intervals that define gate1a. ## Not run: print(gate1a$insideFilter) # Indicators of inclusion of # xUniv inside gate1a. ## End(Not run) gate1b <- curvHDRfilter(xUniv,HDRlevel=0.5) plot(gate1b) print(gate1b$poly) # List of intervals that define gate1b. ## Not run: print(gate1b$insideFilter) # Indicators of inclusion of # xUniv inside gate1b. ## End(Not run) # Bivariate curvHDR examples: xBiva <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) ## Not run: gate2a <- curvHDRfilter(xBiva) plot(gate2a) print(gate2a$poly) # List of polygon vertices that define gate2a. print(gate2a$insideFilter) # Indicators of inclusion of # xBiva inside gate2a. ## End(Not run) ## Not run: gate2b <- curvHDRfilter(xBiva,HDRlevel=0.5) plot(gate2b) print(gate2b$poly) # List of polygon vertices that define gate2b. print(gate2b$insideFilter) # Indicators of inclusion of # xBiva inside gate2b. ## End(Not run) # Trivariate curvHDR examples: ## Not run: xTriv <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate3a <- curvHDRfilter(xTriv) plot(gate3a) print(gate3a$poly) # List of polyhedron elements that define gate3a. print(gate3a$insideFilter) # Indicators of inclusion of # xTriv inside gate3a. ## End(Not run) ## Not run: gate3b <- curvHDRfilter(xTriv,HDRlevel=0.5) plot(gate3b) print(gate3b$poly) # List of polyhedron elements that define gate3b. print(gate3b$insideFilter) # Indicators of inclusion of # xTriv inside gate3b. ## End(Not run)
library(curvHDR) # Univariate curvHDR examples: xUniv <- c(rnorm(1000,-2),rnorm(1000,2)) gate1a <- curvHDRfilter(xUniv) plot(gate1a) print(gate1a$poly) # List of intervals that define gate1a. ## Not run: print(gate1a$insideFilter) # Indicators of inclusion of # xUniv inside gate1a. ## End(Not run) gate1b <- curvHDRfilter(xUniv,HDRlevel=0.5) plot(gate1b) print(gate1b$poly) # List of intervals that define gate1b. ## Not run: print(gate1b$insideFilter) # Indicators of inclusion of # xUniv inside gate1b. ## End(Not run) # Bivariate curvHDR examples: xBiva <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) ## Not run: gate2a <- curvHDRfilter(xBiva) plot(gate2a) print(gate2a$poly) # List of polygon vertices that define gate2a. print(gate2a$insideFilter) # Indicators of inclusion of # xBiva inside gate2a. ## End(Not run) ## Not run: gate2b <- curvHDRfilter(xBiva,HDRlevel=0.5) plot(gate2b) print(gate2b$poly) # List of polygon vertices that define gate2b. print(gate2b$insideFilter) # Indicators of inclusion of # xBiva inside gate2b. ## End(Not run) # Trivariate curvHDR examples: ## Not run: xTriv <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate3a <- curvHDRfilter(xTriv) plot(gate3a) print(gate3a$poly) # List of polyhedron elements that define gate3a. print(gate3a$insideFilter) # Indicators of inclusion of # xTriv inside gate3a. ## End(Not run) ## Not run: gate3b <- curvHDRfilter(xTriv,HDRlevel=0.5) plot(gate3b) print(gate3b$poly) # List of polyhedron elements that define gate3b. print(gate3b$insideFilter) # Indicators of inclusion of # xTriv inside gate3b. ## End(Not run)
The vignette of the curvHDR package is displayed using the default PDF file browser. It provides a detailed detailed description of use of the package for gating flow cytometry data using the curvHDR method.
curvHDRvignette()
curvHDRvignette()
Matt Wand[email protected], G. Luta[email protected] and U. Naumann[email protected]
if(interactive()) { curvHDRvignette() }
if(interactive()) { curvHDRvignette() }
Takes an object of class curvHDR
,
produced by curvHDRfilter()
, and then plots
it together with (a subset of) the data.
## S3 method for class 'curvHDRfilter' plot(x,removeDebri=TRUE,pch=NULL,cex=NULL, bty=NULL,col=NULL,main=NULL,...)
## S3 method for class 'curvHDRfilter' plot(x,removeDebri=TRUE,pch=NULL,cex=NULL, bty=NULL,col=NULL,main=NULL,...)
x |
a fitted |
removeDebri |
Boolean flag for removal of ‘debri’ points in the
input data. The default value of |
pch |
Plotting character specification. |
cex |
Character expansion factor. |
bty |
Box-type for the plotting frame. |
col |
Colour of the points. |
main |
Main label on the plot. |
... |
Other graphical parameters. |
The function generates a plot.
G. Luta, U. Naumann and M.P. Wand
Naumann, U., Luta, G. and Wand, M.P. (2009).
The curvHDR method for gating flow cytometry samples.
BMC Bioinformatics, 11:44, 1-13.
library(curvHDR) # Univariate curvHDR example: xUniv <- c(rnorm(1000,-2),rnorm(1000,2)) gate1 <- curvHDRfilter(xUniv) plot(gate1) # Bivariate curvHDR example: xBiva <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate2 <- curvHDRfilter(xBiva) plot(gate2) # Trivariate curvHDR example: ## Not run: xTriv <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate3 <- curvHDRfilter(xTriv) plot(gate3) ## End(Not run)
library(curvHDR) # Univariate curvHDR example: xUniv <- c(rnorm(1000,-2),rnorm(1000,2)) gate1 <- curvHDRfilter(xUniv) plot(gate1) # Bivariate curvHDR example: xBiva <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate2 <- curvHDRfilter(xBiva) plot(gate2) # Trivariate curvHDR example: ## Not run: xTriv <- cbind(c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2)), c(rnorm(1000,-2),rnorm(1000,2))) gate3 <- curvHDRfilter(xTriv) plot(gate3) ## End(Not run)