This function removes the beads and debris from FCS files using trained classification models. It writes new FCS files with denoised data and also writes CSV files of the original data with the added columns of beads and debris that contains the classification information in case the user wants to explore the results.

rm_noise(
  file_type = ".fcs|.FCS",
  rm_beads = TRUE,
  rm_debris = TRUE,
  use.current.model.beads = TRUE,
  use.current.model.debris = TRUE,
  model_beads = model_beads,
  model_debris = model_debris,
  alg_db = "RF",
  alg_bd = "RF"
)

Arguments

file_type

A regular expression for the file extension. Only file names which match the regular expression will be returned. FCS only.

rm_beads

Logical. If TRUE beads are removed. Default is TRUE.

rm_debris

Logical. If TRUE debris is removed. Default is TRUE.

use.current.model.beads

Logical. If FALSE, an object of class train can be passed to the argument model_beads. Default is TRUE.

use.current.model.debris

Logical. If FALSE, an object of class train can be passed to the argument model_beads. Default is TRUE.

model_beads

Object of class train. Needed if use.current.model.beads is FALSE.

model_debris

Object of class train. Needed if use.current.model.debris is FALSE.

alg_db

A character vector with the name of the algorithm used to train model_beads. It can be 'RF' for Random Forest or 'XGB' for XGBoost.

alg_bd

A character vector with the name of the algorithm used to train model_beads. It can be 'RF' for Random Forest or 'XGB' for XGBoost.