Sharing utility scripts

Dear everybody,

I wrote a little bash script today, which is calling python under the hood in order to facilitate freesurfer segmentation of subjects organized in folders.
The point was, that it scales as needed (serial/parallel processing) and makes it simple to start.

Now, that I am done with it I can’t help but notice that I might have been the 100th person to write such a script, so I have been “wasting” my time solving a problem, that has long been solved multiple times elsewhere.

Now I am thinking that there is no point in everybody doing this on their own, so I am sharing my solution here (or on github, to be more precise).

You can find it under: https://github.com/RuKrei/MEG_MRI_scripts

It’s called do_fs_folder.sh and

  • Executes do_recon_all_nipype.py
  • runs either on all subjects, or on a specified subset
  • can be to run in parallel mode, or sequential
  • Converts DICOM-Subfolders to nifti
  • runs freesurfer (recon-all)
  • runs SegmentHA_T1.sh (hippocampal subfield segmentation)

It’s a bit tailored to my needs, but adjusting this might be faster, than re-inventing the wheel.

@MNE-Team:
Do you think it would be a good idea to include some sample utility-scripts to mne-python?
If yes, then this could be the starting point :slight_smile:

If no, then everybody feel free to push some of your scripts to the above mentioned repo.

Best
Rudi K

4 Likes

Thanks for this! We probably won’t start including utility scripts as part of MNE-Python repo, but there is a separate repo:

where people put such things sometimes. I don’t know how visible/discoverable it is (clearly since you didn’t find it, it’s not very visible!) but it might be slightly more discoverable to others than putting it in your own GitHub repo.

1 Like