Learn R Programming

cyanoFilter (version 0.1.3)

cellmargin: Removes or assign indicators to margin events.

Description

The function identifies margin events, i.e. cells that are too large for the flow cytometer to measure.

Usage

cellmargin(flow.frame, Channel = "SSC.W", type = c("manual",
  "estimate"), cut = NULL, y_toplot = "FSC,HLin")

Arguments

flow.frame

Flowframe containing margin events to be filtered out

Channel

The channel on which margin events are. Defaults to SSC.W (side scatter width)

type

The method to be used in gating out the margin cells. Can either be 'manual' where user supplies a cut off point on the channel, 1 = not margin 0 = margin

cut

sould not be NULL if type = 'manual'

y_toplot

channel on y-axis of plot with Channel used to gate out margin events

Value

list containing;

  • reducedflowframe - flowframe without margin events

  • fullflowframe - flowframe with an Margin.Indicator added as an extra column added to the expression matrix to indicate which particles are margin events. 1 = not margin event, 0 = margin event

  • N_margin - number of margin events recorded

  • N_cell - numner of non-margin events

  • N_particle - is the number of particles in total, i.e. N_cell + N_margin

Details

Users can either supply a cut-off point along the channel describing particle width or allow the function to estimate the cut-off point using the deGate function from the flowDensity package. A plot of channel against "FSC.HLin" is provided with a vertical line showing the cut-off point separating margin events from other cells.

Examples

Run this code
# NOT RUN {
flowfile_path <- system.file("extdata", "B4_18_1.fcs", package = "cyanoFilter",
              mustWork = TRUE)
flowfile <- flowCore::read.FCS(flowfile_path, alter.names = TRUE,
                               transformation = FALSE, emptyValue = FALSE,
                               dataset = 1) #FCS file contains only one data object
flowfile_nona <- cyanoFilter::nona(x = flowfile)
flowfile_noneg <- cyanoFilter::noneg(x = flowfile_nona)
flowfile_logtrans <- lnTrans(x = flowfile_noneg, c('SSC.W', 'TIME'))
cellmargin(flow.frame = flowfile_logtrans, Channel = 'SSC.W',
           type = 'estimate', y_toplot = "FSC.HLin")


# }

Run the code above in your browser using DataLab