ddmra.workflows.run_pipeline_comparison
- run_pipeline_comparison(pipeline_file_table, qc, out_dir='.', pipeline_columns=None, compare_pipelines=True, comparison_n_iters=None, comparison_n_jobs=None, **run_analyses_kwargs)[source]
Run DDMRA analyses for multiple processing pipelines.
- Parameters:
pipeline_file_table (path-like or pandas.DataFrame) – TSV file or DataFrame with one row per run and one column per processing pipeline. Each selected cell must contain a path to a NIfTI image file for that run and pipeline. Relative paths in TSV files are resolved relative to the TSV’s directory.
qc ((N,) list of array_like) – List of 1D QC metric arrays, one per run. The same QC values are used for every pipeline so the processing pipelines are compared over the same motion/quality axis.
out_dir (str, optional) – Output directory. Each pipeline is written to a subdirectory of this directory. Default is current directory.
pipeline_columns (None or list of str, optional) – Pipeline columns to run. If None, all columns in
pipeline_file_tableare used.compare_pipelines (bool, optional) – If True and at least two pipelines are selected, perform direct paired between-pipeline comparisons using run-wise pipeline-label swaps. Default is True.
comparison_n_iters (None or int, optional) – Number of paired label-swap permutations for direct pipeline comparisons. If None, use the same
n_itersvalue passed torun_analyses().comparison_n_jobs (None or int, optional) – Number of jobs for direct pipeline comparisons. If None, use the same
n_jobsvalue passed torun_analyses().**run_analyses_kwargs – Additional keyword arguments passed through to
run_analyses().
- Returns:
pipeline_outputs (dict) – Mapping from input pipeline column names to output directories.
Notes
This workflow writes each pipeline’s DDMRA outputs to a pipeline-specific subdirectory. When
compare_pipelinesis True, it also writes direct pairwise comparisons of each requested analysis’ smoothing-curve intercept and slope. These comparisons use paired run-wise pipeline-label swaps, which preserve the run-level QC values and matched processing-pipeline structure. Pairwise comparisons are conditional on the intersection of runs retained for both pipelines being compared.Direct comparison outputs are written to: -
pipeline_pairwise_comparisons.tsv: intercept/slope differences and p-values. -pipeline_pairwise_smoothing_curves.tsv.gz: observed paired difference curves. -pipeline_pairwise_nulls.npz: paired label-swap null distributions.