Skip to contents

Constructs a string that represents a combination of markers and their states (negative or positive). This function appends ".neg" or ".pos" to each marker based on the state provided in `marker_states`. The function returns a single string with these names concatenated, separated by underscores. If no markers are specified as included (non-empty), it returns "all_unassigned".

Usage

generate_marker_names(marker_states, markers)

Arguments

marker_states

A numeric vector indicating the state of each marker where 1 represents negative (".neg") and 2 represents positive (".pos").

markers

A character vector of marker names corresponding to the states in `marker_states`.

Value

A character string of concatenated marker names with their states. If no markers are specified, returns "all_unassigned".

Examples

if (FALSE) { # \dontrun{
markers <- c("CD4", "CD8", "CD19")
states <- c(1, 2, 0)  # CD4.neg, CD8.pos, CD19 not included
generate_marker_names(states, markers)
} # }