getPeaks {flowDensity}R Documentation

Finding Peaks

Description

Find all peaks in density along with their indices

Usage

getPeaks(obj, channel,tinypeak.removal=1/25, adjust.dens=1,node=NA,verbose=F,...)

Arguments

obj

a 'FlowFrame', 'GatingHierarchy', 'CellPopulation' a density object or a numeric vector of density.

channel

a channel's name or its corresponding index. If the input is numeric vector, channel is NA.

tinypeak.removal

A number in [0,1] to exclude/include tiny peaks in density distribution. Default is 1/25.

adjust.dens

The smoothness of density in [0,Inf] to be used in density(.). The default value is 1 and should not be changed unless necessary

node

Chareacter for the parent population if passing GatingHierarchy object.

verbose

If TRUE, printing warnings.

...

Arguments passed to smoothSpline function, spar is 0.4.

Value

a list, including peaks, their corresponding indices and height.

Author(s)

Mehrnoush Malek <mmalekes@bccrc.ca>

See Also

deGate notSubFrame flowDensity

Examples


data_dir <- system.file("extdata", package = "flowDensity")
load(list.files(pattern = 'sampleFCS_1', data_dir, full = TRUE))
#Find the threshold for CD20
peaks <- getPeaks(f,channel="PerCP-Cy5-5-A",tinypeak.removal=1/30)
peaks

[Package flowDensity version 1.14.0 Index]