fg_gsub_ids: Replace sample id's.

View source: R/01_flowgraph_modifiers.R

fg_gsub_idsR Documentation

Replace sample id's.

Description

Replace sample id's in a flowGraph object.

Usage

fg_gsub_ids(fg, ids_new, ids_old = NULL)

Arguments

fg

flowGraph object.

ids_new

A string vector of new sample id's; if ids_old is set to NULL, each id in ids_new should correspond to each id in fg_get_meta(fg)$id.

ids_old

A string vector of old sample id's the user wants to replace; these marker names corresponding to those in fg_get_meta(fg)$id with the same length as ids_new. If ids_old=NULL, ids_new should be the same length as fg_get_meta(fg)$id.

Value

flowGraph object with sample id's replaced.

See Also

flowGraph-class fg_get_feature_desc fg_gsub_markers

Examples


 no_cores <- 1
 data(fg_data_pos30)
 fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
                 prop=FALSE, specenr=FALSE,
                 no_cores=no_cores)

 fg <- fg_gsub_ids(fg, ids_new=paste0(fg_get_meta(fg)$id, "_new"))


aya49/flowGraph documentation built on Feb. 4, 2024, 6:40 p.m.