Uses singlecelljamboreeR rank_effects semantics (descending, average ties). Positive/negative inputs preserve original estimates; display selection filters sign explicitly. No probability or significance is implied.
Usage
rank_features(
fit,
factors = NULL,
direction = "absolute",
ties = "average",
representation = NULL
)Arguments
- fit
Native fit or a view from
standardize_factors().- factors
Optional character factor IDs. Default all.
- direction
"absolute"(default),"positive"or"negative": which effects are eligible.- ties
Only native average ties are supported.
- representation
For a native fit: a matched view or
standardize_factors()settings.
Details
Origin: ADAPTED / modified. Credits rank_effects; use factor_provenance("rank_features") for audited sources and runtime versions. Input units and basis are retained; display/conditional results do not establish biological replication.
Author
Peter Carbonetto; Matthew Stephens. Full source and dependency credits: https://github.com/mdmanurung/flashier-utils/blob/main/CREDITS.md.
Examples
if (FALSE) {
set.seed(3)
X <- tcrossprod(matrix(rnorm(48), 24, 2), matrix(rnorm(32), 16, 2)) +
matrix(rnorm(384, sd = 0.2), 24, 16)
dimnames(X) <- list(paste0("s", 1:24), paste0("g", 1:16))
fit <- fit_ebmf(X, "rows",
max_factors = 2, seed = 4, verbose = 0,
ebnm_fn = list(ebnm::ebnm_normal, ebnm::ebnm_point_laplace),
nullcheck = FALSE, backfit = TRUE, feature_scale = "simulated_centered_intensity"
)
view <- standardize_factors(fit)
head(rank_features(view, factors = "F1", direction = "absolute"))
}