xcp_d.utils.hcp2fmriprep module
Functions for converting HCP-format data to fMRIPrep format.
- xcp_d.utils.hcp2fmriprep.convert_hcp2bids(in_dir, out_dir, participant_ids=None)[source]
Convert HCP derivatives to BIDS-compliant derivatives.
- Parameters:
in_dir (str) – Path to HCP 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:
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.hcp2fmriprep.convert_hcp_to_bids_single_subject(in_dir, out_dir, sub_ent)[source]
Convert HCP derivatives to BIDS-compliant derivatives for a single subject.
- Parameters:
in_dir (str) – Path to the subject’s HCP derivatives.
out_dir (str) – Path to the output fMRIPrep-style 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.