[Freesurfer] Recon-all step estimate

2011-11-08 Thread Pedro Paulo de Magalhães Oliveira Junior
Is there any script that I can use to estimate which step recon-all are in?

My idea is to have a progress indicator for recon-all and this script would
be very useful.

thanks

Pedro Paulo Jr
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Recon-all step estimate

2011-11-08 Thread Bruce Fischl
the recon-all.cmd file I think gets written to the scripts dir with every 
command that is run


Bruce
On Tue, 8 Nov 2011, Pedro Paulo de Magalhães Oliveira 
Junior wrote:



Is there any script that I can use to estimate which step recon-all are in?
My idea is to have a progress indicator for recon-all and this script would be 
very useful.

thanks

Pedro Paulo Jr


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Recon-all step estimate

2011-11-08 Thread Michael Waskom
Hi Pedro,

Here's a script that (I think) will do what you're looking for:

http://web.mit.edu/mwaskom/stuff/recon_status

I hope it's useful

Michael

2011/11/8 Bruce Fischl fis...@nmr.mgh.harvard.edu

 the recon-all.cmd file I think gets written to the scripts dir with every
 command that is run

 Bruce

 On Tue, 8 Nov 2011, Pedro Paulo de Magalhães Oliveira Junior wrote:

  Is there any script that I can use to estimate which step recon-all are
 in?
 My idea is to have a progress indicator for recon-all and this script
 would be very useful.

 thanks

 Pedro Paulo Jr



 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


 The information in this e-mail is intended only for the person to whom it
 is
 addressed. If you believe this e-mail was sent to you in error and the
 e-mail
 contains patient information, please contact the Partners Compliance
 HelpLine at
 http://www.partners.org/complianceline . If the e-mail was sent to you in
 error
 but does not contain patient information, please contact the sender and
 properly
 dispose of the e-mail.


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.


Re: [Freesurfer] Recon-all step estimate

2011-11-08 Thread Douglas N Greve
You can look at the touch files in the touch directory. I've attached a 
script that I use called rastat that does this. When I was the main 
recon-all programmer, each process would create a touch file when it 
completed, but I don't know if newer versions continue to do so. You can 
also look at recon-all-status.log


doug







Pedro Paulo de Magalhães Oliveira Junior wrote:
Is there any script that I can use to estimate which step recon-all 
are in?


My idea is to have a progress indicator for recon-all and this script 
would be very useful.


thanks

Pedro Paulo Jr




___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


--
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358 
Fax: 617-726-7422


Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

#!/bin/tcsh -f
# rastat - get current status of recon-all processes

set VERSION = '$Id$';
set sd = ();
set subjectlist = ();

set inputargs = ($argv);

set PrintHelp = 0;
if($#argv == 0) goto usage_exit;
set n = `echo $argv | grep -e -help | wc -l` 
if($n != 0) then
  set PrintHelp = 1;
  goto usage_exit;
endif

set n = `echo $argv | grep -e -version | wc -l` 
if($n != 0) then
  echo $VERSION
  exit 0;
endif

goto parse_args;
parse_args_return:

goto check_params;
check_params_return:

foreach subject ($subjectlist)
  if(! -e $sd/$subject) then
echo $subject CANNOT FIND
continue;
  endif

  set ralog = $sd/$subject/scripts/recon-all.log
  if(! -e $ralog) then
echo $subject nolog
continue
  endif

  set d = $sd/$subject/scripts/recon-all.done
  if(-e $d) then
set DoneDate = `grep DATE $d | sed 's/DATE //g'`
echo $subject done $DoneDate
continue
  endif

  set e = $sd/$subject/scripts/recon-all.error
  if(-e $e) then
set ErrorDate = `grep DATE $e | sed 's/DATE //g'`
echo $subject error $ErrorDate
continue
  endif

  set isrs = (IsRunning.lh IsRunning.rh IsRunning.lh+rh)

  set IsRunning = 0;
  foreach isr0 ($isrs)

set isr = $sd/$subject/scripts/$isr0
if(! -e $isr) continue;
set IsRunning = 1;

set StartDate = `grep DATE $isr | sed 's/DATE //g'`
set Hemis  = `grep HEMI $isr | sed 's/HEMI //g' | sed 's/lh rh/lh+rh/'`

set tmp = `ls -lt $sd/$subject/touch/*.touch | head -n 2 | tail -n 1`
#set tmp = `ls -l $subject/scripts/recon-all.env`
#set month = $tmp[6];
#set   day = $tmp[7];
#set  time = $tmp[8];
set  dir  = $tmp[9];
set cmd = `basename $dir .touch`
#echo $subject running $month $day $time $cmd
echo $subject running $Hemis $StartDate $cmd
  end

  if(! $IsRunning)  echo $subject notsure 

end




exit 0

###

--##
parse_args:
set cmdline = ($argv);
while( $#argv != 0 )

  set flag = $argv[1]; shift;
  
  switch($flag)

case -s:
  if($#argv  1) goto arg1err;
  set subjectlist = ($subjectlist $argv[1]); shift;
  while(1  $#argv)
set a = `echo $argv[1] | cut -c 1`
if($a == -) break;
set subjectlist = ($subjectlist $argv[1]); shift;
  end
  breaksw

case -cwd:
case -pwd:
  set sd = `pwd`;
  breaksw

case -debug:
  set verbose = 1;
  set echo = 1;
  breaksw

default:
  echo ERROR: Flag $flag unrecognized. 
  echo $cmdline
  exit 1
  breaksw
  endsw

end

goto parse_args_return;
--##

--##
check_params:
if($#subjectlist == 0) then
  echo ERROR: need subjects
  exit 1;
endif

if($#sd == 0) set sd = $SUBJECTS_DIR;

goto check_params_return;
--##

--##
arg1err:
  echo ERROR: flag $flag requires one argument
  exit 1
--##

--##
usage_exit:
  echo 
  echo rastat
  echo 
  echo 

  if(! $PrintHelp) exit 1;

  echo $VERSION

  cat $0 | awk 'BEGIN{prt=0}{if(prt) print $0; if($1 == BEGINHELP) prt = 1 }'

exit 1;


# Everything below here is printed out as part of help -#
BEGINHELP
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.