Vectorised classifier mapping test column names to test families. By convention a name of the form GLOW_<Family>_<scheme>... resolves to <Family> (the first token after the GLOW_ prefix), e.g. GLOW_SKAT_BE_N -> "SKAT", GLOW_Burden_equ -> "Burden", GLOW_Fisher_APR_sparse -> "Fisher". The three omnibus columns (GLOW_BSF_Omni, GLOW_SNV_CCT, GLOW_Omni) are bucketed into the synthetic "Omni" family.

glow_family_of(names, family_overrides = NULL)

Arguments

names

Character vector of test column names.

family_overrides

Optional named character vector mapping a non-GLOW test name (names of the vector) to a family label (values). Example: c(STAAR_O = "Omni") routes STAAR_O into the Omni family. Default NULL preserves the base contract (non-GLOW names resolve to NA).

Value

Character vector of family labels, the same length as names.

Details

Non-GLOW_* names resolve to NA unless mapped by family_overrides, so callers can detect typos (an NA return for an expected test name flags a name that matched no rule). The function is fully vectorised; complexity is \(O(n)\) in length(names).

Examples

glow_family_of(c("GLOW_SKAT_BE_N", "GLOW_Burden_equ", "GLOW_Omni"))
#> [1] "SKAT"   "Burden" "Omni"  
glow_family_of("STAAR_O", family_overrides = c(STAAR_O = "Omni"))
#> [1] "Omni"