xcp_d.utils.dcan2fmriprep module

Functions for converting DCAN-format derivatives to fMRIPrep format.

xcp_d.utils.dcan2fmriprep.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.utils.dcan2fmriprep.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.