wsx_get_popstats: Import data from a wsp file

View source: R/wsx_get_popstats.R

wsx_get_popstatsR Documentation

Import data from a wsp file

Description

Flowjo wsp files contain many information like gated event counts, statistics and keywords from FCS files. These may be accessed without a dongle and can be read completely independent of the respective FCS files once the gating has been conducted.

Usage

wsx_get_popstats(
  ws,
  groups = NULL,
  invert_groups = F,
  return_stats = T,
  lapply_fun = lapply,
  strip_data = T,
  ...
)

Arguments

ws

path to flowjo workspace or a parsed xml-document (xml2::read_xml(ws))

groups

vector of flowjo group names to consider

invert_groups

logical whether to exclude the selected groups

return_stats

logical (T,F) whether to return statistics next to cells counts

lapply_fun

function name without quotes; lapply, pbapply::pblapply or parallel::mclapply are suggested

...

additional argument to the lapply function; mainly mc.cores when parallel::mclapply is chosen

Value

data frame with cells counts or a list with counts and statistics if return_stats = T

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(path = wd, pattern = '\\.wsp$', recursive = T, full.names = T)
# import the population counts:
wsx_get_popstats(ws = ws[[1]])

## End(Not run)

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