Perform Timer Transformation on Flow Cytometry Data
Source:R/TockyDataPreprocessing.R
timer_transform.Rd
This function processes flow cytometry data by applying Timer thrsholding, normalization, and trigonometric transformation to the Blue and Red fluorescence data.
Usage
timer_transform(
prep,
select = TRUE,
blue_channel = NULL,
red_channel = NULL,
normalization_method = "MAD",
red_threshold = NULL,
blue_threshold = NULL,
interactive_gating = FALSE,
verbose = TRUE,
q = 0.998,
normalization = TRUE
)
Arguments
- prep
A list containing file paths and variables, typically the output from
prep_tocky
.- select
Logical indicating whether to choose Timer fluorescence channels interactively. Default is `TRUE`.
- blue_channel
Character string specifying the Blue fluorescence channel name. If `NULL`, the function attempts to determine it automatically.
- red_channel
Character string specifying the Red fluorescence channel name. If `NULL`, the function attempts to determine it automatically.
- normalization_method
Charcter string specifying the normalization method to be applied to Timer flfuorescence Default is `MAD`. The alternative is `SD`.
- red_threshold
Numeric specifying the Red channel gating threshold. If `NULL`, gating is performed automatically or interactively based on `interactive_gating`.
- blue_threshold
Numeric specifying the Blue channel gating threshold. If `NULL`, gating is performed automatically or interactively based on `interactive_gating`.
- interactive_gating
Logical indicating whether to perform interactive gating when thresholds are not provided. Default is `FALSE`.
- verbose
Logical indicating whether to print progress messages. Default is `TRUE`.
- q
Quantile value used for automatic Timer thresholds. Default is 0.998.
- normalization
Logical indicating whether to apply Timer fluorescence normalization. Default is `TRUE`.
Value
The function returns a new TockyPrepData object containing:
Data
: Data frame with angle, intensity, and other variables.normalization_parameters
: List with normalization values and coefficients.cell_counts
: Data frame with cell counts for each sample.sampledef
: Data frame with sample file names and placeholder group column.