.. _scil_connectivity_reorder_rois: scil_connectivity_reorder_rois ============================== :: 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,ERROR}]] [-f] in_matrices [in_matrices ...] Re-order one or many connectivity matrices' rows and columns. The connectivity matrices can come, for instance, from scil_connectivity_computes_matrices. To state the new order, use a text file with the following formatting: The first row are the new x order and the second row the new y order, using integer values separated by a space. The resulting matrix does not have to be square (supports 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_connections_from_labels. To subsequently use scil_viz_connectivity 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. ----------------------------------------------------------------------------- Reference: [1] Rubinov, Mikail, and Olaf Sporns. "Complex network measures of brain connectivity: uses and interpretations." Neuroimage 52.3 (2010): 1059-1069. ----------------------------------------------------------------------------- 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 matrices filenames. It will be appended to each input matrix's name. --out_dir OUT_DIR Output directory for the re-ordered matrices. If not set, each output matrix will be saved in the same directory as the input matrix. --labels_list LABELS_LIST List saved by the decomposition script, --in_ordering must contain labels rather than coordinates (.txt). -v [{DEBUG,INFO,WARNING,ERROR}] 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. 2.2.2