jstout211 / enigma_MEG

Other
9 stars 1 forks source link

Make the -subjects_dir and -fs_subject combination actually work #28

Closed nugenta closed 1 year ago

nugenta commented 1 year ago

Users can specify a freesurfer directory not in BIDS_ROOT/derivatives/freesurfer/subjects if their subjects have already been processed using FreeSurfer. In this case, it is quite likely that the BIDS subject ID (which is always appended with sub-, as in sub-Sub01) is different from the Freesurfer subject ID (which is most likely Sub01, using the prior example). We should make this combination of options work. At the moment, it doesn't. This would involve changes to both process_meg.py and enigma_prep_QA.py

nugenta commented 1 year ago

So it turns out I already did most of this, by linking in subject from the user-specified subjects_dir (using the user specified subject id) into the derivatives/freesurfer/subjects directory. I made some small modifications to make it work correctly, and also create the links when the subject id is the same. So the subjects_dir and fs_subjects was removed entirely from enigma_prep_QA.py.

The only remaining issue is that currently, if a .csv file is used, the subject id must match in both the BIDS directory and the freesurfer directory (although a different freesurfer directory can be used). Users could manually create the symbolic links in the bids_out/derivatives/freesurfer/subjects directory. Note again that the entire directory cannot be a link because the fsaverage cannot be linked without causing errors in the bem step.