View source: R/preprocessing.R
tof_transform | R Documentation |
This function transforms a 'tof_tbl' of raw ion counts, reads, or fluorescence intensity units directly measured on a cytometer using a user-provided function.
tof_transform(
tof_tibble = NULL,
channel_cols = where(tof_is_numeric),
transform_fun
)
tof_tibble |
A 'tof_tbl' or a 'tibble'. |
channel_cols |
Unquoted column names representing columns that contain single-cell protein measurements. Supports tidyselect helpers. If nothing is specified, the default is to transform all numeric columns. |
transform_fun |
A vectorized function to apply to each protein value for variance stabilization. |
A 'tof_tbl' with identical dimensions to the input 'tof_tibble', with all columns specified in channel_cols transformed using 'transform_fun'.
# read in an example .fcs file from tidytof's internal datasets
input_file <- dir(tidytof_example_data("aml"), full.names = TRUE)[[1]]
tof_tibble <- tof_read_data(input_file)
# preprocess all numeric columns with default behavior
# arcsinh transformation with a cofactor of 5
tof_preprocess(tof_tibble)
# preprocess all numeric columns using the log base 10 tranformation
tof_preprocess(tof_tibble, transform_fun = log10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.