fcs_get_voltages: Obtain PMT-voltages from a FCS file

View source: R/fcs_get_voltages.R

fcs_get_voltagesR Documentation

Obtain PMT-voltages from a FCS file

Description

If there is a large number of fcs files and one wants to make sure that all files have been acquired with the same settings this functions may help by retrieving the voltage of PMTs.

Usage

fcs_get_voltages(file_path)

Arguments

file_path

path to the fcs file

Value

a data.frame with different columns depending on the machine the fcs was acquired with; usually the 'V'-column indicates PMT voltages

Examples

## Not run: 
# When the script is saved to R_scripts in the experiment folder,
get the absolute path to the folder
wd <- dirname(dirname(rstudioapi::getActiveDocumentContext()$path))
# Find workspaces
ws <- list.files(wd, pattern = '\\.wsp$', recursive = T, full.names = T)
# pull out paths to fcs files, optionally filter for relevant groups or so
paths <- wsx_get_fcs_paths(ws[1])
# iterate (loop) through the paths to get the voltage of each fcs file
volts <- do.call(rbind, lapply(paths, function(x) {
v <- voltage_from_fcs(x)
v$file <- basename(x)
return(v)
}))

## End(Not run)

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