External Email - Use Caution        

Hi Bruce,

Thanks for getting back to me. I wanted to write a bash script that would allow 
me run recon-all, I'm just not sure how to set it up. Is it possible to use a 
.txt file to do this? I know others have used a .txt file containing the 
subject IDs to find the correct files.

e.g.

Create a txt file with all the subject names (as they appear
on their respective folders).  Name that txt file whatever you want (like "*
subs.txt*") and save it somewhere in one of the paths (we use /Users/*
Home_User*).

Then in terminal, after setting the environments for Freesurfer and the
subjects directory, insert the following:

for SubjectName in `cat *subs.txt*`

do

recon-all -s $SubjectName -all -qcache

done

Would this work if all my subjects are in separate sub directories? I apologise 
if I'm not explaining myself clearly, but I'm a complete novice.

Kind regards,
Benjamin

________________________________
From: freesurfer-boun...@nmr.mgh.harvard.edu 
<freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Bruce Fischl 
<fis...@nmr.mgh.harvard.edu>
Sent: 27 June 2019 15:38
To: Freesurfer support list
Subject: Re: [Freesurfer] recon-all multiple subjects 'for' loop?

Hi Benjamin

you can run them all in the same terminal by backgrounding them (adding
the & character at the end of the command line)

cheers
Bruce

On Thu, 27 Jun 2019,
Benjamin Stott wrote:

>
>         External Email - Use Caution
>
> Hello,
> I would like to run recon-all on multiple subjects. I have 650 subjects, so 
> running them in separate
> terminals isn't an option. Each subject has their own folder (e.g. 
> sub-CC121428) containing a single
> T1w.nii.gz file.
>
> Unfortunately, I have very little experience coding. I appreciate any advice 
> you can offer.
>
> Benjamin
>
>
>
_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Reply via email to