AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
January 18, 2022 09:45PM
Our imaging team is running a pre-processing script on our imaging data, and we are getting the error message ""Could not open matrix file epi2anat.mat"

Here is what our script looks like:

#!/bin/tcsh

# This script does motion correction, field-map correction and registers the functional to the anatomical.
# To QC the results, you need to overlay coreg_slice_e2a over the anatomical image to make sure the alignment
# is good.

set rawDataDirectory = /Users/naiirlab/Documents/MRI_Raw_Data
set subjectsDirectory = /Users/naiirlab/Documents/MRI_Scan_Data

foreach subj ( TD004 )

echo
echo "Processing functional for ${subj}... "

echo
echo "Motion correction..."
cd ${subjectsDirectory}/${subj}/rest
mkdir motion
3dvolreg -zpad 4 -tshift 0 -base 90 \
-1Dmatrix_save motion/${subj}_vr -nomaxdisp -1Dfile motion/${subj}_vr_motion.1D \
-prefix ${subj}_resting_moco.nii.gz rest.nii.gz

echo
echo "Reorienting to LPI..."
cd ${subjectsDirectory}/${subj}
fslreorient2std ${subj}_resting_moco.nii.gz ${subj}_resting_moco_LPI

echo
echo "Coregistering EPI to anatomical..."
cd ${subjectsDirectory}/${subj}/rest

3dcalc -a ${subj}_resting_moco.nii.gz'[0]' -prefix coreg_slice.nii.gz -expr "a"
flirt -ref ${subjectsDirectory}/${subj}/anat/${subj}_anat_biascorr_brain.nii.gz -in coreg_slice.nii.gz -out coreg_slice_e2a.nii.gz -omat epi2anat.mat -cost corratio -dof 6 -interp trilinear

end

The above script creates the matrix file, but it defaults to a Matlab file with the suffix .mat. We have tried running it as a 1D file as well, but we still get the same result, that we cannot open the matrix file. So we are thinking that there is a problem in this step. How can we correct this?
Subject Author Posted

AFNI Pre-Processing Issue

naiirlab January 18, 2022 09:45PM

Re: AFNI Pre-Processing Issue

jbteves January 19, 2022 08:37AM

Re: AFNI Pre-Processing Issue

naiirlab January 25, 2022 03:52PM

Re: AFNI Pre-Processing Issue

Peter Molfese January 26, 2022 10:49AM

Re: AFNI Pre-Processing Issue

Peter Molfese January 19, 2022 02:20PM