
Wilcoxon rank-sum test for binary traits
scores.wilcox.test.RdPerforms a Wilcoxon rank-sum (Mann-Whitney U) test comparing scores between two levels of a binary clinical trait. Significant features are plotted as boxplots and saved to the "Results/" folder.
Arguments
- scores
A list whose first element is a samples x features score matrix, e.g. the output of
construct_cell_groups()orcompute.latent_factors(). To test a plain matrix, usescores.stat.analysis().- coldata
A data frame containing sample annotations and clinical traits.
- trait
Character. Name of the column in
coldataused as the binary grouping variable.- pval
Numeric. P-value threshold for significance (default = 0.05).