-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcurv2Filter-class.Rd
181 lines (117 loc) · 4.54 KB
/
curv2Filter-class.Rd
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
\name{curv2Filter-class}
\docType{class}
\alias{curv2Filter-class}
\alias{curv2Filter}
\alias{show,curv2Filter-method}
\alias{\%in\%,flowFrame,curv2Filter-method}
\alias{summarizeFilter,multipleFilterResult,curv2Filter-method}
\title{Class "curv2Filter"}
\description{
Class and constructor for data-driven \code{\link{filter}} objects
that selects high-density regions in two dimensions.
}
\section{Extends}{
Class \code{"\linkS4class{parameterFilter}"}, directly.
Class \code{"\linkS4class{concreteFilter}"}, by class
\code{parameterFilter}, distance 2.
Class \code{"\linkS4class{filter}"}, by class \code{parameterFilter},
distance 3.
}
\section{Slots}{
\describe{
\item{\code{bwFac}:}{Object of class \code{"numeric"}. The bandwidth
factor used for smoothing of the density estimate. }
\item{\code{gridsize}:}{Object of class \code{"numeric"}. The size
of the bins used for density estimation. }
\item{\code{parameters}:}{Object of class \code{"character"},
describing the parameters used to filter the \code{flowFrame}. }
\item{\code{filterId}:}{Object of class \code{"character"},
referencing the filter.}
}
}
\section{Objects from the Class}{
Objects can be created by calls of the form \code{new("curv2Filter",
...)} or using the constructor \code{curv2Filter}. The constructor
is the recommended way of object instantiation:
}
\usage{
curv2Filter(x, y, filterId="defaultCurv2Filter", bwFac=1.2,
gridsize=rep(151, 2))
}
\arguments{
\item{x,y}{ Characters giving the names of the measurement parameter
on which the filter is supposed to work on. \code{y} can be missing
in which case \code{x} is expected to be a character vector of
length 2 or a list of characters. }
\item{filterId}{ An optional parameter that sets the \code{filterId}
slot of this filter. The object can later be identified by this
name.}
\item{bwFac, gridsize}{ Numerics of length 1 and 2, respectively, used
to set the \code{bwFac} and \code{gridsize} slots of the object. }
}
\value{
Returns a \code{\link{curv2Filter}} object for use in filtering
\code{\link{flowFrame}}s or other flow cytometry objects.
}
\section{Methods}{
\describe{
\item{\%in\%}{\code{signature(x = "flowFrame", table =
"curv2Filter")}: The workhorse used to evaluate the filter on
data. This is usually not called directly by the user, but
internally by calls to the \code{\link{filter}} methods. }
\item{show}{\code{signature(object = "curv2Filter")}: Print
information about the filter. }
}
}
\details{
Areas of high local density in two dimensions are identified by
detecting significant curvature regions. See \cite{Duong, T. and
Cowling, A. and Koch, I. and Wand, M.P., Computational Statistics and
Data Analysis 52/9, 2008} for details. The constructor
\code{curv2Filter} is a convenience function for object
instantiation. Evaluating a \code{curv2Filter} results in potentially
multiple sub-populations, an hence in an object of class
\code{\link{multipleFilterResult}}. Accordingly, \code{curv2Filters}
can be used to split flow cytometry data sets.
}
\note{
See the documentation in the
\code{\link[flowViz:flowViz-package]{flowViz}} package for plotting of
\code{curv2Filters}.
}
\author{ Florian Hahne }
\seealso{
\code{\link[flowStats:curv1Filter-class]{curv1Filter}},
\code{\link{flowFrame}},
\code{\link{flowSet}}, \code{\link[flowCore:filter-methods]{filter}}
for evaluation
of \code{curv2Filters} and \code{\link{split}} for splitting of flow
cytometry data sets based on that.
}
\examples{
library(flowCore)
## Loading example data
dat <- read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))
## Create directly. Most likely from a command line
curv2Filter("FSC-H", "SSC-H", filterId="myCurv2Filter")
## To facilitate programmatic construction we also have the following
c2f <- curv2Filter(filterId="myCurv2Filter", x=list("FSC-H", "SSC-H"),
bwFac=2)
c2f <- curv2Filter(filterId="myCurv2Filter", x=c("FSC-H", "SSC-H"),
bwFac=2)
## Filtering using curv2Filter
fres <- filter(dat, c2f)
fres
summary(fres)
names(fres)
## The result of curv2 filtering are multiple sub-populations
## and we can split our data set accordingly
split(dat, fres)
## We can limit the splitting to one or several sub-populations
split(dat, fres, population="rest")
split(dat, fres, population=list(keep=c("area 2", "area 3")))
curv2Filter("FSC-H", "SSC-H", filterId="test filter")
}
\keyword{classes}
\keyword{methods}