Skip to contents

Performs Kruskal-Wallis rank-sum test for equality.

Usage

perform_kruskal_wallis(
  object,
  formula_char,
  all_features = FALSE,
  assay.type = NULL
)

Arguments

object

a SummarizedExperiment or MetaboSet object

formula_char

character, the formula to be used in the linear model (see Details)

all_features

should all features be included in FDR correction?

assay.type

character, assay to be used in case of multiple assays

Value

A data frame with the results.

Details

The model is fit on combined_data(object). Thus, column names in pheno data can be specified. To make the formulas flexible, the word "Feature" must be used to signal the role of the features in the formula. "Feature" will be replaced by the actual Feature IDs during model fitting. For example, if testing for equality of means in study groups, use "Feature ~ Group".

See also

Examples

data(example_set)
perform_kruskal_wallis(example_set, formula_char = "Feature ~ Group")
#> INFO [2025-06-23 22:37:25] Starting Kruskal-Wallis tests.
#> INFO [2025-06-23 22:37:26] Kruskal-Wallis tests performed.
#>                                          Feature_ID  Kruskal_P Kruskal_P_FDR
#> HILIC_neg_259_9623a4_4322 HILIC_neg_259_9623a4_4322 0.59642299     0.9791248
#> HILIC_neg_108_1065a2_6121 HILIC_neg_108_1065a2_6121 0.79906451     0.9791248
#> HILIC_neg_158_23a1_4128     HILIC_neg_158_23a1_4128 0.34642917     0.9791248
#> HILIC_neg_251_0056a0_6161 HILIC_neg_251_0056a0_6161 0.53453632     0.9791248
#> HILIC_neg_401_52a4_211       HILIC_neg_401_52a4_211 0.46971718     0.9791248
#> HILIC_neg_400_7045a5_3842 HILIC_neg_400_7045a5_3842 0.26447193     0.9791248
#> HILIC_neg_304_014a7_1311   HILIC_neg_304_014a7_1311 0.18838827     0.9791248
#> HILIC_neg_276_6328a2_7734 HILIC_neg_276_6328a2_7734 0.92053699     0.9791248
#> HILIC_neg_118_9111a4_1865 HILIC_neg_118_9111a4_1865 0.42209206     0.9791248
#> HILIC_neg_446_9413a2_315   HILIC_neg_446_9413a2_315 0.94919342     0.9791248
#> HILIC_neg_127_5856a4_3758 HILIC_neg_127_5856a4_3758 0.89286857     0.9791248
#> HILIC_neg_303_2144a1_2372 HILIC_neg_303_2144a1_2372 0.80642224     0.9791248
#> HILIC_neg_366_6203a6_1825 HILIC_neg_366_6203a6_1825 0.43237129     0.9791248
#> HILIC_neg_258_7252a7_5445 HILIC_neg_258_7252a7_5445 0.22602134     0.9791248
#> HILIC_neg_301_2643a4_0372 HILIC_neg_301_2643a4_0372 0.39854239     0.9791248
#> HILIC_neg_224_4031a4_7409 HILIC_neg_224_4031a4_7409 0.68821774     0.9791248
#> HILIC_neg_424_8488a6_7736 HILIC_neg_424_8488a6_7736 0.63336660     0.9791248
#> HILIC_neg_131_2034a6_1385 HILIC_neg_131_2034a6_1385 0.48964326     0.9791248
#> HILIC_neg_236_4114a5_6302 HILIC_neg_236_4114a5_6302 0.22566045     0.9791248
#> HILIC_neg_411_0148a0_7484 HILIC_neg_411_0148a0_7484 0.25595029     0.9791248
#> HILIC_pos_288_6263a6_572   HILIC_pos_288_6263a6_572 0.58955350     0.9791248
#> HILIC_pos_331_1173a7_7822 HILIC_pos_331_1173a7_7822 0.81459138     0.9791248
#> HILIC_pos_139_4044a6_0388 HILIC_pos_139_4044a6_0388 0.33002455     0.9791248
#> HILIC_pos_132_7373a6_4146 HILIC_pos_132_7373a6_4146 0.14709879     0.9791248
#> HILIC_pos_298_6144a3_839   HILIC_pos_298_6144a3_839 0.81925522     0.9791248
#> HILIC_pos_410_9203a2_7329 HILIC_pos_410_9203a2_7329 0.27000621     0.9791248
#> HILIC_pos_145_8514a2_811   HILIC_pos_145_8514a2_811 0.91845450     0.9791248
#> HILIC_pos_306_0061a4_4049 HILIC_pos_306_0061a4_4049 0.46617988     0.9791248
#> HILIC_pos_425_8858a4_4494 HILIC_pos_425_8858a4_4494 0.21466426     0.9791248
#> HILIC_pos_436_332a6_1165   HILIC_pos_436_332a6_1165 0.90131334     0.9791248
#> HILIC_pos_255_0094a7_9288 HILIC_pos_255_0094a7_9288 0.84382501     0.9791248
#> HILIC_pos_417_1474a2_8239 HILIC_pos_417_1474a2_8239 0.31245522     0.9791248
#> HILIC_pos_297_8334a0_6647 HILIC_pos_297_8334a0_6647 0.68293227     0.9791248
#> HILIC_pos_449_2162a0_7574 HILIC_pos_449_2162a0_7574 0.94473499     0.9791248
#> HILIC_pos_197_7438a7_72     HILIC_pos_197_7438a7_72 0.23702183     0.9791248
#> HILIC_pos_141_601a7_387     HILIC_pos_141_601a7_387 0.31621551     0.9791248
#> HILIC_pos_448_1172a6_8567 HILIC_pos_448_1172a6_8567 0.71312145     0.9791248
#> HILIC_pos_346_6405a3_2719 HILIC_pos_346_6405a3_2719 0.95464666     0.9791248
#> HILIC_pos_334_3285a1_7395 HILIC_pos_334_3285a1_7395 0.29748076     0.9791248
#> HILIC_pos_215_5364a2_6707 HILIC_pos_215_5364a2_6707 0.99917681     0.9991768
#> RP_neg_458_0877a1_5798       RP_neg_458_0877a1_5798 0.91801106     0.9791248
#> RP_neg_365_8511a5_6086       RP_neg_365_8511a5_6086 0.82811993     0.9791248
#> RP_neg_369_5116a6_4389       RP_neg_369_5116a6_4389 0.08820308     0.9791248
#> RP_neg_222_4828a6_0392       RP_neg_222_4828a6_0392 0.08324328     0.9791248
#> RP_neg_114_84a3_0917           RP_neg_114_84a3_0917 0.07743725     0.9791248
#> RP_neg_317_554a3_063           RP_neg_317_554a3_063 0.01593830     0.9791248
#> RP_neg_419_897a3_9617         RP_neg_419_897a3_9617 0.42558877     0.9791248
#> RP_neg_493_3039a6_7816       RP_neg_493_3039a6_7816 0.68140183     0.9791248
#> RP_neg_359_0517a7_3652       RP_neg_359_0517a7_3652 0.68909160     0.9791248
#> RP_neg_435_8009a6_2215       RP_neg_435_8009a6_2215 0.61055678     0.9791248
#> RP_neg_358_2061a5_2818       RP_neg_358_2061a5_2818 0.59829592     0.9791248
#> RP_neg_397_2502a3_7998       RP_neg_397_2502a3_7998 0.58015642     0.9791248
#> RP_neg_165_9294a3_4261       RP_neg_165_9294a3_4261 0.33523758     0.9791248
#> RP_neg_413_1764a3_6741       RP_neg_413_1764a3_6741 0.69432095     0.9791248
#> RP_neg_115_4062a7_7329       RP_neg_115_4062a7_7329 0.19119325     0.9791248
#> RP_neg_300_1295a1_6959       RP_neg_300_1295a1_6959 0.51182336     0.9791248
#> RP_neg_177_6084a5_2913       RP_neg_177_6084a5_2913 0.33976288     0.9791248
#> RP_neg_134_1196a2_9606       RP_neg_134_1196a2_9606 0.63550412     0.9791248
#> RP_neg_139_4456a4_1251       RP_neg_139_4456a4_1251 0.07256151     0.9791248
#> RP_neg_385_6867a4_136         RP_neg_385_6867a4_136 0.97181120     0.9841126
#> RP_pos_490_9235a4_0176       RP_pos_490_9235a4_0176 0.88408671     0.9791248
#> RP_pos_383_4976a2_6503       RP_pos_383_4976a2_6503 0.17148517     0.9791248
#> RP_pos_344_9911a1_9656       RP_pos_344_9911a1_9656 0.75374144     0.9791248
#> RP_pos_117_7095a4_0945       RP_pos_117_7095a4_0945 0.93073704     0.9791248
#> RP_pos_294_9596a6_7569       RP_pos_294_9596a6_7569 0.93585388     0.9791248
#> RP_pos_460_4815a0_8843       RP_pos_460_4815a0_8843 0.02783844     0.9791248
#> RP_pos_272_3545a3_5592       RP_pos_272_3545a3_5592 0.74880356     0.9791248
#> RP_pos_409_2445a2_4149       RP_pos_409_2445a2_4149 0.32995427     0.9791248
#> RP_pos_245_9925a3_6251       RP_pos_245_9925a3_6251 0.18889662     0.9791248
#> RP_pos_369_1069a1_6271       RP_pos_369_1069a1_6271 0.90035933     0.9791248
#> RP_pos_174_0715a4_3465       RP_pos_174_0715a4_3465 0.73284319     0.9791248
#> RP_pos_324_6195a4_7743       RP_pos_324_6195a4_7743 0.39505113     0.9791248
#> RP_pos_149_432a4_1341         RP_pos_149_432a4_1341 0.25744472     0.9791248
#> RP_pos_461_5891a7_1505       RP_pos_461_5891a7_1505 0.12364562     0.9791248
#> RP_pos_458_263a4_3477         RP_pos_458_263a4_3477 0.65024077     0.9791248
#> RP_pos_226_7218a3_1371       RP_pos_226_7218a3_1371 0.59499866     0.9791248
#> RP_pos_280_3779a4_0424       RP_pos_280_3779a4_0424 0.46469078     0.9791248
#> RP_pos_447_3232a2_2393       RP_pos_447_3232a2_2393 0.63968887     0.9791248
#> RP_pos_453_282a5_128           RP_pos_453_282a5_128 0.86827717     0.9791248
#> RP_pos_153_9636a7_9986       RP_pos_153_9636a7_9986 0.57241135     0.9791248