Dear Freesurfer users
I tried to run a loop for the recon-all command over subjects in order to use computational resources optimally. But the following error occured:
I used the following command:
foreach s (Patient01 Patient02 Patient03) recon-all $s -all end
The error message is:
s: undefined variable
Any idea what is wrong in the command?
Thanks a lot in advance Best regards Juergen
Dear Avram
thanks for your advise. I had try it, but there is an error message.
I used the following command:
foreach s (Patient01 Patient02 Patient03) recon-all $s -all end
The error message is:
s: undefined variable
Any idea what is wrong in the command?
Thanks a lot in advance Best regards Juergen
Juergen Haenggi, Ph.D. student Neuropsychology and Imaging Division of Psychiatry Research Psychiatric University Hospital University of Zurich, Switzerland P.O. Box 1931 Lenggstrasse 31, 8032 Zurich 0041 44 384 26 10 (office phone) 0041 76 445 86 84 (mobile phone) 0041 44 384 26 86 (fax) H 115 (office room number) juergen.haenggi@bli.unizh.ch (division email) http://www.dpr.unizh.ch/ (division website) http://www.juergenhaenggi.ch (private website)
-----Ursprüngliche Nachricht----- Von: Avram Holmes [mailto:holmes@fas.harvard.edu] Gesendet: Donnerstag, 19. Oktober 2006 15:10 An: Juergen Haenggi Betreff: Re: [Freesurfer] recon-all with more than one subject
Juergen,
You could use a 'foreach' loop
e.g., "foreach s (subject1 subject2)" then enter your recon-all command with a "$s" in the place of the subject name. Then
type "end".
This makes a loop that will run through each of the subjects individually.
Avram
Avram Holmes Department of Psychology Harvard University 1210 William James Hall Phone:(617) 495-0790 33 Kirkland Street Fax:(617) 495-3728 Cambridge, MA 02138, USA Email: holmes@fas.harvard.eduOn Thu, 19 Oct 2006, Bruce Fischl wrote:
Hi Juergen,
why would you want to do such a thing? Just run recon-all
multiple
times with different subjects.
cheers Bruce On Thu, 19 Oct 2006, Juergen Haenggi wrote:
Dear Freesurfer users
is there any possibility to run recon-all with more than
one subject?
what is the option to use several subjects within one
recon-all command?
can one use more than one -s option in one recon-all command?
thanks in advance best regards Juergen
Juergen Haenggi, Ph.D. student Neuropsychology and Imaging Division of Psychiatry Research Psychiatric University Hospital University of Zurich, Switzerland P.O. Box 1931 Lenggstrasse 31, 8032 Zurich 0041 44 384 26 10 (office phone) 0041 76 445 86 84 (mobile phone) 0041 44 384 26 86 (fax) H 115 (office room number) juergen.haenggi@bli.unizh.ch (division email) http://www.dpr.unizh.ch/ (division website) http://www.juergenhaenggi.ch (private website)
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
It looks like you just ran the foreach loop incorrectly. You need to put each separate section of the loop on a different line...
foreach s (Patient01 Patient02 Patient03) 'hit enter' recon-all $s -all 'hit enter' end 'hit enter'
Avram
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Avram Holmes Department of Psychology Harvard University 1210 William James Hall Phone:(617) 495-0790 33 Kirkland Street Fax:(617) 495-3728 Cambridge, MA 02138, USA Email: holmes@fas.harvard.edu ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On Mon, 20 Nov 2006, Juergen Haenggi wrote:
Dear Freesurfer users
I tried to run a loop for the recon-all command over subjects in order to use computational resources optimally. But the following error occured:
I used the following command:
foreach s (Patient01 Patient02 Patient03) recon-all $s -all end
The error message is:
s: undefined variable
Any idea what is wrong in the command?
Thanks a lot in advance Best regards Juergen
Dear Avram
thanks for your advise. I had try it, but there is an error message.
I used the following command:
foreach s (Patient01 Patient02 Patient03) recon-all $s -all end
The error message is:
s: undefined variable
Any idea what is wrong in the command?
Thanks a lot in advance Best regards Juergen
Juergen Haenggi, Ph.D. student Neuropsychology and Imaging Division of Psychiatry Research Psychiatric University Hospital University of Zurich, Switzerland P.O. Box 1931 Lenggstrasse 31, 8032 Zurich 0041 44 384 26 10 (office phone) 0041 76 445 86 84 (mobile phone) 0041 44 384 26 86 (fax) H 115 (office room number) juergen.haenggi@bli.unizh.ch (division email) http://www.dpr.unizh.ch/ (division website) http://www.juergenhaenggi.ch (private website)
-----Ursprüngliche Nachricht----- Von: Avram Holmes [mailto:holmes@fas.harvard.edu] Gesendet: Donnerstag, 19. Oktober 2006 15:10 An: Juergen Haenggi Betreff: Re: [Freesurfer] recon-all with more than one subject
Juergen,
You could use a 'foreach' loop
e.g., "foreach s (subject1 subject2)" then enter your recon-all command with a "$s" in the place of the subject name. Then
type "end".
This makes a loop that will run through each of the subjects individually.
Avram
Avram Holmes Department of Psychology Harvard University 1210 William James Hall Phone:(617) 495-0790 33 Kirkland Street Fax:(617) 495-3728 Cambridge, MA 02138, USA Email: holmes@fas.harvard.eduOn Thu, 19 Oct 2006, Bruce Fischl wrote:
Hi Juergen,
why would you want to do such a thing? Just run recon-all
multiple
times with different subjects.
cheers Bruce On Thu, 19 Oct 2006, Juergen Haenggi wrote:
Dear Freesurfer users
is there any possibility to run recon-all with more than
one subject?
what is the option to use several subjects within one
recon-all command?
can one use more than one -s option in one recon-all command?
thanks in advance best regards Juergen
Juergen Haenggi, Ph.D. student Neuropsychology and Imaging Division of Psychiatry Research Psychiatric University Hospital University of Zurich, Switzerland P.O. Box 1931 Lenggstrasse 31, 8032 Zurich 0041 44 384 26 10 (office phone) 0041 76 445 86 84 (mobile phone) 0041 44 384 26 86 (fax) H 115 (office room number) juergen.haenggi@bli.unizh.ch (division email) http://www.dpr.unizh.ch/ (division website) http://www.juergenhaenggi.ch (private website)
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
Hi, You forgot to precede $s with -subjid. Not sure about the loop structure, I don't use C-shells much these days. Cheers, Johannes
I used the following command:
foreach s (Patient01 Patient02 Patient03) recon-all $s -all end
The error message is:
s: undefined variable
Any idea what is wrong in the command?
freesurfer@nmr.mgh.harvard.edu