Using already existing freesurfer recons in singularity container

Hi!
we’re having a “up-and-running” singularity container on an sge-server and can use fmriprep successfully on “normal” subjects with that setup.
Now we’re trying to run a particular patient population with the same set-up and would like to explore the possibility of adding already existing freesurfer recon-folder/-files into this pipeline.
Seems that one way of doing this is to add the ‘finished’ recon-subjects’ folder in the respective derivative location?

Also, the data is unique with big anatomical lesions/abnormalities that causes steps with standard recon (and likely other steps later) to fail. That why we processed the data with a dev version of FreeSurfer in the first place. Is there a way of restricting the dependent workflows within fmri prep to only one hemisphere?

Thanks,
Dorit

Seems that one way of doing this is to add the ‘finished’ recon-subjects’ folder in the respective derivative location?

This is in fact the only way to do this right now. The subject name should have the sub-<label> form. If fsaverage is not already in the freesurfer derivatives directory, the copy from FreeSurfer v6.0.0 will be copied in.

Is there a way of restricting the dependent workflows within fmri prep to only one hemisphere?

Not at present, but we’d be happy to accept a patch! I think the main things that would need adjusting are bbregister and mri_vol2surf.

Both bbregister and mir_vol2surf have hemi options (within themselves) - so a way to start would be to restrict / or not iterate through the hemispheres - do I get that right?

FYI: the recons are created with a dev version of FreeSurfer that allows for restricting only to one hemisphere (thanks to Bruce).

Thanks,
Dorit

Right. It would honestly mostly be an issue choosing good command-line options (perhaps --fs-lh-only/--fs-rh-only or similar?), piping the hemisphere information down to the correct nodes, and testing to make sure we don’t break anything.

I’d encourage you to open a Github issue, where we can hash out what needs to be done. If you’re up for it, you could try your hand at submitting a patch.

I don’t think this should cause any problems, but we do use v6.0.0 release versions of all tools in our docker images, so if there are changes that have been made outside of the context of the recon-all pipeline (particularly mri_coreg, bbregister, mri_vol2vol, mri_vol2surf, mris_convert, tkregister2), you may need to build custom images.

OK - I’ll look into it and post a github issue.

Thanks!!!

Dorit, can you tell me about and/or send me a link to the freesurfer dev version you mention regarding processing one hemisphere?

Thanks

Hi Jarod,
you can download the dev version (latest build: https://surfer.nmr.mgh.harvard.edu/fswiki/DownloadAndInstall) from FreeSurfer’s website. That version has a few more options for running certain FS-utils with a flag for only one hemisphere (e.g. bbregister). That being said, the processing I was referring to was also dependent on local fixes and a specific environment on a martinos center computing node that Bruce Fischl set up.

What are you trying to do?

Cheers,
Dorit

Dorit,

Thanks for the quick response. I am hoping to process one relatively normal hemisphere in individuals with a severely abnormal single hemisphere (tumor, stroke, surgery, etc).
When I saw your prior message, I thought there might be a way built in to a public beta freesurfer release to do this, but it sounds like the setup you are using is not readily available outside of the Martinos center. Is that correct?