Please forgive this very specific question. I just attended an AFNI Bootcamp (best 5 days of my life) where as part of the handouts you guys provided us with some “c” and “p” scripts in an “AFNI_pamenc” folder.
I was enthralled by how streamlined these scripts made things so have edited them for my own purposes. I have had some registration issues, though, so I basically re-wrote “c.ss.1.sswarper” to perform 3dQwarp after some anatomical manipulation Daniel helped me with because he is wonderful and I love him. I then applied the requisite manipulation to the “c.ss.3.AP.pamenc” script and everything runs fine.
The problem is that with 3dQwarp you don’t actually supply the aff12.1D file that is the first entry to cat_matvec because the T1 → MNI registration warp you get out of 3dQwarp includes both the affine and nonlinear transformation.
My question is - if using these scripts is there any easy way you can think of that can be added or amended to the “c” or “p” script to remove this line from the cat_matvec command? Since the “p” script calls the “c” script which created AND calls the proc script my current solution is to run the “p” script to generate the proc script then quit the program, edit the proc script and then directly call the proc script after editing but this defeats the whole purpose of the “p” and “c” scripts and if I’m going to do this I should just use the proc command on its own. I haven’t found anything in the proc. help regarding cat_matvec so just figured I could ask because these “p” and “c” scripts have really streamlined things for me and I’d hate to let them go so easily.
Thanks so much for your wonderful resources and help. You’re all amazing.
It’s great to hear that you enjoyed the bootcamp, and also that you find those “p” and “c” scripts useful!
To use only the non-linear transformation with afni_proc.py you could cheat, and make an affine transformation that is the identity, which is just a row of 12 zeros (0 0 0 0 0 0 0 0 0 0 0 0). That file (e.g. IDENTITY.aff12.1D) could then be passed to afni_proc.py as part of -tlrc_NL_warped_dsets.
Does that seem reasonable?
On a related note, what manipulations were needed before running 3dQwarp? Or what issues seemed to impede @SSwarper?
Thanks for your response! The identity solution seems completely reasonable, thank you for suggesting it.
I was having issues aligning my T1 to my EPI. Daniel suggested that the skullstrip was, ironically, doing TOO GOOD of a job and removing some CSF that could have been used to better align my EPI so the solution was a dilated version of skullstrip. However, I have performed both this tactic as well as SSWarper and the statistical results for some of my participants come out very similar. I may end up using the SSWarper version of the script templates except in cases where there are alignment issues and then I can insert the identity as you suggested.
Thank you again for your suggestion as well as for everything else!
Lauren
Daniel also mentioned that also zeros might only work to specify an IDENTITY transformation in the parameter form (-1Dparam_apply), and that the matrix form (-1Dmatrix_apply) might need to be proper (i.e. 1 0 0 0 0 1 0 0 0 0 1 0 - the first 3 rows of a 4x4 identity matrix). That should certainly work, the possibility of all zeros working would just be a convenience.
It would indeed be helpful to see some of the data, to get a better idea of what is going on.
Note that none of these alignment adjustments should have much affect on the single subject statistical results. The differences should mostly amount to different resamplings of the data, so the overall results should not really vary much. The real difference should come at the group level. The purpose of EPI <-> anat <-> template registration is for group alignment, not to affect single subject results.
rick
The
National Institute of Mental Health (NIMH) is part of the National Institutes of
Health (NIH), a component of the U.S. Department of Health and Human
Services.