curvHDRfilter: Filtering via the curvHDR method.

Description Usage Arguments Value Author(s) References See Also Examples

Description

Filter univariate or bivariate data using the curvHDR method. The motivating application is flow cytometry, where the filters endeavour to mimic human-perceived gates.

Usage

1
2
3
4
curvHDRfilter(x, HDRlevel, growthFac = NULL, signifLevel = 0.05,
              bwFac = 1, gridsize = NULL, removeDebri = TRUE,
              minSampSize = NULL, HpiGridSize = NULL, quiet = TRUE,
              graphChk = FALSE)

Arguments

x

array containing the input data, typically corresponding to flow cytometric measurements. x should either be a numerical vector (univariate input data) or a matrix or data frame having 1-3 columns.

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’ growthFac times larger than the original region.The default value of growthFac is 5^(d/2) where d is the dimension of the input data.

signifLevel

number between 0 and 1 corresponding to the significance level for curve region determination. The default value of signifLevel is 0.05.

bwFac

bandwidth factor. The default bandwidth is multiplied by bwFac. The default value of bwFac is 1.

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 removeDebri is true.

minSampSize

curvHDR regions with less than minSampSize are excluded. The default value of minSampSize is 50*(2^(d-1)) where d is the dimension of the input data.

HpiGridSize

gridsize used for plug-in bandwidth selection in the case where the input data is trivariate. The default value of HpiGridSize is rep(21,3).

quiet

Boolean flag for ‘quiet’ running. If quiet is FALSE then progress reports on during filter determination are given. The default value of quiet is TRUE

graphChk

Boolean flag for graphical checking. If graphChk is TRUE then graphical displays for each stage of the curvHDRfilter() are sent to the screen. At the first stage, the input data are plotted. Then the high negative curvature regions are shown in purple. This is followed by a display, in green, of the growthFac-magnifications of the convexified high negative curvature regions. The final gates, corresponding to highest density regions for each green region, are shown in blue. The default value of graphChk is FALSE

Value

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

Author(s)

G. Luta, U. Naumann and M.P. Wand

References

Naumann, U., Luta, G. and Wand, M.P. (2009).
The curvHDR method for gating flow cytometry samples.
BMC Bioinformatics, 11:44, 1-13.

See Also

plot.curvHDRfilter

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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)

curvHDR documentation built on May 2, 2019, 5:39 a.m.