get_sample: Read an FCS File and Do Some Processing

View source: R/ff_importutils.R

get_sampleR Documentation

Read an FCS File and Do Some Processing

Description

Read a FCS file using read.FCS and return a flowFrame. Along the way, optionally apply compensation, transformation, removal of 'rail' events, and apply some parameter renaming for convenience and nice pictures.

Usage

get_sample(
  fn,
  compensate = TRUE,
  spill_matrix = NULL,
  transform = TRUE,
  transform.method = c("biexp", "asinh", "log"),
  a = 0.002,
  cofactor = 5,
  derail = TRUE,
  nice.names = TRUE,
  verbose = FALSE
)

Arguments

fn

The fully qualified FCS filename

compensate

Logical, apply compensation

spill_matrix

Default NULL applies the SPILL matrix provided in the header of the input file. Provide a SPILL matrix of your own, if desired. Be careful that the column labels are consistent with the parameter labeling in the corresponding input file.

transform

Logical, apply linear transformation to scattering parameters and biexponential transformation to fluorescence parameters. If TRUE, transform.method specifies which non-linear transformation and its associated adjustable parameter (e.g. a, cofactor) is to be applied to non-scattering (e.g. fluorescence) parameters, in which case. See documentation for doTransform for further details.

transform.method

Non-linear method to be applied. Default = biexp.

a

The adjustable parameter for the biexp transformation (ignored unless transform.method = biexp)

cofactor

The adjustable parameter for the asinh transformation (ignored unless transform.method = asinh)

derail

Logical, get rid of events on the FSC-A and SSC-A positive axes

nice.names

Logical, swap 'desc' for 'name' in the flowFrame

verbose

Logical, report progress on the console

Details

This function is a convenience wrapper to apply commonly used processing steps as FCS data are read in. It's often important that all files in a project get processed identically. Consolidating most of the steps in one function helps us avoid mistakes.

Value

A flowFrame, properly processed.


rogerswt/wadeTools documentation built on Feb. 16, 2023, 7:47 a.m.