External Email - Use Caution
Hi Yujing,
Thanks so much for your response! I tried copying $FREESURFER_HOME/subjects/fsaverage and $FREESURFER_HOME/subjects/${hemi}.EC_average to $SUBJECTS dir before running, and this time I ran with the original recon-all instead of the one that had been edited to remove links (recon-all_noLink). I was sure this would solve the problem, but I ended up getting the same error:
Command:
/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all -all -s sub-0223_mprage -openmp 1 -i /cifs/hariri-long/Studies/DBIS_P52/Imaging/sourcedata/sub-0223/anat/sub-0223_T1w.nii.gz
Error:
MRISread(/work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/surf/rh.white): could not open file
Did I need to copy them somewhere besides $SUBJECTS_DIR ? I’m not seeing any “failed to create symbolic link” messages which I interpret as the script having found the files and not need to run the ‘ln -s’ commands.
Attaching the log file from this latest run.
Thanks!
Annchen
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu on behalf of Huang, Yujing YHUANG43@mgh.harvard.edu Date: Thursday, June 1, 2023 at 3:06 PM To: Freesurfer support list freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3
External Email - Use Caution Hi Annchen,
Your cp commands are missing destination file operands, see the errors in recon-all.log.
ln -s $FREESURFER_HOME/subjects/fsaverage and ln -s $FREESURFER_HOME/subjects/${hemi}.EC_average create symbolic links to directory. You will have to copy those two directories for your subject. I think if you copy them before recon-all, it won’t go through the codes to create the link.
Best,
Yujing
From: freesurfer-bounces@nmr.mgh.harvard.edu freesurfer-bounces@nmr.mgh.harvard.edu On Behalf Of Annchen Knodt Sent: Thursday, June 1, 2023 2:10 PM To: freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] Troubleshooting "could not open file" errors in FS 5.3
External Email - Use Caution Hello,
I'm trying to run freesurfer v5.3 recon-all and running into an error I'm not sure how to troubleshoot. I'm using essentially the same commands that i've successfully used to run version 6.0 recently, and that i've also successfully run 5.3 with in the past.
On my first pass, I attempted to run this full recon-all command:
/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink -all -s sub-0223_mprage -openmp 1 -i /cifs/hariri-long/Studies/DBIS_P52/Imaging/sourcedata/sub-0223/anat/sub-0223_T1w.nii.gz
And eventually got the error:
MRISread(/work/long/freesurfer_v5.3_DBIS/sub-0223_mprage/surf/rh.white): could not open file
Lots of lh surf files were produced as well as 3 of the lh stats files (aparc, curv, w-g), but nothing for rh, and I could not find the rh.white file. I then tried running rh using:
/cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink -all -s sub-0223_mprage -openmp 1 -hemi rh
And eventually got the error:
MRISread(/work/long/freesurfer_v5.3_DBIS/rh.EC_average/surf/rh.sphere.reg): could not open file
One thing that seems weird about the second error is that it is looking in $SUBJECTS_DIR instead of $SUBJECTS_DIR/<subject> for the rh.sphere file, when the file does exist in $SUBJECTS_DIR/<subject>/surf (but not the top dir where it's looking)
Also wanted to note that i'm running this a slightly tweaked version to remove symlinks which aren't allowed on the cluster i'm working on (which is running CentOS 8):
$ diff /cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all_noLink /cifs/hariri-long/Scripts/Tools/FreeSurfer_v5.3/freesurfer/bin/recon-all 3447c3447 < cp $subj1 ${diffsubj}_tmp ---
ln -s $subj1 ${diffsubj}_tmp
3753c3753 < cp $subj1 ${diffsubj}_tmp ---
ln -s $subj1 ${diffsubj}_tmp
3911c3911 < set cmd=(cp $FREESURFER_HOME/subjects/fsaverage) ---
set cmd=(ln -s $FREESURFER_HOME/subjects/fsaverage)
4028c4028 < set cmd=(cp $FREESURFER_HOME/subjects/fsaverage) ---
set cmd=(ln -s $FREESURFER_HOME/subjects/fsaverage)
4157c4157 < set cmd=(cp $FREESURFER_HOME/subjects/${hemi}.EC_average) ---
set cmd=(ln -s $FREESURFER_HOME/subjects/${hemi}.EC_average)
Any tips on how I can troubleshoot this? Attaching recon-all.log file. Thanks!!
Annchen