Show all posts by user
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
I recall that error from a while ago. What's the output of:
afni_system_check.py -check_all
and
align_epi_anat.py -version
by
Peter Molfese
-
AFNI Message Board
If you have equal numbers of participants in each group, you could use 3dANOVA3. If you have uneven groups and/or wish to use a covariate then use 3dMVM.
This page may be helpful for further distinguishing when certain programs are better than others.
by
Peter Molfese
-
AFNI Message Board
Hi Ranjan-
This is definitely possible in AFNI. As Daniel mentioned, the easiest thing to do would be to set the -master_epi. So a command like this would perform the alignment between anatomical and functional datasets (including removing motion correction and doing slice timing adjustments) while also putting the two datasets on the same grid (here being the size of the anatomical data:
by
Peter Molfese
-
AFNI Message Board
Also the script on the blog should run in only a couple of minutes!
by
Peter Molfese
-
AFNI Message Board
Hi Emily,
Sorry for the delay, I was attending a conference without much access to internet. To your question about running the script and it never finishing. Some things to check:
1) Make sure your bvec file is in the three column format (you can use 1dtranspose or 1dDW_Grad_o_Mat) to go from rows to columns).
2) Make sure you run the script in bash: sh Script.sh
3) The script takes
by
Peter Molfese
-
AFNI Message Board
Hi Emily,
It looks like even after DTIprep, there is some (very subtle) shifting in the registration matrix coming out of the align_epi_anat.py. This may be due to differences in cost functions between AFNI (mutual info) and DTIprep (not sure which cost function). I think the most straight forward options are:
1) Use the script as is and it should work fine for your data.
2) Instead o
by
Peter Molfese
-
AFNI Message Board
Can you provide me with the align_epi_anat.py command you are using? I can do some testing here and get back to you!
by
Peter Molfese
-
AFNI Message Board
Hi Emily,
We have a couple of scripts floating around for doing this. I wrote a modified version of @rotatevectorsallx1, which you can see here. Are you still using the data preprocessed with DTIprep, that may change the needs of the script a bit from the one I wrote, as DTIprep handles the motion and eddy correction.
-Peter
by
Peter Molfese
-
AFNI Message Board
You can use align_epi_anat.py to concatenate the transforms and even apply that transform to the stats dataset. Here I am going to assume that your epi+orig has already been time shifting and motion corrected as needed. Otherwise you might want to change the -prep_off option.
align_epi_anat.py \
-anat anat+orig. \
-epi epi+orig. \
-epi_base 0 \
-child_epi stats.tb4982+orig. \
-epi2
by
Peter Molfese
-
AFNI Message Board
It is generally recommended to use your anatomical file for alignment to a template (see this thread). The way that I would approach warping the statistics files out of 3dDeconvolve to a template is to first warp your individual subject anatomical file to a template and then apply that warp to your stats+orig dataset. This can be accomplished with:
@auto_tlrc -base TT_N27+tlrc -input anat+
by
Peter Molfese
-
AFNI Message Board
You will need to use one (or more) of the 3dNwarp* family. Everything can be done within 3dNwarpApply.
3dNwarpApply \
-prefix ROIinSubjectSpace \
-source MyROI+tlrc. \
-master NWARP \
-nwarp 'anat.un.aff.qw_WARP.nii anat.un.aff.Xat.1D' \
-iwarp -interp NN
The -iwarp inverts the warp.
by
Peter Molfese
-
AFNI Message Board
Matthew-
Can you give us more details about your analysis pipeline? Is this for fMRI? Are you using afni_proc.py? It sounds like you might be resampling your functional volumes to a 1mm^3 resolution, which would explain your large file sizes, which would slow down analysis time.
Peter
by
Peter Molfese
-
AFNI Message Board
Hi Matthew-
The major issue that comes to mind is that when you went to do group analyses, things would be on a different grid size. So then you would need to do something like 3dZeropad to get everything on the same grid and then make sure they line up, etc. This of course depends on when you were going to cutout the extra voxels.
Was there a particular step that you wanted to speed up
by
Peter Molfese
-
AFNI Message Board
Hi Paul,
You add the warp that would be in the -affter field to the -nwarp argument like so:
3dNwarpApply -nwarp 'anat.un.aff.qw_WARP.nii anat.un.aff.Xat.1D' \
-source stats.MID+orig \
-master NWARP
by
Peter Molfese
-
AFNI Message Board
It was likely due to the Mac formatted "new line character". I'm a big fan of tools like TextWrangler and BBEdit that allow you to change the new line character. Linux/Unix (AFNI friendly) use a "LF", Mac by default uses a CR, and Windows uses CRLF.
by
Peter Molfese
-
AFNI Message Board
3dAutobox can crop an image. Though I'm not sure the speed gains will be substantial, particularly when weighed against potential headaches later.
Many of the AFNI programs can accept a mask to reduce processing time, and high powered computing can be had for cheaper and cheaper (around $0.50 per hour on a beefy Linux virtual machine from either Amazon EC2 or Microsoft Azure).
by
Peter Molfese
-
AFNI Message Board
In the meantime, you could use a combination of 3dTstat and 3dcalc to get estimates of both of these.
by
Peter Molfese
-
AFNI Message Board
Looks like something odd is going on with the copy. Did you previously copy 3dvolreg to the /usr/local/freesurfer/bin folder?
cp /home/mareike/abin/3dvolreg /usr/local/freesurfer/bin/3dvolreg.afni
Are you using Freesurfer 5.1 or 5.3?
by
Peter Molfese
-
AFNI Message Board
I used to have difficulty getting DWIConvert to do the NRRD to NIFTI conversion. But the new version in Slicer seems to be working, though there are some interesting rounding differences when I check the b-vectors and b-values in the DICOM header compared to dcm2nii or other programs.
Slicer.app/Contents/lib/Slicer-4.4/cli-modules/DWIConvert \
--inputVolume /path/to/input/Subject1.nrrd \
by
Peter Molfese
-
AFNI Message Board
It looks like you may have the NeuroDebian version of AFNI installed. You can remove that (apt-get remove afni) and then grab the latest binaries (newer compared to the NeuroDebian) from this website.
by
Peter Molfese
-
AFNI Message Board
Freesurfer actually contains a copy of 3dvolreg (called 3dvolreg.afni). I've seen this issue resolved in the past by copying (or better yet linking) the AFNI version of the program to the appropriate freesurfer directory. Get the location of the Freesurfer version with:
which 3dvolreg.afni
and replacing that with the file from
which 3dvolreg
If the two commands above both g
by
Peter Molfese
-
AFNI Message Board
If you're following the Friedman & Glover (2006) paper "Reducing interscanner variability of activation in a multicenter fMRI study: Controlling for signal-to-fluctuation-noise-ratio (SFNR) differences" then my interpretation is:
1. Run afni_proc.py the way you normally would
2. Take your all_runs (identical to last pb file if you have only one run), run 3dTstat -cvarinv to
by
Peter Molfese
-
AFNI Message Board
You can add a covariate to 3dttest++ and then extract the ROI values with 3dmaskave or 3dROIstats.
by
Peter Molfese
-
AFNI Message Board
It looks like you've written a tcsh script, but you are executing it with Bash. Can you try executing it with the following and see if that fixes the error?
tcsh cmd.ap.CP10023
by
Peter Molfese
-
AFNI Message Board
I would apply 3dTstat to your errts or all_runs file (obviously the detrending depends on which of these you choose). The method used in some of the fBIRN papers is to take the SFNR within an "unrelated" ROI and regress that out of your other ROIs. But with 3dttest++ or 3dMVM, you can apply the SFNR as a voxel-wise regressor. There are certainly arguments both ways...
Other big
by
Peter Molfese
-
AFNI Message Board
> How do I get SFNR using afni_proc.py?
I believe the formula that is mentioned in one of the fBIRN articles is represented by:
3dTstat -cvarinv
by
Peter Molfese
-
AFNI Message Board
I would suggest that you start with the fBIRN project page. There are a series of references by Friedman, Glover, and others that talk about how to minimize between scanner differences by setting scan parameters similarly, collecting phantom data, and adjusting your analysis technique to include covariates (such as SFNR). I've had very good luck pairing these methods with the AFNI tools fo
by
Peter Molfese
-
AFNI Message Board
1. Yes, use the smoothed data for 3dFWHMx.
2. If you already have a template, then just mask it with 3dAutomask (or like SPM tool) and make sure that the mask covers the areas that you are interested in looking at statistically.
by
Peter Molfese
-
AFNI Message Board
Hi Andrea,
Others may differ on their opinions to this. The approach that you suggest is what I have used in the past, which showed good correspondence between the VBM8, FSL_Anat, and FreeSurfer pipelines (within reason that is).
0. Make sure you have smoothed the data in either SPM or AFNI.
1. Use 3dFWHMx to estimate the smoothness of each anatomical brain produced from VBM8 toolbo
by
Peter Molfese
-
AFNI Message Board
nicreap-
afni_proc.py (command line) and uber_subject.py (graphical user interface; GUI) are the "newer" superscripts in AFNI that will handle all of the data preprocessing and single-subject analysis, including (but not limited to) slice timing correction, motion correction, coregistration, normalization to a template, smoothing, scaling to percent signal change, and regression. As
by
Peter Molfese
-
AFNI Message Board