
Rust version of the singscore permutation test
rs_singscore_permutation_test.Rd
For
n_permutations iterations, draws random gene indices of the same
total size as the real gene set(s), scores them with the same options as
the real call, and builds a per-sample null distribution. Returns empirical
one-tailed p-values: max(1 / n_permutations, mean(null > observed)).
Usage
rs_singscore_permutation_test(
ranks,
up_set,
down_set,
center_score,
known_direction,
stable,
n_permutations,
seed
)Arguments
- ranks
Numerical matrix. The ranked expression matrix.
- up_set
Integer vector. One-indexed (shifted internally).
- down_set
Integer vector or NULL. One-indexed (shifted internally).
- center_score, known_direction, stable
Booleans. Should match the values used for the real
rs_singscore_single()call.- n_permutations
Integer. Number of random draws (B).
- seed
Integer. RNG seed.