fcs_get_keywords: Obtain keywords from a FCS file

View source: R/fcs_get_keywords.R

fcs_get_keywordsR Documentation

Obtain keywords from a FCS file

Description

The returned data frame can be used to filter for relevant keywords which may then be joined to the sampledescription. Note that if you have defined your keywords in flowjo you have to export the FCS files in order to hard-code the keyword into the FCS file. Otherwise it only exists in the flowjo workspace. In order to pull out keywords from flowjo wsx_get_keywords may be used.

Usage

fcs_get_keywords(file_path)

Arguments

file_path

path to the fcs file

Value

a data frame of keywords as columns and FCS files as rows

Examples

## Not run: 
# get FCS files in a folder
files <- list.files(FCS.files.folder, recursive = T, full.names = T)
# loop through files and extract keywords; only SPILL is
keys <- lapply(files, function(x) {
fcs_get_keywords(x)
})
# convert the lists of data frames to one wide data frame
keys <- tidyr::pivot_wider(do.call(rbind, keys), names_from = keyword, values_from = value)

## End(Not run)

Close-your-eyes/fcexpr documentation built on Sept. 29, 2023, 12:27 a.m.