scil_connectivity_reorder_rois.py

usage: __main__.py [-h]
                   (--in_ordering IN_ORDERING | --optimal_leaf_ordering OUT_FILE)
                   [--out_suffix OUT_SUFFIX] [--out_dir OUT_DIR]
                   [--labels_list LABELS_LIST] [-v [{DEBUG,INFO,WARNING}]]
                   [-f]
                   in_matrices [in_matrices ...]

Re-order one or many connectivity matrices using a text file format.
The first row are the (x) and the second row the (y), must be space separated.
The resulting matrix does not have to be square (support unequal number of
x and y).

The values refer to the coordinates (starting at 0) in the matrix, but if the
--labels_list parameter is used, the values will refer to the label which will
be converted to the appropriate coordinates. This file must be the same as the
one provided to the scil_tractogram_segment_bundles_for_connectivity.py.

To subsequently use scil_visualize_connectivity.py with a lookup table, you
must use a label-based reording json and use --labels_list.

You can also use the Optimal Leaf Ordering(OLO) algorithm to transform a
sparse matrix into an ordering that reduces the matrix bandwidth. The output
file can then be re-used with --in_ordering. Only one input can be used with
this option, we recommand an average streamline count or volume matrix.

Formerly: scil_reorder_connectivity.py

positional arguments:
  in_matrices           Connectivity matrices in .npy or .txt format.

options:
  -h, --help            show this help message and exit
  --in_ordering IN_ORDERING
                        Txt file with the first row as x and second as y.
  --optimal_leaf_ordering OUT_FILE
                        Output a text file with an ordering that alignsstructures along the diagonal.
  --out_suffix OUT_SUFFIX
                        Suffix for the output matrix filename.
  --out_dir OUT_DIR     Output directory for the re-ordered matrices.
  --labels_list LABELS_LIST
                        List saved by the decomposition script,
                        --in_ordering must contain labels rather than coordinates (.txt).
  -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.

[1] Rubinov, Mikail, and Olaf Sporns. "Complex network measures of brain
    connectivity: uses and interpretations." Neuroimage 52.3 (2010):
    1059-1069.