cytofin_prep_anchors: Prepare CyTOF controls for batch normalization across plates

Description Usage Arguments Value

View source: R/cytofin_prep_anchors.R

Description

This function calculates reference statistics needed for CytofIn batch normalization. Specifically, it calculates the universal mean and universal variance vectors of the generalized anchors identified in the metadata file at metadata_path; in addition, it calculates the non-channel-specific bulk mean and bulk variance of the generalized anchors.

Usage

1
2
3
4
5
6
7
8
9
cytofin_prep_anchors(
  metadata_path,
  panel_path,
  input_data_path,
  input_prefix = "homogenized_",
  output_path = "none",
  shift_factor = 0,
  scale_factor = 0.2
)

Arguments

metadata_path

A file path leading to an .xlsx or .csv file containing a table of CyTOF file (.fcs file) names. Columns should include filename, cohort, plate_number, patient_id, condition, population, and validation.

See the vignette for details: vignette("help", package = "cytofin")

panel_path

A file path leading to an .xlsx or .csv file containing a table of standardized antigen panel information. Columns should include metal_name, antigen_name, antigen_pattern, lineage, functional, and general.

See the vignette for details: vignette("help", package = "cytofin")

input_data_path

A folder directory containing the input CyTOF files to be prepped for normalization. These files should already be homogenized, and in most cases this will be the directory to which the output .fcs files from cytofin_homogenize were written.

input_prefix

The string that was appended to the name of the input files of cytofin_homogenize to create their corresponding output file names. Defaults to "homogenized_".

output_path

A file path specifying where to save the output .rds file containing the statistics calculated from this step and the concatenated .FCS files containing all cells from the generalized anchor samples. Defaults to "none", in which case no files are saved.

shift_factor

The scalar value a in the following equation used to transform CyTOF raw data ion counts using the hyperbolic arc-sine function:

new_x <- asinh(a + b*x).

Defaults to 0.

scale_factor

The scalar value b in the following equation used to transform CyTOF raw data ion counts using the hyperbolic arc-sine function:

new_x <- asinh(a + b*x).

Defaults to 0.2.

Value

a list() of summary statistics with the following elements:


bennyyclo/Cytofin documentation built on July 18, 2021, 8:16 a.m.