External Email - Use Caution        

In your script, this line selects all 4 directories (6008, 6008_tp1, 6008_tp2, 6008_tp3)

timepoints=`ls -d1 ${subid}* | cut -d'_' -f2`

 

change it to

timepoints=`ls -d1 ${subid} _tp* | cut -d'_' -f2`

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Taylor, Lisa
Sent: Tuesday, June 13, 2023 2:58 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Yujing,

 

The recon-all.logs I sent previously were the recon-all was done for each individual time point before longitudinal process. I wonder if there is something in the step 2 script I have that is adding the additional file. I have also attached the recon-all.log file for 6008/scripts/recon-all.log.

 

Here's the script that I run for step 2:

 

[ltaylor2@login-i16:/pub/ltaylor2/downs] $cat freesurfer_longitudinal_step2.sh

#!/bin/sh

# NOTE, basic freesurfer recon-all should already be run on subjects before this longitudinal processing step

# see freesurfer_prep.sh script for details

wd=$(pwd)

#dirs=`ls -d1 ${wd}/* | awk -F/ '/'_tp'?[0-9]/ { print $NF } '`

subids=`ls -d1 ${wd}/* | awk -F/ '/'_tp'?[0-9]$/ { print $NF } ' | sed s/'_tp'[0-9]//g | uniq`

 

 

echo $subids

 

