Groups a vector of test column names into a named list, one entry per test family, suitable for driving per-family QQ panels.

group_glow_tests_by_family(
  tests,
  priority = c("SKAT", "Burden", "Fisher"),
  omni_last = TRUE,
  family_overrides = NULL
)

Arguments

tests

Character vector of test column names (typically grep("^GLOW_", names(df), value = TRUE), optionally augmented with non-GLOW tests such as "STAAR_O").

priority

Character vector giving the family-name priority for the leading panels. Default c("SKAT", "Burden", "Fisher").

omni_last

Logical. If TRUE (default), the "Omni" family is forced last.

family_overrides

Optional named character vector forwarded to glow_family_of. Example: c(STAAR_O = "Omni"). Default NULL requires every input to be a recognised GLOW_* name.

Value

Named list of character vectors. Names are family labels; each element holds the column names of that family.

Details

Family ordering: families in priority appear first in the listed order (only those actually present), then any remaining non-Omni families in alphabetical order, then the synthetic "Omni" family last when omni_last = TRUE (so it lands in a sensible position on a square panel grid). Within each family, columns retain their input order. The function errors if any input column does not resolve to a family (via the GLOW_* convention or family_overrides). Complexity is \(O(n)\) in length(tests).

See also

Examples

group_glow_tests_by_family(
  c("GLOW_SKAT_BE_N", "GLOW_Burden_equ", "GLOW_Fisher_equ", "GLOW_Omni"))
#> $SKAT
#> [1] "GLOW_SKAT_BE_N"
#> 
#> $Burden
#> [1] "GLOW_Burden_equ"
#> 
#> $Fisher
#> [1] "GLOW_Fisher_equ"
#> 
#> $Omni
#> [1] "GLOW_Omni"
#>