Learn R Programming

flowDensity (version 1.6.0)

nmRemove: Preprocessing helper function for flow cytometry data

Description

Remove the margin events on the axes. Usually, these events are considered as debris or artifacts. This is specifically useful for 'FSC' and 'SSC' channels in a 'FlowFrame' object. However, any channel can be input as an argument.

Usage

nmRemove(flow.frame, channels, neg=TRUE, talk=FALSE)

Arguments

flow.frame
a 'FlowFrame' object.
channels
a vector of channel names or their corresponding indices.
neg
if TRUE, negative events are also removed
talk
if TRUE, it prints the margin event in each channel

Value

a 'FlowFrame' object.

Examples

Run this code

data_dir <- system.file("extdata", package = "flowDensity")
load(list.files(pattern = 'sampleFCS_2', data_dir, full = TRUE))
#Removing margin events of FSC-A and SSC-A channels
no.margin <- nmRemove(f2, c("FSC-A","SSC-A"),talk=TRUE)
plotDens(f2, c("FSC-A","SSC-A"))
# Scatter plot of FSC-A vs. SSC-A after removing margins
plotDens(no.margin, c("FSC-A","SSC-A"))

Run the code above in your browser using DataLab