scil_stats_group_comparison.py

usage: __main__.py [-h] [--out_dir OUT_DIR] [--out_json OUT_JSON]
                   [--bundles BUNDLES [BUNDLES ...]]
                   [--metrics METRICS [METRICS ...]]
                   [--values VALUES [VALUES ...]] [--alpha_error ALPHA_ERROR]
                   [--generate_graph] [--indent INDENT] [--sort_keys]
                   [-v [{DEBUG,INFO,WARNING}]] [-f]
                   IN_JSON IN_PARTICIPANTS GROUP_BY

Run group comparison statistics on metrics from tractometry
1) Separate the sample given a particular variable (group_by) into groups

2) Does Shapiro-Wilk test of normality for every sample
https://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test

3) Does Levene or Bartlett (depending on normality) test of variance
homogeneity Levene:
https://www.itl.nist.gov/div898/handbook/eda/section3/eda35a.htm
Bartlett:
https://www.itl.nist.gov/div898/handbook/eda/section3/eda357.htm

4) Test the group difference for every measure with the correct test depending
   on the sample (Student, Welch, Mannwhitneyu, ANOVA, Kruskall-Wallis)
Student :
https://en.wikipedia.org/wiki/Student%27s_t-test#Independent_two-sample_t-test
Welch :
https://en.wikipedia.org/wiki/Welch%27s_t-test
Mann-Whitney U :
https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test
ANOVA :
http://www.biostathandbook.com/onewayanova.html
Kruskall-Wallis :
https://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_one-way_analysis_of_variance

5) If the group difference test is positive and number of group is greater than
   2, test the group difference two by two.

6) Generate the result for all metrics and bundles

Formerly: scil_group_comparison.py

positional arguments:
  IN_JSON               Input JSON file from tractometry nextflow pipeline or equivalent.
  IN_PARTICIPANTS       Input tsv participants file.See doc in https://scilpy.readthedocs.io/en/latest/documentation/construct_participants_tsv_file.html.
  GROUP_BY              Variable that will be used to compare group together.

options:
  -h, --help            show this help message and exit
  --out_dir OUT_DIR     Name of the output folder path. [stats]
  --out_json OUT_JSON   The name of the result json output file otherwise it will be printed.
  --bundles BUNDLES [BUNDLES ...], -b BUNDLES [BUNDLES ...]
                        Bundle(s) in which you want to do stats. [all]
  --metrics METRICS [METRICS ...], -m METRICS [METRICS ...]
                        Metric(s) on which you want to do stats. [all]
  --values VALUES [VALUES ...], --va VALUES [VALUES ...]
                        Value(s) on which you want to do stats (mean, std). [all]
  --alpha_error ALPHA_ERROR, -a ALPHA_ERROR
                        Type 1 error for all the test. [0.05]
  --generate_graph, --gg
                        Generate a simple plot of every metric across groups.
  -v [{DEBUG,INFO,WARNING}]
                        Produces verbose output depending on the provided level.
                        Default level is warning, default when using -v is info.
  -f                    Force overwriting of the output files.

Json options:
  --indent INDENT       Indent for json pretty print.
  --sort_keys           Sort keys in output json.