Character giving the name of the measurement parameter on
which the filter is supposed to work on. This can also be a list
containing a single character scalar for programmatic access.
filterId
An optional parameter that sets the filterId
slot of this filter. The object can later be identified by this
name.
bwFac, gridsize
Numerics of length 1 and 2, respectively, used
to set the bwFac and gridsize slots of the object.
Details
Areas of high local density in one dimensions are identified by
detecting significant curvature regions. See Duong, T. and
Cowling, A. and Koch, I. and Wand, M.P., Computational Statistics and
Data Analysis 52/9, 2008 for details. The constructor
curv1Filter is a convenience function for object
instantiation. Evaluating a curv1Filter results in potentially
multiple sub-populations, an hence in an object of class
multipleFilterResult. Accordingly, curv1Filters
can be used to split flow cytometry data sets.
Value
Returns a curv1Filter object for use in filtering
flowFrames or other flow cytometry objects.
Extends
Class "parameterFilter", directly.
Class "concreteFilter", by class
parameterFilter, distance 2.
Class "filter", by class parameterFilter,
distance 3.
Slots
bwFac:
Object of class "numeric". The bandwidth
factor used for smoothing of the density estimate.
gridsize:
Object of class "numeric". The size
of the bins used for density estimation.
parameters:
Object of class "character",
describing the parameter used to filter the flowFrame.
filterId:
Object of class "character",
referencing the filter.
Objects from the Class
Objects can be created by calls of the form new("curvFilter",
...) or using the constructor curv1Filter. Using the
constructor is the recommended way of object instantiation:
Methods
%in%
signature(x = "flowFrame", table =
"curv1Filter"): The workhorse used to evaluate the filter on
data. This is usually not called directly by the user, but
internally by calls to the filter methods.
show
signature(object = "curv1Filter"): Print
information about the filter.
Note
See the documentation in the
flowViz package for plotting of
curv1Filters.
Author(s)
Florian Hahne
See Also
curv2Filter,
flowFrame, flowSet,
filter for evaluation
of curv1Filters and split for splitting of flow
cytometry data sets based on that.
Examples
library(flowStats)
## Loading example data
dat <- read.FCS(system.file("extdata","0877408774.B08",
package="flowCore"))
## Create directly. Most likely from a command line
curv1Filter("FSC-H", filterId="myCurv1Filter", bwFac=2)
## To facilitate programmatic construction we also have the following
c1f <- curv1Filter(filterId="myCurv1Filter", x=list("FSC-H"), bwFac=2)
## Filtering using curv1Filter
fres <- filter(dat, c1f)
fres
summary(fres)
names(fres)
## The result of curv1 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("peak 2", "peak 3")))
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(flowStats)
Loading required package: flowCore
Loading required package: fda
Loading required package: splines
Loading required package: Matrix
Attaching package: 'Matrix'
The following object is masked from 'package:flowCore':
%&%
Attaching package: 'fda'
The following object is masked from 'package:graphics':
matplot
Loading required package: mvoutlier
Loading required package: sgeostat
sROC 0.1-2 loaded
Loading required package: cluster
Loading required package: flowWorkspace
Loading required package: flowViz
Loading required package: lattice
Loading required package: ncdfFlow
Loading required package: RcppArmadillo
Loading required package: BH
Loading required package: gridExtra
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/flowStats/curv1Filter-class.Rd_%03d_medium.png", width=480, height=480)
> ### Name: curv1Filter-class
> ### Title: Class "curv1Filter"
> ### Aliases: curv1Filter-class curv1Filter show,curv1Filter-method
> ### %in%,flowFrame,curv1Filter-method
> ### summarizeFilter,multipleFilterResult,curv1Filter-method
> ### Keywords: classes methods
>
> ### ** Examples
>
>
> library(flowStats)
> ## Loading example data
> dat <- read.FCS(system.file("extdata","0877408774.B08",
+ package="flowCore"))
>
> ## Create directly. Most likely from a command line
> curv1Filter("FSC-H", filterId="myCurv1Filter", bwFac=2)
1D curvature filter 'myCurv1Filter' in dimension FSC-H
with settings:
bwFac=2
gridsize=401,401
>
> ## To facilitate programmatic construction we also have the following
> c1f <- curv1Filter(filterId="myCurv1Filter", x=list("FSC-H"), bwFac=2)
>
> ## Filtering using curv1Filter
> fres <- filter(dat, c1f)
> fres
A filterResult produced by the filter named 'myCurv1Filter'
resulting in multiple populations:
rest
peak 1
peak 2
peak 3
peak 4
> summary(fres)
rest: 3581 of 10000 events (35.81%)
peak 1: 331 of 10000 events (3.31%)
peak 2: 5575 of 10000 events (55.75%)
peak 3: 455 of 10000 events (4.55%)
peak 4: 58 of 10000 events (0.58%)
> names(fres)
[1] "rest" "peak 1" "peak 2" "peak 3" "peak 4"
>
> ## The result of curv1 filtering are multiple sub-populations
> ## and we can split our data set accordingly
> split(dat, fres)
$rest
flowFrame object '0877408774.B08 (rest)'
with 3581 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
$`peak 1`
flowFrame object '0877408774.B08 (peak 1)'
with 331 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
$`peak 2`
flowFrame object '0877408774.B08 (peak 2)'
with 5575 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
$`peak 3`
flowFrame object '0877408774.B08 (peak 3)'
with 455 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
$`peak 4`
flowFrame object '0877408774.B08 (peak 4)'
with 58 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
>
> ## We can limit the splitting to one or several sub-populations
> split(dat, fres, population="rest")
$rest
flowFrame object '0877408774.B08 (rest)'
with 3581 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
165 keywords are stored in the 'description' slot
> split(dat, fres, population=list(keep=c("peak 2", "peak 3")))
$keep
flowFrame object '0877408774.B08 (peak 2,peak 3)'
with 6030 cells and 8 observables:
name desc range minRange maxRange
$P1 FSC-H FSC-H 1024 0 1023
$P2 SSC-H SSC-H 1024 0 1023
$P3 FL1-H <NA> 1024 1 10000
$P4 FL2-H <NA> 1024 1 10000
$P5 FL3-H <NA> 1024 1 10000
$P6 FL1-A <NA> 1024 0 1023
$P7 FL4-H <NA> 1024 1 10000
$P8 Time Time (51.20 sec.) 1024 0 1023
3 keywords are stored in the 'description' slot
>
>
>
>
>
>
> dev.off()
null device
1
>