Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Introduce mri_robust_template as option for longitudinal template generation #2165

Draft
wants to merge 16 commits into
base: prep_for/mri_robust_template
Choose a base branch
from

Conversation

shnizzedy
Copy link
Member

@shnizzedy shnizzedy commented Nov 25, 2024

Fixes

Related to #2164 by @shnizzedy & @Shinwon Park

Description

  • Adds using option to longitudinal_template_generation with a choice of mri_robust_template (default) or C-PAC legacy
    longitudinal_template_generation:
    # Implementation to use
    # Options: mri_robust_template, C-PAC legacy
    using: mri_robust_template
  • Updates intergraph connections for the $2n+1$ graphs used to run longitudinal template generation
    flowchart LR
    anat_longitudinal_pre-preproc("<code>anat_longitudinal_pre-preproc</code><br>(one per subject session)") --> template_node_brain("<code>template_node_brain</code><br>(one per subject)")
    template_node_brain --> ses_wf("<code>ses_wf</code><br>(one per subject session)")
    
    Loading
  • Updates output logic to have a structure like
    └── pipeline_cpac-default-pipeline
        └── sub-01
            ├── anat
            │   ├── sub-01_from-longitudinal_to-MNI152NLin2009cAsym_mode-image_desc-linear_xfm.json
            │   ├── sub-01_from-longitudinal_to-MNI152NLin2009cAsym_mode-image_desc-linear_xfm.mat
            │   ├── sub-01_space-longitudinal_desc-brain_T1w.json
            │   ├── sub-01_space-longitudinal_desc-brain_T1w.nii.gz
            │   ├── sub-01_space-longitudinal_desc-head_T1w.json
            │   └── sub-01_space-longitudinal_desc-head_T1w.nii.gz
            ├── ses-1
            │   └── anat
            │       ├── sub-01_ses-1_desc-brain_mask.json
            │       ├── sub-01_ses-1_desc-brain_mask.nii.gz
            │       ├── sub-01_ses-1_desc-head_T1w.json
            │       ├── sub-01_ses-1_desc-head_T1w.nii.gz
            │       ├── sub-01_ses-1_desc-preproc_T1w.json
            │       ├── sub-01_ses-1_desc-preproc_T1w.nii.gz
            │       ├── sub-01_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
            │       ├── sub-01_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
            │       ├── sub-01_ses-1_from-T1w_to-MNI152NLin2009cAsym_mode-image_desc-li ear_xfm.json
            │       ├── sub-01_ses-1_from-T1w_to-MNI152NLin2009cAsym_mode-image_desc-linear_xfm.mat
            │       ├── sub-01_ses-1_space-longitudinal_desc-brain_T1w.json
            │       └── sub-01_ses-1_space-longitudinal_desc-brain_T1w.nii.gz
            └── ses-2
                └── anat
                    ├── sub-01_ses-2_desc-brain_mask.json
                    ├── sub-01_ses-2_desc-brain_mask.nii.gz
                    ├── sub-01_ses-2_desc-head_T1w.json
                    ├── sub-01_ses-2_desc-head_T1w.nii.gz
                    ├── sub-01_ses-2_desc-preproc_T1w.json
                    ├── sub-01_ses-2_desc-preproc_T1w.nii.gz
                    ├── sub-01_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
                    ├── sub-01_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
                    ├── sub-01_ses-2_from-T1w_to-MNI152NLin2009cAsym_mode-image_desc-linear_xfm.json
                    ├── sub-01_ses-2_from-T1w_to-MNI152NLin2009cAsym_mode-image_desc-linear_xfm.mat
                    ├── sub-01_ses-2_space-longitudinal_desc-brain_T1w.json
                    └── sub-01_ses-2_space-longitudinal_desc-brain_T1w.nii.gz
    
    • There's probably some missing outputs in this example, but the idea is just that there's an anat directory that's a sibling to all the session directories, and that that anat directory has all the subject-but-not-session-specific outputs in it.
    • Do we want all of from-T1w_to-longitudinal and from-longitudinal_to-{template} and from-T1w_to-{template} or do we want to leave any out to be recalculated as needed?

