Hcp_freesurfer after a failed run

Hey!

I started running prepreocessing for a batch of subjects, but after running a few of the commands i started having issues with irrelevant files that were in the subject folders. I cleaned the raw_data folders from the irrelevant files, re-imported the dicoms and started running the pipeline again. So far it’s been going ok, but when trying to run hcp_freesurfer i got this error:

- → ERROR: It seems like hcp_post_freesurfer was already executed for this session. Going back and forth between hcp_freesurfer and hcp_post_freesurfer will cause issues give invalid results. Best to manually cleanup the session and reprocess it from scratch.

- → Subject cannot be processed

which files exactly do I need to delete? Or is there any other way I can approach this without deleting?

Thank you,

Gili

Hi Gili,

What you need to do is cleanup all FreeSurfer results and restart with hcp_pre_freesurfer. To do this you can remove all folders in <qunex_study>/sessions/<session_id>/hcp/<session_id>, the only folder you need to keep is unprocessed. Once you do that, you can restart with hcp_pre_freesurfer, followed by hcp_freesurfer and hcp_post_freesurfer.

QuNex 1.5.0 that is coming out in August will allow you to rerun hcp_freesurfer even if you already ran hcp_post_freesurfer. But it will work only if the data was processed with 1.5.0 in the first place as it will keep track of relevant files and outputs and clean those up when needed.

Best, Jure