tof_read_data: Read data from an .fcs/.csv file or a directory of .fcs/.csv...

View source: R/io.R

tof_read_dataR Documentation

Read data from an .fcs/.csv file or a directory of .fcs/.csv files.

Description

Read data from an .fcs/.csv file or a directory of .fcs/.csv files.

Usage

tof_read_data(path = NULL, sep = "|", panel_info = dplyr::tibble())

Arguments

path

A file path to a single file or to a directory of files. The only valid file types are .fcs files or .csv files containing high-dimensional cytometry data.

sep

Optional. A string to use to separate the antigen name and its associated metal in the column names of the output tibble. Defaults to "|". Only used if the input file is an .fcs file.

panel_info

Optional. A tibble or data.frame containing information about the panel used during high-dimensional cytometry data acquisition. Two columns are required: "metals" and "antigens". Only used if the input file is a .csv file.

Value

An [c by m+1] tibble in which each row represents a single cell (of c total in the dataset) and each column represents a high-dimensional cytometry measurement (of m total in the dataset). If more than one .fcs is read at once, the last column of the tibble ('file_name') will represent the file name of the .fcs file from which each cell was read.

See Also

Other input/output functions: tof_write_csv(), tof_write_data(), tof_write_fcs()

Examples


input_file <- dir(tidytof_example_data("aml"), full.names = TRUE)[[1]]
tof_read_data(input_file)


keyes-timothy/tidytof documentation built on May 7, 2024, 12:33 p.m.