xcp_d.ingression.abcdbids module

Functions for converting ABCD-BIDS-format derivatives to fMRIPrep format.

These functions are specifically designed to work with abcd-hcp-pipeline version 0.1.3. https://github.com/DCAN-Labs/abcd-hcp-pipeline/releases/tag/v0.1.3

xcp_d.ingression.abcdbids.convert_dcan2bids(in_dir, out_dir, participant_ids=None)[source]

Convert DCAN derivatives to BIDS-compliant derivatives.

Parameters:
  • in_dir (str) – Path to DCAN derivatives.

  • out_dir (str) – Path to the output BIDS-compliant derivatives folder.

  • participant_ids (None or list of str) – List of participant IDs to run conversion on. The participant IDs must not have the “sub-” prefix. If None, the function will search for all subjects in in_dir and convert all of them.

Returns:

participant_ids – The list of subjects whose derivatives were converted.

Return type:

list of str

Notes

Since the T1w is in standard space already, we use identity transforms instead of the individual transforms available in the DCAN derivatives.

xcp_d.ingression.abcdbids.convert_dcan_to_bids_single_subject(in_dir, out_dir, sub_ent)[source]

Convert DCAN derivatives to BIDS-compliant derivatives for a single subject.

Parameters:
  • in_dir (str) – Path to the subject’s DCAN derivatives.

  • out_dir (str) – Path to the output BIDS-compliant derivatives folder.

  • sub_ent (str) – Subject identifier, with “sub-” prefix.

Notes

Since the T1w is in standard space already, we use identity transforms instead of the individual transforms available in the DCAN derivatives.

sub-<sub_id>
    └── ses-<ses_id>
        └── files
            └── MNINonLinear
                ├── Results
                │   ├── ses-<ses_id>_task-<task_id>_run-<run_id>
                │   │   ├── ses-<ses_id>_task-<task_id>_run-<run_id>_SBRef.nii.gz
                │   │   ├── ses-<ses_id>_task-<task_id>_run-<run_id>.nii.gz
                │   │   ├── ses-<ses_id>_task-<task_id>_run-<run_id>_Atlas.dtseries.nii
                │   │   ├── Movement_Regressors.txt
                │   │   ├── Movement_AbsoluteRMS.txt
                │   │   └── brainmask_fs.2.0.nii.gz
                ├── fsaverage_LR32k
                │   ├── L.pial.32k_fs_LR.surf.gii
                │   ├── R.pial.32k_fs_LR.surf.gii
                │   ├── L.white.32k_fs_LR.surf.gii
                │   ├── R.white.32k_fs_LR.surf.gii
                │   ├── <sub_id>.L.thickness.32k_fs_LR.shape.gii
                │   ├── <sub_id>.R.thickness.32k_fs_LR.shape.gii
                │   ├── <sub_id>.L.corrThickness.32k_fs_LR.shape.gii
                │   ├── <sub_id>.R.corrThickness.32k_fs_LR.shape.gii
                │   ├── <sub_id>.L.curvature.32k_fs_LR.shape.gii
                │   ├── <sub_id>.R.curvature.32k_fs_LR.shape.gii
                │   ├── <sub_id>.L.sulc.32k_fs_LR.shape.gii
                │   ├── <sub_id>.R.sulc.32k_fs_LR.shape.gii
                │   ├── <sub_id>.L.MyelinMap.32k_fs_LR.func.gii
                │   ├── <sub_id>.R.MyelinMap.32k_fs_LR.func.gii
                │   ├── <sub_id>.L.SmoothedMyelinMap.32k_fs_LR.func.gii
                │   └── <sub_id>.R.SmoothedMyelinMap.32k_fs_LR.func.gii
                ├── T1w.nii.gz
                ├── aparc+aseg.nii.gz
                ├── brainmask_fs.nii.gz
                ├── ribbon.nii.gz
                ├── vent_2mm_<sub_id>_mask_eroded.nii.gz
                └── wm_2mm_<sub_id>_mask_eroded.nii.gz