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