cyto_names_parse: Parse file names into experiment details

View source: R/cyto-helpers.R

cyto_names_parseR Documentation

Parse file names into experiment details

Description

Reward users that use consistent names for files by parsing file names into new variables and adding them to cyto_details. Variable construction may not be perfect if certain files are named differently, but it will give a starting point for editing these values using cyto_details_edit without having to manually enter a lot of these details.

Usage

cyto_names_parse(x, vars = NULL, split = "_", exclude = NULL, ...)

Arguments

x

object of class flowSet or GatingSet.

vars

vector containing the names of the variables to be added to cyto_details, set to var_1, var_2 ... by default.

split

delimiter to split the file name into fragments, set to "_" by default.

exclude

vector of indices indicating which text fragments should not be included in the experiment details, set to NULL by default.

...

additional arguments passed to strsplit.

Value

flowSet or GatingSet with cyto_details updated with new variables extracted from the file names.

Author(s)

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

library(CytoExploreRData)

# Parse file names to variables
fs <- cyto_names_parse(Activation,
vars = c("sample_type", "sample_id"),
split = "_")

# Updated experiment details
cyto_details(fs)


DillonHammill/CytoExploreR documentation built on March 2, 2023, 7:34 a.m.