get_top_omics_features: Extract the top-N most important omics features from a fitted...

View source: R/model_extractors.R

get_top_omics_featuresR Documentation

Extract the top-N most important omics features from a fitted LUCID model

Description

Reuses plot_cluster_omic_profile()'s own feature-ranking criterion (see its documentation for what "separation" means) rather than introducing a second ranking rule: this is the same score plot_cluster_omic_profile() sorts features by, just returned as data instead of a plot. One panel is produced per relevant unit – the whole omics matrix for early, one per layer for parallel, and for serial one per stage (or one per layer within a stage that is itself parallel).

Usage

get_top_omics_features(
  model,
  top_n = 10,
  importance = c("separation", "range", "sd")
)

Arguments

model

A fitted early_lucid, lucid_parallel, or lucid_serial object.

top_n

Number of top features to return per panel (default 10). If a panel has fewer features than top_n, all of them are returned.

importance

Ranking criterion: "separation" (between-cluster spread over within-cluster SD, the default), "range", or "sd" of the cluster means – identical meaning to plot_cluster_omic_profile()'s own importance argument.

Value

A named list, one entry per panel (layer/stage), each a named numeric vector of the top top_n features by importance, sorted descending.

Examples

idx <- 1:200
G <- sim_data$G[idx, ]
Z <- sim_data$Z[idx, ]
Y_normal <- sim_data$Y_normal[idx, ]
fit <- estimate_lucid(G = G, Z = Z, Y = Y_normal, lucid_model = "early",
                      family = "normal", K = 2,
                      max_itr = 10, max_tot.itr = 30)
get_top_omics_features(fit, top_n = 3)

LUCIDus documentation built on Sept. 3, 2026, 1:06 a.m.