exportFdmatData: Export Fluorescence Distributions

View source: R/gen-functions.R

exportFdmatDataR Documentation

Export Fluorescence Distributions

Description

Export fluorescence distributions contained in the 'fdmat' object to file.

Usage

exportFdmatData(
  fdmat,
  expo.gate = ".",
  expo.name = ".",
  expo.type = ".",
  expo.folder = ".",
  verbose = "."
)

Arguments

fdmat

An object of class-fdmat as produced by makefdmat.

expo.gate

Which gate to export. NULL or numeric or character length one. Set to NULL to export data from all those gates defined in the gating strategy where 'keepData' is set to TRUE. Provide a character length one with a gate name or the number of that gate as defined in the gating strategy to export data from this gate only. If left at the default '.', the value as defined in the settings file (key 'dE_exportGate') will be used.

expo.name

Character length one. The name of the file holding the exported fluorescence distribution(s). If left at the default '.', the value as defined in the settings file (key 'fiN_dataExport') will be used.

expo.type

Character length one. The filetype of the data export. Possible values are 'csv' and 'xlsx'. If left at the default '.', the value as defined in the settings file (key 'dE_exportType') will be used.

expo.folder

Character length one. The name of the folder where exported data should reside. If left at the default '.', the value as defined in the settings file (key 'foN_rawData') will be used.

verbose

Logical. If status messages should be displayed. If left at the default '.', the value as defined in the settings file (key 'dV_verbose') will be used.

Details

If data are exported to xlsx, additional data like the metadata describing the parameters that lead to the calculation of the fluorescence distribution, the cyTags and the gating strategy are saved in an extra sheet as well. If exporting to csv, only the fluorescence data from one single gate can be exported.

Value

Invisible NULL; used for its side effects, i.e. to export the data contained in 'fdmat' to file.

See Also

Other Accessory functions: applyBandpass(), checkRepairFcsFiles(), cutFdmatToGate(), fd_load(), fd_save(), genfs(), repairSID(), repairVolumes()

Examples

td <- tempdir()
data_source <- "https://github.com/bpollner/data/raw/main/flowdex_examples/flowdex_examples.zip"
check_download_data(td, data_source)
exp_home <- paste0(td, "/flowdex_examples")
old_wd <- getwd()
setwd(exp_home)
#
assign("get_settings_from_flowdex_package_root", TRUE, pos=.GlobalEnv)
# only required to make the examples run automatically
# you should not call 'assign' if you run the examples manually
# the effect of setting 'get_settings_from_flowdex_package_root' to TRUE
# is that the file 'flowdex_settings.R' in 'root' of the installed package
# 'flowdex' will be sourced instead of the one in the user-defined location.
#
fdmat <- flowdexit()
exportFdmatData(fdmat)
#
fdmat <- flowdexit(gateStrat = "gateStrat_2")
exportFdmatData(fdmat, expo.gate = 2, expo.name="data_gate_highSSC_only")
#
setwd(old_wd)

bpollner/flowdex documentation built on March 31, 2022, 3:21 a.m.