On 20 August 2014 14:27, Anastasia Yendiki ayendiki@nmr.mgh.harvard.edu wrote:
Thanks a lot, Kirstie. Nice job on finding solutions in the archives! You are a model user :)
Thank you....although unfortunately not quite the perfect user - I still have problems...
I think I lied in my earlier email - I think that the mri_convert --frame problem (#3 below) is actually in the newest version of trac-preproc. (I didn't do a great job of keeping track of my version because I was being lazy! More fool me.)
Here's the part of the code which in the May 2014 update ('$Id: trac-preproc,v 1.49 2014/03/22 03:31:22 ayendiki Exp $' ) that is leading to the error:
#========================================================================= # Make diffusion brain mask if ($#nb0 > 0) then set lowblist = () @ k = 0 while ($k < $nb0) set lowblist = ($lowblist $k) @ k = $k + 1 end else set bmin = `grep -v ^$ $dwidir/dwi_orig.mghdti.bvals \ | sort --numeric-sort | head -1` set lowblist = `cat $dwidir/dwi_orig.mghdti.bvals \ | awk -v bmin=$bmin '{if ($1 == bmin) print NR-1}'` endif
if (! $#lowblist) then echo "ERROR: Cannot detect low-b volumes" goto error_exit endif
set cmd = mri_convert set cmd = ($cmd --frame $lowblist) set cmd = ($cmd $dwidir/dwi.nii.gz) set cmd = ($cmd $dwidir/lowb.nii.gz) echo $cmd |& tee -a $LF |& tee -a $CF if ($RunIt) then $cmd |& tee -a $LF if ($status) goto error_exit endif
#=========================================================================
Which leads to this command:
mri_convert --frame 0 14 27 41 54 68 /scratch/kw401/UCHANGE_INTERIM/SUB_DATA/10778/SURFER/MRI0/dmri/dwi.nii.gz /scratch/kw401/UCHANGE_INTERIM/SUB_DATA/10778/SURFER/MRI0/dmri/lowb.nii.gz
And then to this error:
mri_convert: extra arguments ("41" and following)
I made the following changes to the code (trac-preproc) and everything seems to run just fine.
#========================================================================= OLD
set cmd = ($cmd --frame $lowblist)
NEW < set cmd = ($cmd --frame ${lowblist[1]})
#=========================================================================
What do you think? Is this just an odd-ness for me, or is it a helpful fix? One thing that I haven't been able to ascertain is whether I have an old version of mri_convert that should be able to concatenate the six listed volumes! (The next section of code seems to look like its trying to concatenate volumes so it might be expecting a 4D file? Or multiple lowb.nii.gz volumes?) I haven't seen this problem crop up in any later processing but it may do??
I hope this all makes sense! Thank you again for all your hard work! Kx
On 20 August 2014 14:27, Anastasia Yendiki ayendiki@nmr.mgh.harvard.edu wrote:
Thanks a lot, Kirstie. Nice job on finding solutions in the archives! You are a model user :)
On Wed, 20 Aug 2014, Kirstie Whitaker wrote:
Hi Anastasia and the freesurfer list,
I've been working on getting the latest version of tracula to run and I thought I would post here the errors that I've worked around. It's all been based on looking through the mailing list archives but I thought it would be useful to add them here all in one place! The goal of this email is simply to save time for others in the future (including myself when I forget all these things!)
[Note that if I've written something between < > then it will be specific to your files/directories etc]
When running trac-all on an input nii file with corresponding bval and bvec files:
- If you're getting an error that says:
nifti1Read(): unsupported slice timing pattern 5 in <NAME OF YOUR DTI NIFTI FILE>
Try running the command:
fslmaths <NAME OF YOUR DTI NIFTI FILE> <NAME OF YOUR DTI NIFTI FILE>
eg: fslmaths dti.nii.gz dti.nii.gz
I'm really not clear on what exactly is wrong with my files (created using an in house dicom converter) but taking in the file and writing it straight back out again gets rid of this problem for me.
- If you're getting an error that says
ERROR: Could not open <SUBJECTS_DIR>/<SUBID>/dmri/bvals for reading
Then you're probably using the centos4 update at http://surfer.nmr.mgh.harvard.edu/fswiki/Tracula. You have two options - if the centos6 update works then switch to that, otherwise all other steps in trac-all -prep work *except* for the quality control. So you can run trac-all -prep -noqa and all should be well.
To install the update just download it (I used wget <TRACULA_UPDATE_LINK>) and the untar it (tar -zxvf <TRACULA_UPDATE_TAR.GZ_FILE>). Copy the files inside the folder you've created into the $FREESURFER_HOME/bin/ directory.
- If you're getting an error that says (something along the lines of)
mri_convert --frame 0 14 27 41 54 68 <SUBJECTS_DIR>/<SUBID>/dmri/dwi.nii.gz <SUBJECTS_DIR>/<SUBID>/dmri/lowb.nii.gz
mri_convert: extra arguments ("41" and following)
type mri_convert -u for usage
Then you're probably using an old version of trac-all. Double check that you've replaced the appropriate files in your $FREESURFER_HOME/bin directory with those contained in the appropriate update at http://surfer.nmr.mgh.harvard.edu/fswiki/Tracula. (See my instructions at point 2).
Some fun facts from my experience:
- You can have decimal points (not commas though) in your bvals files.
- You can run trac-all in either a bash or tcsh shell.
(These were not the droids I was looking for)
Thanks again for the really excellent software. And please correct anything that I've written here if it's wrong!
Kx
-- Kirstie Whitaker, PhD Research Associate
Department of Psychiatry University of Cambridge
Mailing Address Brain Mapping Unit Department of Psychiatry Sir William Hardy Building Downing Street Cambridge CB2 3EB
Phone: +44 7583 535 307 Website: www.kirstiewhitaker.com
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.