pycortex icon indicating copy to clipboard operation
pycortex copied to clipboard

Feature-request/bug: Pycortex readout of new fmriprep format

Open ChristianNSchmitz opened this issue 3 years ago • 1 comments

Dear Gallantlab, I would like to use pycortex on a dataset already preprocessed by fmriprep. Until now, pycortex adheres to the old path structure with a derivatives directory containing an fmriprep as well as an freesurfer directory. However, since fMRIPrep 21.0 this appears to be a legacy layout: https://fmriprep.org/en/stable/outputs.html#legacy-layout Do you have plans to update the pycortex readout for fMRIPrep >=21.0?

Thanks and best wishes, Chris

ChristianNSchmitz avatar Feb 22 '22 13:02 ChristianNSchmitz

Hi Chris, you are welcome to send a pull request with the changes necessary for fMRIPrep >= 21.0. We don't really have the bandwidth now to keep that module maintained (and we don't use fMRIPrep ourselves).

Note however that you can use cortex.freesurfer.import_subj with the freesurfer subject directory generated by fmriprep. This is the standard way in pycortex to import subjects. So something like this should work

import cortex
cortex.freesurfer.import_subj("sub-ABCD", freesurfer_subject_dir="/path/to/freesurfer_dir")

(If you have exported FREESURFER_DIR to your environment, you do not need to pass the kwarg freesurfer_subject_dir).

For the purposes of visualization, the two approaches should be the same.

mvdoc avatar Feb 22 '22 14:02 mvdoc