io_utils
tit.stats.io_utils ¶
Input/Output utilities for neuroimaging data
This module contains functions for: - Saving permutation logs (group comparison and correlation)
save_permutation_details ¶
save_permutation_details(permutation_info, output_file, subject_ids_resp, subject_ids_non_resp, paired=False)
Save detailed information about each permutation to a file
Parameters:¶
permutation_info : list of dict List containing permutation details with keys: - 'perm_num': permutation number - 'perm_idx': permutation indices, or for a paired run the +/-1 sign flips - 'max_cluster_size': maximum cluster statistic found (size or mass) output_file : str Path to output file subject_ids_resp : list Original responder subject IDs subject_ids_non_resp : list Original non-responder subject IDs paired : bool A paired run permutes by flipping signs within pairs: each line lists the flip vector in pair order (-1 swaps that pair's two conditions), not a relabelling.
Source code in tit/stats/io_utils.py
save_correlation_permutation_details ¶
Save each correlation permutation's effect-size shuffle to a file.
In permutation k subject subject_ids[j] is given the effect size of
subject_ids[perm_idx[j]]; each line lists those donors in subject order.
permutation_info has the keys :func:save_permutation_details documents.