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 usually do something like:
Sub100.stat_tlrc."[$num]"
by
Peter Molfese
-
AFNI Message Board
Yes, you need to use the flag multiple times (in your case 4 times) as it gives only one cell. "-xmean i j prefix estimate mean of cell at level i of factor A, level j of factor B"
by
Peter Molfese
-
AFNI Message Board
AFNI includes 3dICA.R (info here). But you are probably looking for something that can do group level analyses with more options. I would suggest either GIFT or FSL's MELODIC. Because all of the major packages support NIFTI, you can use data preprocessed in AFNI with other packages.
by
Peter Molfese
-
AFNI Message Board
You can certainly use 3dttest++ for these analyses. Gang had posted a while back about how to get information about interactions and testing a 2x2 design. I would probably use 3dMVM, which can be used with your design and will likely be more straightforward to work with.
by
Peter Molfese
-
AFNI Message Board
Per Daniel's suggestion:
3dcalc -a roi_01.nii.gz -expr '0' -prefix roi_00.nii.gz
3dTcat -prefix AllROIs_OneFile roi_??.nii.gz
3dTstat -argmax -prefix VisAllROIs AllROIs_OneFile
Thanks Daniel, I forgot about that 0 value dataset that we throw away in the Atlas!
by
Peter Molfese
-
AFNI Message Board
You will need both the 3dTcat and 3dTstat commands. If the only thing in the folder you are running the command in are the ROIs you can use a * as a wildcard to select all NIFTI files in that folder:
3dTcat -prefix AllROIs *.nii
3dTstat -argmax -prefix VisAllROI AllROIs+tlrc.HEAD
by
Peter Molfese
-
AFNI Message Board
mb,
Yes, you can concatenate all of the ROIs via 3dTcat, but you still need to run 3dTstat -argmax. Otherwise each ROI becomes a sub-brick in the dataset, whereas you probably want them all to be in a single sub-brick for visualization or tools like 3dROIstats.
PM
by
Peter Molfese
-
AFNI Message Board
Sadly the edit button on posts seems to be missing:
3dTstat -argmax -prefix VisAllROI ALL_ROIs+tlrc
by
Peter Molfese
-
AFNI Message Board
If you have 300 separate NIFTI Files, my current favorite way to combine all ROIs and visualize them is a trick that Daniel Glen posted a while back. I assume your ROIs are named something like roi_01.nii, roi_02.nii but you can use the wildcards to fit your particular data.
Start by concatenating all of your ROIs together:
3dTcat -prefix All_ROIs roi_??.nii
Then use argmax in 3dTsta
by
Peter Molfese
-
AFNI Message Board
As Gang said, you have already defined the groups via setA and setB. If you wanted to use a continuous covariate (or additional covariate) like IQ, you would want to do something like:
subject IQ
S8c 101
S2c 110
S9c 130
S1 98
S5 106
S4 111
by
Peter Molfese
-
AFNI Message Board
The covariate file should be similar to the 3dttest++ covariate file. From the help:
-covariates cf = Read file 'cf' that contains covariates values for each dataset
input (in both -setA and -setB; there can only at most one
-covariates option). Format of the file
FIRST LINE --> subject IQ age
LATER LINES --> Elvis 1
by
Peter Molfese
-
AFNI Message Board
It used to be (and may still be) that mri_convert can read AFNI HEAD/BRIK files, but cannot write them - hence the "write unsupported" error. You should try your convert function to NIFTI. That said, I'm still fairly sure that a thickness file is a surface that should be converted via mris_convert or the above mentioned mri_surf2vol command.
I also vaguely recall that @SUMA_
by
Peter Molfese
-
AFNI Message Board
You may be able to use stim_times_IM with a fixed-shape HRF (e.g. GAM) and get the amplitude measure for each trial. One previous post that may be helpful
[-stim_times_IM k tname Rmodel]
Similar, but each separate time in 'tname' will get a separate
regressor; 'IM' means 'Individually Modulated' -- that is,
by
Peter Molfese
-
AFNI Message Board
In AFNI, you would run 3dFWHMx on your residual time series (errts) to get estimates of smoothness for each individual. Assuming those estimates are similar across all subjects, you then average those smoothness values (xyz) as your input for 3dClustSim.
In SPM, you may be able to use spm_est_smoothness() on each individual subjects ResMS.hdr. The suggestion from Andy's Brian Blog .
by
Peter Molfese
-
AFNI Message Board
Is there any chance that your path names have a space in them?
by
Peter Molfese
-
AFNI Message Board
Could you post the entire output of afni_proc.py? That may give enough clues about what is going wrong.
by
Peter Molfese
-
AFNI Message Board
You should be able to use 3dNwarpApply to apply the nonlinear warp acquired via auto_warp.py to your GM volume. Because auto_warp.py runs both an affine and a nonlinear, it may be necessary to concatenate the two transforms, which you can do within the same command.
Your command to warp the GM mask would go something like this:
3dNwarpApply -master anat_ns+tlrc -dxyz 3 \
-source GM+
by
Peter Molfese
-
AFNI Message Board
I believe the -fraction option of 3dToutcount will give you what you need.
3dToutcount -automask -fraction epi+orig.
Automask should reduce to the number of voxels in the EPI. But you could also supply your own mask. If you run 3dToutcount without a mask, then you will be asking for outliers both in the brain and outside of the brain. You can get the total number of voxels by running
by
Peter Molfese
-
AFNI Message Board
Try 3dUndump for making the mask and then 3dmaskave or 3dmaskdump.
by
Peter Molfese
-
AFNI Message Board
That's correct, you would need to have -xsave specified.
by
Peter Molfese
-
AFNI Message Board
A 1D file should just be text and can be read with any text editor (emacs, nano, vi, cat, etc). You can translate it to a CSV using a number of tools (emacs, sed, tr, excel, R).
However, there are a number of AFNI programs for dealing with 1D files. 1dcat can give you individual columns, rows, etc or add columns to a 1D file. 1deval can perform calculations or functions on 1D files. You
by
Peter Molfese
-
AFNI Message Board
Hi Emily,
I think you can use the brain.nii from freesurfer. That should line up with everything else.
PM
by
Peter Molfese
-
AFNI Message Board
Emily,
You might try warping the original brain to MNI space and then using adwarp to apply that warp to the GM mask. Given that the MNI152 is fairly blurry and segmentations can be a bit blurry, this might be some of the problem. I modified your code bit below, also I treated them as if they are AFNI datasets and not NIFTI simply because I like having the view immediately apparent.
@
by
Peter Molfese
-
AFNI Message Board
I found that there is a recommendation in another post to use the internal blur feature of 3dQwarp on both the template and input brain (-blur 3 3) when using the TT+N27 template. The current implementation in auto_warp.py (called from afni_proc.py) currently uses blur for the input but not the template (e.g. -blur 0 3). Suggesting that it would be better at performing a warp to a blurry templa
by
Peter Molfese
-
AFNI Message Board
I've also had some problems with residual dura affecting the nonlinear warp. -init_radius works somewhat for me, though I've also started using the Skull Strip from Freesurfer. I find that the -gcut option works incredibly well in many cases. Like everything else, it doesn't work all the time.
by
Peter Molfese
-
AFNI Message Board
It's possible... but an easier route is to run another 3dDeconvolve with the -xrestore option and add your GLT to that.
by
Peter Molfese
-
AFNI Message Board
I believe the warning you are referring to in the viewer says - "The underlay/overlay pair of datasets have oblique angle difference of X.XXXXX degrees. This may cause them to appear out of alignment in the viewer. If you are performing spatial transformations on an Oblique dset, or viewing/combining it with volumes of different obliquity you should consider running 3dWarp -deoblique on th
by
Peter Molfese
-
AFNI Message Board
You can use either align_epi_anat.py or afni_proc.py with the align block, to take care of the issue.
For more general information about Obliquity, see Daniel Glen's helpful page:
by
Peter Molfese
-
AFNI Message Board
QuotedblissFair enough, but the call to cat_matvec is described as catenating the volreg and epi2anat transformation, but it is catenating the anat2epi transformation with the volreg one.
Adding the -I option after an input in cat_matvec will invert the transformation matrix. So while the file is the anat2epi transform, the inverse is the correct epi2anat transform.
You can (and should)
by
Peter Molfese
-
AFNI Message Board