Technical details

  • This PR merges into a branch that just restructures the longitudinal code from develop so those non-logic changes aren't part of this PR.
  • This PR leaves `"C-PAC legacy" broken.

Still to do

  • do we want to remove or rename "C-PAC legacy"?
  • check outputs and make sure
    • they have the longitudinal template in their provenance where applicable
    • they seem reasonable

Tests

Screenshots

tree sub-70009
sub-70009/
├── anat
│   ├── sub-70009_from-longitudinal_to-MNI152NLin6ASym_mode-image_xfm.json
│   ├── sub-70009_from-longitudinal_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
│   ├── sub-70009_from-MNI152NLin6ASym_to-longitudinal_mode-image_desc-linear_xfm.json
│   ├── sub-70009_from-MNI152NLin6ASym_to-longitudinal_mode-image_desc-linear_xfm.nii.gz
│   ├── sub-70009_space-longitudinal_desc-brain_T1w.json
│   ├── sub-70009_space-longitudinal_desc-brain_T1w.nii.gz
│   ├── sub-70009_space-longitudinal_desc-head_T1w.json
│   └── sub-70009_space-longitudinal_desc-head_T1w.nii.gz
├── ses-1
│   └── anat
│       ├── sub-70009_ses-1_desc-brain_mask.json
│       ├── sub-70009_ses-1_desc-brain_mask.nii.gz
│       ├── sub-70009_ses-1_desc-head_T1w.json
│       ├── sub-70009_ses-1_desc-head_T1w.nii.gz
│       ├── sub-70009_ses-1_desc-preproc_T1w.json
│       ├── sub-70009_ses-1_desc-preproc_T1w.nii.gz
│       ├── sub-70009_ses-1_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.json
│       ├── sub-70009_ses-1_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.mat
│       ├── sub-70009_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
│       ├── sub-70009_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
│       ├── sub-70009_ses-1_label-CSF_desc-preproc_mask.json
│       ├── sub-70009_ses-1_label-CSF_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_label-CSF_mask.json
│       ├── sub-70009_ses-1_label-CSF_mask.nii.gz
│       ├── sub-70009_ses-1_label-CSF_probseg.json
│       ├── sub-70009_ses-1_label-CSF_probseg.nii.gz
│       ├── sub-70009_ses-1_label-GM_desc-preproc_mask.json
│       ├── sub-70009_ses-1_label-GM_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_label-GM_mask.json
│       ├── sub-70009_ses-1_label-GM_mask.nii.gz
│       ├── sub-70009_ses-1_label-GM_probseg.json
│       ├── sub-70009_ses-1_label-GM_probseg.nii.gz
│       ├── sub-70009_ses-1_label-WM_desc-preproc_mask.json
│       ├── sub-70009_ses-1_label-WM_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_label-WM_mask.json
│       ├── sub-70009_ses-1_label-WM_mask.nii.gz
│       ├── sub-70009_ses-1_label-WM_probseg.json
│       ├── sub-70009_ses-1_label-WM_probseg.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_desc-brain_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_desc-brain_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_desc-brain_T1w.json
│       ├── sub-70009_ses-1_space-longitudinal_desc-brain_T1w.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_desc-head_T1w.json
│       ├── sub-70009_ses-1_space-longitudinal_desc-head_T1w.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_desc-preproc_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_probseg.json
│       ├── sub-70009_ses-1_space-longitudinal_label-CSF_probseg.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_desc-preproc_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_probseg.json
│       ├── sub-70009_ses-1_space-longitudinal_label-GM_probseg.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_desc-preproc_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_desc-preproc_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_mask.json
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_mask.nii.gz
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_probseg.json
│       ├── sub-70009_ses-1_space-longitudinal_label-WM_probseg.nii.gz
│       ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-CSF_mask.json
│       ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-CSF_mask.nii.gz
│       ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-GM_mask.json
│       ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-GM_mask.nii.gz
│       ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-WM_mask.json
│       └── sub-70009_ses-1_space-MNI152NLin6ASym_label-WM_mask.nii.gz
└── ses-2
    ├── anat
    │   ├── sub-70009_ses-2_desc-brain_mask.json
    │   ├── sub-70009_ses-2_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_desc-dsegAxial_quality.json
    │   ├── sub-70009_ses-2_desc-dsegAxial_quality.png
    │   ├── sub-70009_ses-2_desc-dsegSagittal_quality.json
    │   ├── sub-70009_ses-2_desc-dsegSagittal_quality.png
    │   ├── sub-70009_ses-2_desc-head_T1w.json
    │   ├── sub-70009_ses-2_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_desc-preproc_T1w.json
    │   ├── sub-70009_ses-2_desc-preproc_T1w.nii.gz
    │   ├── sub-70009_ses-2_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.mat
    │   ├── sub-70009_ses-2_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
    │   ├── sub-70009_ses-2_label-CSF_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-CSF_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-CSF_mask.json
    │   ├── sub-70009_ses-2_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_label-CSF_probseg.json
    │   ├── sub-70009_ses-2_label-CSF_probseg.nii.gz
    │   ├── sub-70009_ses-2_label-GM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-GM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-GM_mask.json
    │   ├── sub-70009_ses-2_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_label-GM_probseg.json
    │   ├── sub-70009_ses-2_label-GM_probseg.nii.gz
    │   ├── sub-70009_ses-2_label-WM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-WM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-WM_mask.json
    │   ├── sub-70009_ses-2_label-WM_mask.nii.gz
    │   ├── sub-70009_ses-2_label-WM_probseg.json
    │   ├── sub-70009_ses-2_label-WM_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_T1w.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-head_T1w.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_probseg.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_probseg.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_probseg.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-brain_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-head_T1w.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-preproc_T1w.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-preproc_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-CSF_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-GM_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-WM_mask.json
    │   └── sub-70009_ses-2_space-MNI152NLin6ASym_label-WM_mask.nii.gz
    └── func
        ├── sub-70009_ses-2_task-rest_run-01_desc-brain_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-brain_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-mean_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-mean_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParameters_motion.1D
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParameters_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersRot_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersRot_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersTrans_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersTrans_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-summary_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-summary_motion.tsv
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.mat
        ├── sub-70009_ses-2_task-rest_run-01_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_motion.tsv
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-confounds1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-confounds1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-preproc1_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-preproc1_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-confounds2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-confounds2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-preproc2_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-preproc2_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_sbref.json
        ├── sub-70009_ses-2_task-rest_run-01_sbref.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-T1w_sbref.json
        └── sub-70009_ses-2_task-rest_run-01_space-T1w_sbref.nii.gz

Checklist

  • My pull request has a descriptive title (not a vague title like Update index.md).
  • My pull request targets the prep_for/mri_robust_template branch of the repository.
  • My commit messages follow best practices.
  • My code follows the established code style of the repository.
  • I added tests for the changes I made (if applicable).
  • I updated the changelog.
  • I added or updated documentation (if applicable).
  • I tried running the project locally and verified that there are no visible errors.

Developer Certificate of Origin

Developer Certificate of Origin
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.


Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

@shnizzedy
Copy link
Member Author

then... is this

# now, just write out a copy of the above to each session
config.pipeline_setup['pipeline_name'] = orig_pipe_name
for session in sub_list:
unique_id = session['unique_id']
try:
creds_path = session['creds_path']
if creds_path and 'none' not in creds_path.lower():
if os.path.exists(creds_path):
input_creds_path = os.path.abspath(creds_path)
else:
err_msg = 'Credentials path: "%s" for subject "%s" ' \
'session "%s" was not found. Check this path ' \
'and try again.' % (creds_path, subject_id,
unique_id)
raise Exception(err_msg)
else:
input_creds_path = None
except KeyError:
input_creds_path = None
wf = initialize_nipype_wf(config, sub_list[0])
wf, rpool = initiate_rpool(wf, config, session)
config.pipeline_setup[
'pipeline_name'] = f'longitudinal_{orig_pipe_name}'
rpool = ingress_output_dir(config, rpool, long_id,
creds_path=input_creds_path)
select_node_name = f'select_{unique_id}'
select_sess = pe.Node(Function(input_names=['session',
'output_brains',
'warps'],
output_names=['brain_path',
'warp_path'],
function=select_session),
name=select_node_name)
select_sess.inputs.session = unique_id
wf.connect(template_node, 'output_brain_list', select_sess,
'output_brains')
wf.connect(template_node, 'warp_list', select_sess, 'warps')
rpool.set_data("space-longitudinal_desc-brain_T1w",
select_sess, 'brain_path', {}, "",
select_node_name)
rpool.set_data("from-T1w_to-longitudinal_mode-image_"
"desc-linear_xfm",
select_sess, 'warp_path', {}, "",
select_node_name)
config.pipeline_setup['pipeline_name'] = orig_pipe_name
excl = ['space-template_desc-brain_T1w',
'space-T1w_desc-brain_mask']
rpool.gather_pipes(wf, config, add_excl=excl)
wf.run()
just some sort of hacky way to use the output ingress and CPAC.engine.gather_pipes() to write out the results of this multiple times for each session...? and if so- I think ingress_output_dir being deprecated might be why this doesn't work?

I think yes and yes for "C-PAC legacy". Here I added some functionality to grab the outputs from the previousl-run graph

def get_output_from_graph(
wf: pe.Workflow, graph: DiGraph, node: pe.Node | pe.Workflow, output_name: str
) -> Any:
"""Get an output from a graph that has been run."""
nodename = str(node.fullname)
if isinstance(node, pe.Workflow):
sub_node_name, output_name = output_name.rsplit(".", 1)
nodename = f"{nodename}.{sub_node_name}"
edges = get_edges_with_node(node, output_name)
for edge in reversed(edges):
try:
return get_output_from_graph(
wf,
graph,
edge[0],
next(
iter(
connection
for connection in edge[2]["connect"]
if connection[1] == output_name
)
)[0],
)
except StopIteration:
continue
try:
output = getattr(
next(
iter(
_node
for _node in graph
if _node.fullname.endswith(nodename)
or _node.fullname.endswith(f"{nodename}_")
)
).result.outputs,
output_name,
)
except StopIteration as stop_iteration:
msg = f"{nodename} not found in completed workflow."
raise FileNotFoundError(msg) from stop_iteration
return output
instead of relying on finding them in the filesystem.

and then this

# begin single-session stuff again
for session in sub_list:
unique_id = session['unique_id']
try:
creds_path = session['creds_path']
if creds_path and 'none' not in creds_path.lower():
if os.path.exists(creds_path):
input_creds_path = os.path.abspath(creds_path)
else:
err_msg = 'Credentials path: "%s" for subject "%s" ' \
'session "%s" was not found. Check this path ' \
'and try again.' % (creds_path, subject_id,
unique_id)
raise Exception(err_msg)
else:
input_creds_path = None
except KeyError:
input_creds_path = None
wf = initialize_nipype_wf(config, sub_list[0])
wf, rpool = initiate_rpool(wf, config, session)
pipeline_blocks = [warp_longitudinal_T1w_to_template,
warp_longitudinal_seg_to_T1w]
wf = connect_pipeline(wf, config, rpool, pipeline_blocks)
rpool.gather_pipes(wf, config)
# this is going to run multiple times!
# once for every strategy!
wf.run()
is the final transfer of the longitudinal stuff to the actual template I guess, per session

This section was what I was unsure about, but I think it makes sense. In this refactor, we go from looping over the sessions 3× (once before template generation and twice after) to 2× (once before and once after).

IF that's really just a hacky use of ingress/output dir write-out to copy those outputs to multiple sessions, and output dir ingress doesn't work, we can probably just get around it by doing the copying in a way that isn't really dumb (it seems like it was my idea so I take the blame). although maybe I was trying to just make use of the multi-strategy bookkeeping capabilities?

I think the idea was for it to work seamlessly with C-PAC-generated or previously-generated longitudinal templates so long as they're named in the BIDS-ish way C-PAC expects, but that there's been slippage between what C-PAC expects generally and what this specific section of the codebase expects & generates.

@shnizzedy shnizzedy force-pushed the mri_robust_template branch from 1e2079f to 397c533 Compare December 5, 2024 22:14
@shnizzedy shnizzedy force-pushed the mri_robust_template branch from 397c533 to 6339798 Compare December 6, 2024 03:55
@shnizzedy shnizzedy self-assigned this Dec 12, 2024
@shnizzedy shnizzedy requested a review from a team December 12, 2024 16:16
@shnizzedy
Copy link
Member Author

At this point the outputs of a test run are looking like this:

tree
.
├── anat
│   ├── sub-70009_from-MNI152NLin6ASym_to-longitudinal_mode-image_desc-linear_xfm.json
│   ├── sub-70009_from-MNI152NLin6ASym_to-longitudinal_mode-image_desc-linear_xfm.nii.gz
│   ├── sub-70009_from-longitudinal_to-MNI152NLin6ASym_mode-image_xfm.json
│   ├── sub-70009_from-longitudinal_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
│   ├── sub-70009_space-longitudinal_desc-brain_T1w.json
│   ├── sub-70009_space-longitudinal_desc-brain_T1w.nii.gz
│   ├── sub-70009_space-longitudinal_desc-brain_T1w.png
│   ├── sub-70009_space-longitudinal_desc-head_T1w.json
│   ├── sub-70009_space-longitudinal_desc-head_T1w.nii.gz
│   └── sub-70009_space-longitudinal_desc-head_T1w.png
├── ses-1
│   ├── anat
│   │   ├── sub-70009_ses-1_desc-brain_mask.json
│   │   ├── sub-70009_ses-1_desc-brain_mask.nii.gz
│   │   ├── sub-70009_ses-1_desc-dsegAxial_quality.json
│   │   ├── sub-70009_ses-1_desc-dsegAxial_quality.png
│   │   ├── sub-70009_ses-1_desc-dsegSagittal_quality.json
│   │   ├── sub-70009_ses-1_desc-dsegSagittal_quality.png
│   │   ├── sub-70009_ses-1_desc-head_T1w.json
│   │   ├── sub-70009_ses-1_desc-head_T1w.nii.gz
│   │   ├── sub-70009_ses-1_desc-head_T1w.png
│   │   ├── sub-70009_ses-1_desc-preproc_T1w.json
│   │   ├── sub-70009_ses-1_desc-preproc_T1w.nii.gz
│   │   ├── sub-70009_ses-1_desc-preproc_T1w.png
│   │   ├── sub-70009_ses-1_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.json
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.json
│   │   ├── sub-70009_ses-1_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
│   │   ├── sub-70009_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
│   │   ├── sub-70009_ses-1_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.json
│   │   ├── sub-70009_ses-1_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.mat
│   │   ├── sub-70009_ses-1_label-CSF_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_label-CSF_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-CSF_mask.json
│   │   ├── sub-70009_ses-1_label-CSF_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-CSF_probseg.json
│   │   ├── sub-70009_ses-1_label-CSF_probseg.nii.gz
│   │   ├── sub-70009_ses-1_label-GM_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_label-GM_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-GM_mask.json
│   │   ├── sub-70009_ses-1_label-GM_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-GM_probseg.json
│   │   ├── sub-70009_ses-1_label-GM_probseg.nii.gz
│   │   ├── sub-70009_ses-1_label-WM_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_label-WM_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-WM_mask.json
│   │   ├── sub-70009_ses-1_label-WM_mask.nii.gz
│   │   ├── sub-70009_ses-1_label-WM_probseg.json
│   │   ├── sub-70009_ses-1_label-WM_probseg.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-brain_mask.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-brain_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-head_T1w.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-head_T1w.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-preproc_T1w.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_desc-preproc_T1w.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-CSF_mask.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-CSF_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-GM_mask.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-GM_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-WM_mask.json
│   │   ├── sub-70009_ses-1_space-MNI152NLin6ASym_label-WM_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-brain_T1w.json
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-brain_T1w.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-brain_T1w.png
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-brain_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-brain_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-head_T1w.json
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-head_T1w.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_desc-head_T1w.png
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_probseg.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-CSF_probseg.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_probseg.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-GM_probseg.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-WM_desc-preproc_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-WM_desc-preproc_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-WM_mask.json
│   │   ├── sub-70009_ses-1_space-longitudinal_label-WM_mask.nii.gz
│   │   ├── sub-70009_ses-1_space-longitudinal_label-WM_probseg.json
│   │   └── sub-70009_ses-1_space-longitudinal_label-WM_probseg.nii.gz
│   └── func
│       ├── sub-70009_ses-1_task-rest_run-01_desc-brain_mask.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-brain_mask.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.png
│       ├── sub-70009_ses-1_task-rest_run-01_desc-mean_bold.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-mean_bold.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_desc-mean_bold.png
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParametersRot_quality.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParametersRot_quality.png
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParametersTrans_quality.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParametersTrans_quality.png
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParameters_motion.1D
│       ├── sub-70009_ses-1_task-rest_run-01_desc-movementParameters_motion.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-summary_motion.json
│       ├── sub-70009_ses-1_task-rest_run-01_desc-summary_motion.tsv
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.json
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.json
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.json
│       ├── sub-70009_ses-1_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.mat
│       ├── sub-70009_ses-1_task-rest_run-01_motion.json
│       ├── sub-70009_ses-1_task-rest_run-01_motion.tsv
│       ├── sub-70009_ses-1_task-rest_run-01_sbref.json
│       ├── sub-70009_ses-1_task-rest_run-01_sbref.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_sbref.png
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.json
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.json
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_sbref.json
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_sbref.nii.gz
│       ├── sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_sbref.png
│       ├── sub-70009_ses-1_task-rest_run-01_space-T1w_sbref.json
│       ├── sub-70009_ses-1_task-rest_run-01_space-T1w_sbref.nii.gz
│       └── sub-70009_ses-1_task-rest_run-01_space-T1w_sbref.png
└── ses-2
    ├── anat
    │   ├── sub-70009_ses-2_desc-brain_mask.json
    │   ├── sub-70009_ses-2_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_desc-brain_mask.png
    │   ├── sub-70009_ses-2_desc-dsegAxial_quality.json
    │   ├── sub-70009_ses-2_desc-dsegAxial_quality.png
    │   ├── sub-70009_ses-2_desc-dsegSagittal_quality.json
    │   ├── sub-70009_ses-2_desc-dsegSagittal_quality.png
    │   ├── sub-70009_ses-2_desc-head_T1w.json
    │   ├── sub-70009_ses-2_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_desc-head_T1w.png
    │   ├── sub-70009_ses-2_desc-preproc_T1w.json
    │   ├── sub-70009_ses-2_desc-preproc_T1w.nii.gz
    │   ├── sub-70009_ses-2_desc-preproc_T1w.png
    │   ├── sub-70009_ses-2_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-MNI152NLin6ASym_to-T1w_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-MNI152NLin6Sym_to-T1w_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_desc-linear_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
    │   ├── sub-70009_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-T1w_to-longitudinal_mode-image_desc-linear_xfm.mat
    │   ├── sub-70009_ses-2_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.json
    │   ├── sub-70009_ses-2_from-longitudinal_to-T1w_mode-image_desc-linear_xfm.mat
    │   ├── sub-70009_ses-2_label-CSF_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-CSF_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-CSF_mask.json
    │   ├── sub-70009_ses-2_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_label-CSF_probseg.json
    │   ├── sub-70009_ses-2_label-CSF_probseg.nii.gz
    │   ├── sub-70009_ses-2_label-GM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-GM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-GM_mask.json
    │   ├── sub-70009_ses-2_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_label-GM_probseg.json
    │   ├── sub-70009_ses-2_label-GM_probseg.nii.gz
    │   ├── sub-70009_ses-2_label-WM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_label-WM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_label-WM_mask.json
    │   ├── sub-70009_ses-2_label-WM_mask.nii.gz
    │   ├── sub-70009_ses-2_label-WM_probseg.json
    │   ├── sub-70009_ses-2_label-WM_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-brain_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-head_T1w.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-preproc_T1w.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_desc-preproc_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-CSF_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-GM_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-WM_mask.json
    │   ├── sub-70009_ses-2_space-MNI152NLin6ASym_label-WM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_T1w.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_T1w.png
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-brain_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-head_T1w.json
    │   ├── sub-70009_ses-2_space-longitudinal_desc-head_T1w.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_desc-head_T1w.png
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_probseg.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-CSF_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_probseg.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-GM_probseg.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_desc-preproc_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_desc-preproc_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_mask.json
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_mask.nii.gz
    │   ├── sub-70009_ses-2_space-longitudinal_label-WM_probseg.json
    │   └── sub-70009_ses-2_space-longitudinal_label-WM_probseg.nii.gz
    └── func
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-AAL_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Brodmann_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CAPRSC_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC200_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-CC400_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DKT_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-DesikanKlein_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Desikan_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Glasser_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordcortMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-HarvardOxfordsubMaxprobThr25_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Juelich_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-MICCAI_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-PNAS_reg-defaultNoGSR_desc-SpatReg2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-PNAS_reg-defaultNoGSR_desc-SpatReg2_timeseries.txt
        ├── sub-70009_ses-2_task-rest_run-01_atlas-PNAS_reg-default_desc-SpatReg1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-PNAS_reg-default_desc-SpatReg1_timeseries.txt
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer20181000Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018200Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018300Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Schaefer2018400Parcels17NetworksOrder_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Slab907_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Talairach_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17Liberal_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo17_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7Liberal_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-Yeo7_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-ho_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-rois_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-Mean2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-PearsonNilearn2_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-ndmg2_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-Mean1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-PearsonNilearn1_correlations.tsv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.csv
        ├── sub-70009_ses-2_task-rest_run-01_atlas-tt_space-MNI152NLin6ASym_reg-default_desc-ndmg1_correlations.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-brain_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-brain_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-framewiseDisplacementJenkinsonPlot_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-mean_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-mean_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_desc-mean_bold.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersRot_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersRot_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersTrans_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParametersTrans_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParameters_motion.1D
        ├── sub-70009_ses-2_task-rest_run-01_desc-movementParameters_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-summary_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_desc-summary_motion.tsv
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6ASym_mode-image_xfm.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-MNI152NLin6Sym_mode-image_xfm.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.json
        ├── sub-70009_ses-2_task-rest_run-01_from-bold_to-T1w_mode-image_desc-linear_xfm.mat
        ├── sub-70009_ses-2_task-rest_run-01_motion.json
        ├── sub-70009_ses-2_task-rest_run-01_motion.tsv
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-2_vmhc.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-2_vmhc.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-boldSnr2_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-boldSnr2_quality.txt
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-boldSnrHist2_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-boldSnrHist2_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-confounds2_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-confounds2_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-preproc2_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-preproc2_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-smZstd2_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-zstd2_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-1_vmhc.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-1_vmhc.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-boldSnr1_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-boldSnr1_quality.txt
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-boldSnrHist1_quality.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-boldSnrHist1_quality.png
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-confounds1_timeseries.1D
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-confounds1_timeseries.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-preproc1_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-preproc1_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-smZstd1_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_reg-default_desc-zstd1_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_sbref.json
        ├── sub-70009_ses-2_task-rest_run-01_sbref.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_sbref.png
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_desc-bold_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-preproc2_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-preproc2_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-smZstd2_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-defaultNoGSR_desc-zstd2_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-preproc1_bold.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-preproc1_bold.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-smZstd1_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_alff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_alff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_falff.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_falff.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_reho.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_reg-default_desc-zstd1_reho.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_res-3mm_desc-bold_mask.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref.json
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref.nii.gz
        ├── sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref.png
        ├── sub-70009_ses-2_task-rest_run-01_space-T1w_sbref.json
        ├── sub-70009_ses-2_task-rest_run-01_space-T1w_sbref.nii.gz
        └── sub-70009_ses-2_task-rest_run-01_space-T1w_sbref.png

8 directories, 639 files
thumbnails

anat

space-longitudinal_desc-brain_T1w

sub-70009_space-longitudinal_desc-brain_T1w

sub-70009_space-longitudinal_desc-head_T1w

sub-70009_space-longitudinal_desc-head_T1w

ses-1/anat

desc-dsegAxial_quality

sub-70009_ses-1_desc-dsegAxial_quality

desc-dsegSagittal_quality

sub-70009_ses-1_desc-dsegSagittal_quality

desc-head_T1w

sub-70009_ses-1_desc-head_T1w

desc-preproc_T1w

sub-70009_ses-1_desc-preproc_T1w

space-longitudinal_desc-brain_T1w

sub-70009_ses-1_space-longitudinal_desc-brain_T1w

space-longitudinal_desc-head_T1w

sub-70009_ses-1_space-longitudinal_desc-head_T1w

ses-1/func

desc-mean_bold

sub-70009_ses-1_task-rest_run-01_desc-mean_bold

sbref

sub-70009_ses-1_task-rest_run-01_sbref

space-MNI152NLin6ASym_sbref

sub-70009_ses-1_task-rest_run-01_space-MNI152NLin6ASym_sbref

space-T1w_sbref

sub-70009_ses-1_task-rest_run-01_space-T1w_sbref

ses-2/anat

desc-brain_mask

sub-70009_ses-2_desc-brain_mask

desc-dsegAxial_quality

sub-70009_ses-2_desc-dsegAxial_quality

desc-dsegSagittal_quality

sub-70009_ses-2_desc-dsegSagittal_quality

desc-head_T1w

sub-70009_ses-2_desc-head_T1w

desc-preproc_T1w

sub-70009_ses-2_desc-preproc_T1w

space-longitudinal_desc-brain_T1w

sub-70009_ses-2_space-longitudinal_desc-brain_T1w

space-longitudinal_desc-head_T1w

sub-70009_ses-2_space-longitudinal_desc-head_T1w

ses-2/func

desc-mean_bold

sub-70009_ses-2_task-rest_run-01_desc-mean_bold

sbref

sub-70009_ses-2_task-rest_run-01_sbref

space-MNI152NLin6ASym_sbref

sub-70009_ses-2_task-rest_run-01_space-MNI152NLin6ASym_sbref

space-T1w_sbref

sub-70009_ses-2_task-rest_run-01_space-T1w_sbref

crashes

There are several crashes that I'm not sure if they're in scope of this PR or if they're separate issues:

3dECM -mask /cpac_templates/Mask_ABIDE_85Percent_GM.nii.gz -memory 1.000000 -prefix eigenvector_centrality_merged.nii.gz -sparsity 0.100000 /ocean/projects/med220004p/jclucas/shinwon/longitudinal/out/working/pipeline_cpac-default-pipeline/cpac_pipeline_cpac-default-pipeline_sub-70009_ses-2/afni_centrality_eigenvector_centrality_360/_scan_rest_run-01/afni_centrality/bandpassed_demeaned_filtered_warp_flirt.nii.gz

	++ 3dECM cc mods: AFNI version=AFNI_23.3.09 (Dec  8 2023) [64-bit]
	++ 49428 voxels in -mask dataset
	++ vectim-izing input dataset
	** FATAL ERROR: Can't create vectim (var filter)?!
	** Program compile date = Dec  8 2023

compute_connectome_nilearn

	numpy.linalg.LinAlgError: singular matrix

drop_percent

	IndexError: index -1 is out of bounds for axis 0 with size 0

CPAC.nuisance.nuisance.gather_nuisance

	ValueError: Expecting 5 regressors for aCompCor, but found 1 in file /ocean/projects/med220004p/jclucas/shinwon/longitudinal/out/working/pipeline_cpac-default-pipeline/cpac_pipeline_cpac-default-pipeline_sub-70009_ses-1/nuisance_regressors_default_172/_scan_rest_run-01/aCompCor_DetrendPC/compcor_regressors.1D.

Some of these are downstream from the jacked-up ses-1_sbref, but I'm not sure if the others (or even really that) are related to this PR.

@shnizzedy
Copy link
Member Author

There's definitely some weirdness in the outputs. There are outputs with desc-{value}{index} keys like

sub-70009_ses-2_task-rest_run-01_reg-default_desc-preproc1_bold.nii.gz
sub-70009_ses-2_task-rest_run-01_reg-defaultNoGSR_desc-preproc2_bold.nii.gz

even though they have differentiating reg keys and those preproc BOLD files are just all zeroes 🫤

@shnizzedy
Copy link
Member Author

Looks like the empty BOLD files are from the bandpass not passing anything through, could be data-specific. I'm going to try rerunning without bandpass.

@shnizzedy
Copy link
Member Author

pre-preproc

one per subject-session

workflow: pe.Workflow = initialize_nipype_wf(
config,
subject_id,
unique_id,
name="anat_longitudinal_pre-preproc",
)
rpool: ResourcePool
workflow, rpool = initiate_rpool(workflow, config, session)
pipeline_blocks = build_anat_preproc_stack(rpool, config)
workflow = connect_pipeline(workflow, config, rpool, pipeline_blocks)
session_wfs[unique_id] = rpool
rpool.gather_pipes(workflow, config)
for key in strats_dct.keys():
strats_dct[key].append(cast(tuple[pe.Node, str], rpool.get_data(key)))
if not dry_run:
workflow_graph: DiGraph = workflow.run()

pre-preproc workflow graph

template node

one per subject

wf, rpool = initiate_rpool(wf, config, part_id=subject_id)
match config["longitudinal_template_generation", "using"]:
case "C-PAC legacy":
brain_output = "brain_template"
head_output = "skull_template"
# This node will generate the longitudinal template (the functions are
# in longitudinal_preproc)
# Later other algorithms could be added to calculate it, like the
# multivariate template from ANTS
# It would just require to change it here.
# multiple variable names here for compatibility with other options later in this function
brain_template_node = wholehead_template_node = template_node = (
subject_specific_template(workflow_name="longitudinal_anat_template")
)
template_node.inputs.set(
avg_method=config.longitudinal_template_generation["average_method"],
dof=config.longitudinal_template_generation["dof"],
interp=config.longitudinal_template_generation["legacy-specific"][
"interp"
],
cost=config.longitudinal_template_generation["legacy-specific"]["cost"],
convergence_threshold=config.longitudinal_template_generation[
"legacy-specific"
]["convergence_threshold"],
thread_pool=config.longitudinal_template_generation["legacy-specific"][
"thread_pool"
],
unique_id_list=list(session_wfs.keys()),
)
wf.connect(merge_brains, "out", brain_template_node, "input_brain_list")
wf.connect(merge_skulls, "out", wholehead_template_node, "input_skull_list")
case "mri_robust_template":
brain_output = head_output = "NIfTI-template.out_file"
brain_template_node = mri_robust_template(
f"mri_robust_template_brain_{subject_id}", config, len(sub_list)
)
wholehead_template_node = mri_robust_template(
f"mri_robust_template_head_{subject_id}", config, len(sub_list)
)
wf.connect(
merge_brains, "out", brain_template_node, "mri_robust_template.in_files"
)
wf.connect(
merge_skulls,
"out",
wholehead_template_node,
"mri_robust_template.in_files",
)
case _:
msg = ": ".join(
[
"Invalid 'using' value for longitudinal template generation",
str(config["longitudinal_template_generation", "using"]),
]
)
raise ValueError(msg)
rpool.set_data(
"longitudinal-template_space-longitudinal_desc-brain_T1w",
brain_template_node,
brain_output,
{},
"",
brain_template_node.name,
)
for desc in ["head", "reorient"]:
rpool.set_data(
f"longitudinal-template_space-longitudinal_desc-{desc}_T1w",
wholehead_template_node,
head_output,
{},
"",
wholehead_template_node.name,
)
pipeline_blocks = [mask_longitudinal_T1w_brain]
pipeline_blocks = build_T1w_registration_stack(
rpool, config, pipeline_blocks, space="longitudinal"
)
cross_pool_keys = [
"from-longitudinal_to-template_mode-image_xfm",
"from-template_to-longitudinal_mode-image_desc-linear_xfm",
"longitudinal-template_space-longitudinal_desc-brain_mask",
"longitudinal-template_space-longitudinal_desc-brain_T1w",
"longitudinal-template_space-longitudinal_desc-head_T1w",
"longitudinal-template_space-longitudinal_desc-reorient_T1w",
]
rpool.gather_pipes(wf, config)
wf = connect_pipeline(wf, config, rpool, pipeline_blocks)
wf_graph: DiGraph | pe.Workflow = (
cast(DiGraph, wf.run()) if not dry_run else cast(pe.Workflow, wf)
)

template node workflow graph

post-template preproc

one per subject-session

ses_wf = initialize_nipype_wf(config, subject_id, unique_id)
ses_wf, rpool = initiate_rpool(ses_wf, config, session)
if "derivatives_dir" in session:
ses_wf, rpool = ingress_output_dir(
ses_wf,
config,
rpool,
long_id,
data_paths=session,
part_id=subject_id,
ses_id=unique_id,
creds_path=input_creds_path,
)
select_sess = select_session_node(unique_id)
match config["longitudinal_template_generation", "using"]:
case "C-PAC legacy":
cross_graph_connections(
wf,
wf_graph,
ses_wf,
merge_brains,
brain_template_node,
"out",
"input_brain_list",
)
cross_graph_connections(
wf,
wf_graph,
ses_wf,
merge_skulls,
brain_template_node,
"out",
"input_skull_list",
)
for input_name, output_name in [
("output_brains", "output_brain_list"),
("warps", "warp_list"),
]:
cross_graph_connections(
wf,
wf_graph,
ses_wf,
brain_template_node,
select_sess,
output_name,
input_name,
)
case "mri_robust_template":
assert isinstance(brain_template_node, pe.Workflow)
assert isinstance(wholehead_template_node, pe.Workflow)
index = i + 1
head_select_sess = select_session_node(unique_id, "wholehead")
select_sess.set_input("session", f"space-longitudinal{index}")
head_select_sess.set_input("session", f"space-longitudinal{index}")
for input_name, output_name in [
("output_brains", "NIfTI-mapmov_.out_file"),
("warps", "convert-to-FSL_.out_fsl"),
]:
cross_graph_connections(
wf,
wf_graph,
ses_wf,
brain_template_node,
select_sess,
output_name,
input_name,
)
cross_graph_connections(
wf,
wf_graph,
ses_wf,
wholehead_template_node,
head_select_sess,
output_name,
input_name,
)
rpool.set_data(
"space-longitudinal_desc-head_T1w",
head_select_sess,
"brain_path",
{},
"",
head_select_sess.name,
)
rpool.set_data(
"space-longitudinal_desc-brain_T1w",
select_sess,
"brain_path",
{},
"",
select_sess.name,
)
rpool.set_data(
"from-T1w_to-longitudinal_mode-image_desc-linear_xfm",
select_sess,
"warp_path",
{},
"",
select_sess.name,
)
config.pipeline_setup["pipeline_name"] = orig_pipe_name
excl = [
"from-T1w_to-longitudinal_mode-image_desc-linear_xfm",
"space-longitudinal_desc-brain_T1w",
"space-longitudinal_desc-head_T1w",
"space-template_desc-brain_T1w",
"space-T1w_desc-brain_mask",
]
rpool.gather_pipes(ses_wf, config, add_excl=excl)
for key in cross_pool_keys:
node, out = longitudinal_rpool.get_data(key)
if isinstance(wf_graph, DiGraph):
assert isinstance(out, str)
node = cross_graph_identity(wf, wf_graph, node, out)
try:
json_info: dict = longitudinal_rpool.get_json(
key, next(iter(longitudinal_rpool.rpool[key].keys()))
)
except (AttributeError, KeyError, StopIteration):
json_info = {}
rpool.set_data(
key,
node,
out,
json_info,
"",
f"fsl_longitudinal_{subject_id}", # "fsl" for check_prov_for_regtool
)
pipeline_blocks = build_segmentation_stack(
rpool,
config,
[warp_longitudinal_T1w_to_template, warp_longitudinal_seg_to_T1w],
)
ses_wf = connect_pipeline(ses_wf, config, rpool, pipeline_blocks)
rpool.gather_pipes(ses_wf, config)
# this is going to run multiple times!
# once for every strategy!
if not dry_run: # check select_sess
ses_wf.run()

post-template preproc workflow graph

main workflow

one per subject-session

try:
workflow = build_workflow(subject_id, sub_dict, c, p_name)
except Exception as exception:
WFLOGGER.exception("Building workflow failed")
raise exception
wf_graph = c["pipeline_setup", "log_directory", "graphviz", "entire_workflow"]
if wf_graph.get("generate"):
for graph2use in wf_graph.get("graph2use"):
dotfilename = os.path.join(log_dir, f"{p_name}_{graph2use}.dot")
for graph_format in wf_graph.get("format"):
try:
workflow.write_graph(
dotfilename=dotfilename,
graph2use=graph2use,
format=graph_format,
simple_form=wf_graph.get("simple_form", True),
)
except Exception as exception:
msg = (
f"Failed to visualize {p_name} ("
f"{graph2use}, {graph_format})"
)
raise RuntimeError(msg) from exception
workflow_meta = WorkflowJSONMeta(pipeline_name=p_name, stage="pre")
save_workflow_json(
filename=os.path.join(log_dir, workflow_meta.filename()),
workflow=workflow,
meta=workflow_meta,
custom_serializer=cpac_flowdump_serializer,
)
if test_config:
WFLOGGER.info(
"This has been a test of the pipeline configuration "
"file, the pipeline was built successfully, but was "
"not run"
)
return 0 # return success code
working_dir = os.path.join(
c.pipeline_setup["working_directory"]["path"], workflow.name
)
# if c.write_debugging_outputs:
# with open(os.path.join(working_dir, 'resource_pool.pkl'), 'wb') as f:
# pickle.dump(strat_list, f)
# if c.pipeline_setup['working_directory']['regenerate_outputs']:
# erasable = list(find_files(working_dir, '*sink*')) + \
# list(find_files(working_dir, '*link*')) + \
# list(find_files(working_dir, '*log*'))
# for f in erasable:
# if os.path.isfile(f):
# os.remove(f)
# else:
# shutil.rmtree(f)
if hasattr(c, "trim") and c.trim:
WFLOGGER.warning(
"""
Trimming is an experimental feature, and if used wrongly, it can
lead to unreproducible results.
It is useful for performance optimization, but only if used correctly.
Please, make yourself aware of how it works and its assumptions:
- The pipeline configuration has not changed;
- The data configuration / BIDS directory has not changed;
- The files from the output directory has not changed;
- Your softwares versions has not changed;
- Your C-PAC version has not changed;
- You do not have access to the working directory.
"""
)
workflow, _ = the_trimmer(
workflow,
output_dir=c.pipeline_setup["output_directory"]["path"],
s3_creds_path=input_creds_path,
)
pipeline_start_datetime = strftime("%Y-%m-%d %H:%M:%S")
workflow_result = None
exitcode = 0
try:
subject_info["resource_pool"] = []
# for strat_no, strat in enumerate(strat_list):
# strat_label = 'strat_%d' % strat_no
# subject_info[strat_label] = strat.get_name()
# subject_info['resource_pool'].append(strat.get_resource_pool())
subject_info["status"] = "Running"
# Create callback logger
cb_log_filename = os.path.join(log_dir, "callback.log")
try:
if not os.path.exists(os.path.dirname(cb_log_filename)):
os.makedirs(os.path.dirname(cb_log_filename))
except IOError:
pass
# Add handler to callback log file
set_up_logger("callback", cb_log_filename, "debug", log_dir, mock=True)
# Log initial information from all the nodes
log_nodes_initial(workflow)
# Add status callback function that writes in callback log
nipype_version = REQUIREMENTS["nipype"]
if nipype.__version__ != nipype_version:
WFLOGGER.warning(
"This version of Nipype may not be compatible with CPAC v%s,"
" please install Nipype version %s\n",
CPAC.__version__,
nipype_version,
)
if plugin_args["n_procs"] == 1:
plugin = "Linear"
if not plugin or plugin == "LegacyMultiProc":
plugin = LegacyMultiProcPlugin(plugin_args)
elif plugin == "MultiProc":
plugin = MultiProcPlugin(plugin_args)
try:
# Actually run the pipeline now, for the current subject
workflow_result = workflow.run(plugin=plugin, plugin_args=plugin_args)

main workflow graph

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🏗 In progress
Development

Successfully merging this pull request may close these issues.

1 participant