trim.fcs: Trim .fcs files to remove debris and doublets.

Description Usage Arguments Value

View source: R/trimFlowFrames.R

Description

trim.fcs uses mixture models to cluster bacteria from background debris and fits a linear model to SSC-H vs SSC-A to remove doublets.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
trim.fcs(
  dir_path,
  pattern = "*.fcs",
  flu_channels = c("BL1-H"),
  do_plot = F,
  pre_cleaned = F,
  calibrate = F,
  MEF_peaks = NA,
  bead_dens_bw = 0.025,
  manual_peaks = NA
)

Arguments

dir_path

a directory path containing the .fcs files to be parsed or folders to be recursed through.

pattern

a regex pattern to match particular .fcs files. Default is "*.fcs" matching all .fcs files.

flu_channels

a list of strings of the fluorescence channels to keep in the trimmed data and plotting. Defaults to "BL1-H".

do_plot

a Boolean flag to determine whether to produce plots showing the trimming of each flowFrame. Defaults to FALSE.

pre_cleaned

have you pre removed background debris

calibrate

a Boolean flag to determine whether to convert fluorescence to MEF values. Requires an .fcs file with named "*beads*.fcs". Defaults to FALSE.

MEF_peaks

a list of lists in the form list(list(channel="BL1-H", peaks=c(0, 200, ...) of MEF fluorescence values for the calibration beads. Default values for BL1-H and YL2-H.

bead_dens_bw

the bandwidth for the kernel density of the bead peak data. Default = 0.025. Increase if erroneous peaks are being found, decrease if not enough peaks are found.

manual_peaks

if bead peaks are not being found by the EM algorithm, one can manually specify the positions of the bead peaks (on a log10 scale). A list of lists in the form list(list(channel="BL1-H", peaks=c(2.1, 2.8, ...) of log10 fluorescence values for the calibration beads.

Value

nothing is returned. A new folder is created with the trimmed .fcs files and plots if the do_plot flag is TRUE.


ucl-cssb/autoGate documentation built on Dec. 2, 2020, 4:05 p.m.