
Kruskal-Wallis test for multi-group comparisons
scores.kruskal.test.RdPerforms a Kruskal-Wallis test to compare scores across multiple trait levels. Significant results are visualized as annotated boxplots with Dunn post-hoc tests.
Arguments
- scores
A list, NMF output from
compute.latent_factors(), or a score matrix. When a list, the first element must be a samples x features score matrix.- coldata
A data frame containing sample annotations, including the grouping trait.
- trait
Character. Name of the column in
coldataused as the grouping variable.- pval
Numeric. P-value threshold for significance (default = 0.05).