if [[ $# -lt 2 ]] ; then

  echo 'Usage: sh freesurfer_longitudinal_step2.sh [queue] [account_to_charge]'

  echo '[queue] = free | standard'

  echo '[account_to_charge] = DBKEATOR | DBKEATOR_LAB | UMAR_LAB'

  echo 'PLEASE ONLY USE THE FREE QUEUE UNLESS OTHERWISE INSTRUCTED'

  exit 0

fi

 

 

for subid in ${subids}; do

      #get list of timepoints from directory names

      timepoints=`ls -d1 ${subid}* | cut -d'_' -f2`

      len=`echo "${timepoints}" | wc -l`

      if [ ${len} -gt 1 ]

      then

 

            printf '#!/bin/bash\n' > freesurfer_${subid}_long_s2.sub

            printf '#SBATCH --job-name=fs_%s_tp%s_long\n' ${subjid} ${time} >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH -A %s\n' ${2} >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH -p %s\n' ${1} >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH --nodes=1\n' >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH --ntasks=1\n' >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH --cpus-per-task=1\n' >> freesurfer_${subid}_long_s2.sub

            printf '#SBATCH --error=slurm-%%J.err\n' >> freesurfer_${subid}_long_s2.sub

            printf 'module load freesurfer/6.0.1\n' >> freesurfer_${subid}_long_s2.sub

            printf 'source ${FREESURFER_HOME}/SetUpFreeSurfer.sh\n' >> freesurfer_${subid}_long_s2.sub

            printf 'export SUBJECTS_DIR=%s\n' ${wd} >> freesurfer_${subid}_long_s2.sub

            printf '#run freesurfer longitudinal workflow step 2\n' >> freesurfer_${subid}_long_s2.sub

            printf 'srun ${FREESURFER_HOME}/bin/recon-all -base %s' ${subid} >> freesurfer_${subid}_long_s2.sub

 

            for time in ${timepoints}; do

                  printf " -tp %s_%s" ${subid} ${time} >> freesurfer_${subid}_long_s2.sub

            done

            printf " -all\n"  >> freesurfer_${subid}_long_s2.sub

      fi

     sbatch freesurfer_${subid}_long_s2.sub

done

 

 

Just to clarify, just in case it's important, that there are 3 directories before running step 2, and after step 2 there is the main directory that is created. So initially, after running recon-all individually for each timepoint, there are just the timepoint directories (6008_tp1, 6008_tp2, 6008_tp3) and then after step 2 completes there are 4 directories (6008, 6008_tp1, 6008_tp2, 6008_tp3)

 

Thank you again!

 

Lisa


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: Tuesday, June 13, 2023 10:44 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Lisa,

 

I’m sorry that I didn’t make it clear.

 

From what I understand, your longitudinal processing should look like the following:

 

In step 1 (cross), you should have processed each of your time points separately, in your case, <tpNid> = 6008_tp1, 6008_tp2, 6008_tp3

recon-all -all -s <tpNid> -i path_to_tpN_dcm

 

In step 2 (base), recon-all -base <templateid> -tp <tp1id> -tp <tp2id> ... -all

You used 6008 for <templateid>, so your recon-all command should look like ‘recon-all -base 6008 -tp 6008_tp1 -tp 6008_tp2 -tp 6008_tp3 -all’.

 

I’m wondering if ‘-tp 6008_6008’ was passed to your ‘recon-all -base’ command. I was hoping to take a look of recon-all.log in your base directory - /dfs8/pub/ltaylor2/downs/6008/scripts/recon-all.log.

 

In step 3 (long), ‘recon-all -long <tpNid> <templateid> -all’. It should output in directory <tpNid>.long.<templateid>.

 

Best,

 

Yujing

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Taylor, Lisa
Sent: Tuesday, June 13, 2023 12:55 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Yujing,

 

I have attached recon-all.log for all 3 time points for this participant (is this what you mean?). Before running step2 of the long. processing, I have the setup the following directories for this participant:

6008_tp1

6008_tp2

6008_tp3

 

After step two, it creates the 6008/ directory and I am assuming the 6008_6008 to 6008.lta file, but I am not sure why because I don't originally have a 6008_6008 directory just the three above and the one that is created after step 2 (6008/). 

 

Is there something in my step 2 script creating this erroneous file?

 

Thank you again, Yujing, for helping try to solve this.

 

Lisa


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: Monday, June 12, 2023 2:27 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Lisa,

 

The first line of ‘base-tps’ is causing the error – ‘cp: cannot stat '/dfs8/pub/ltaylor2/downs/6008/mri/transforms/6008_6008_to_6008.lta': No such file or directory’.

 

Did you pass 6008_6008 as one of the time points for recon-all base processing?

 

Attached is the long processing. Can you attach recon.log for base processing?

 

Yujing

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Taylor, Lisa
Sent: Monday, June 12, 2023 4:32 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Yujing, 

 

I've attached the base recon-all.log for review. Not sure which directory would be considered cross?

 

There is a file name 'base-tps', and I am not sure why it populates a 6008_6008?

 

[ltaylor2@login-i16:/pub/ltaylor2/downs/6008] $cat base-tps

6008_6008

6008_tp1

6008_tp2

6008_tp3


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: Monday, June 12, 2023 1:11 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Lisa,

 

Can you show what your ‘base-tps’ in your base directory looks like? I think recon-all uses it to form the lta name (6008_6008_to_6008.lta).

 

Can you also send your recon-all.log for base and cross maybe?

 

Best,

 

Yujing

 

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Taylor, Lisa
Sent: Monday, June 12, 2023 3:18 PM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Yujing,

 

Yes, that is correct that 6008_tp1 is timepoint 1. Originally, I only had 6008_tp1,2 & 3, and when I ran step 2 the base was created. There were no errors when I ran step 2. Here's what's in the 6008/mri/transforms/ directory:

 

[ltaylor2@login-i16:/pub/ltaylor2/downs] $ls 6008/mri/transforms/

6008_to_6008_tp1.lta  

6008_tp2_to_6008.lta  

talairach.auto.xfm      

talairach.lta

6008_to_6008_tp2.lta  

6008_tp3_to_6008.lta  

talairach.auto.xfm.lta  

talairach.m3z

6008_to_6008_tp3.lta  

bak                   

talairach_avi.log       

talairach.xfm

6008_tp1_to_6008.lta  

cc_up.lta             

talairach_avi_QA.log    

talsrcimg_to_711-2C_as_mni_average_305_t4_vox2vox.txt

 

 

Thank you again for any feedback. 


From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> on behalf of Huang, Yujing <YHUANG43@mgh.harvard.edu>
Sent: Monday, June 12, 2023 6:58 AM
To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi Lisa,

 

I’m wondering what your naming convention is.

 

Here is tutorial page for longitudinal processing: MailScanner has detected a possible fraud attempt from "secure-web.cisco.com" claiming to be https://surfer.nmr.mgh.harvard.edu/fswiki/LongitudinalProcessing

 

Looking at your attached recon-all.log, I’m assuming ‘6008_tp1’ is your time point 1, and ‘6008’ is your base templateid from your recon-all -base.

 

What are the .lta files ouput from base process? If ‘6008’ is your base templateid, you should find them in $SUBJECTS_DIR/6008/ mri/transforms/.

How are your cross recon-all commands?

 

Best,

 

Yujing

 

 

 

 

From: freesurfer-bounces@nmr.mgh.harvard.edu <freesurfer-bounces@nmr.mgh.harvard.edu> On Behalf Of Taylor, Lisa
Sent: Thursday, June 8, 2023 5:08 PM
To: freesurfer@nmr.mgh.harvard.edu
Subject: [Freesurfer] Error in longitudinal process step 3

 

        External Email - Use Caution        

Hi,

 

I am trying to run the long. processing pipeline but I am having issues with step three. Here's the last lines in the recon-all log:

 

 cp -vf /dfs8/pub/ltaylor2/downs/6008/mri/transforms/6008_6008_to_6008.lta /dfs8/pub/ltaylor2/downs/6008_tp1.long.6008/mri/transforms/6008_6008_to_6008_tp1.long.6008.lta

 

cp: cannot stat '/dfs8/pub/ltaylor2/downs/6008/mri/transforms/6008_6008_to_6008.lta': No such file or directory

Linux hpc3-l18-04 4.18.0-425.10.1.el8_7.x86_64 #1 SMP Thu Jan 12 16:32:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

 

recon-all -s 6008_tp1.long.6008 exited with ERRORS at Mon Jun  5 10:04:45 PDT 2023

 

I recognize that 6008_6008_to_6008.lta is not correct, but I am not sure why it is trying to pull a file name like this instead of the following ones that are actually in 6008_tp1.long.6008/mri/transforms/ :

 

6008_to_6008_tp1.lta  

6008_to_6008_tp3.lta  

6008_tp2_to_6008.lta  

bak 

talairach.auto.xfm      

talairach_avi.log     

talairach.lta  

talairach.xfm
6008_to_6008_tp2.lta  

6008_tp1_to_6008.lta  

6008_tp3_to_6008.lta 

cc_up.lta 

talairach.auto.xfm.lta  

talairach_avi_QA.log  

talairach.m3z  

talsrcimg_to_711-2C_as_mni_average_305_t4_vox2vox.txt

 

Here is an example of how the scripts are set up when using the HPC3. I have also attached the some output files. Let me know if any more information is needed. 

#!/bin/bash

#SBATCH --job-name=fs_tp1_tp_long

#SBATCH -A ltaylor2

#SBATCH -p free

#SBATCH --nodes=1

#SBATCH --ntasks=1

#SBATCH --cpus-per-task=1

#SBATCH --error=slurm-%J.err

module load freesurfer/6.0.1

source ${FREESURFER_HOME}/SetUpFreeSurfer.sh

export SUBJECTS_DIR=/pub/ltaylor2/downs

#run freesurfer longitudinal workflow step 3

srun ${FREESURFER_HOME}/bin/recon-all -long 6008_tp1 6008  -all > out_fs_6008_tp1_long_output.txt

 

Please help! Thank you,

 

Lisa 

 

.

WARNING - This email originated from outside of the UCI Health email system. Do not click any links and do not open attachments unless you can confirm the sender. PLEASE FORWARD SUSPICIOUS EMAILS TO: security@hs.uci.edu

.