AFNI version info (afni -ver): Precompiled binary macos_13_ARM: Feb 20 2025 (Version AFNI_25.0.06 'Severus Alexander')
Hello!
I am trying to generate a customized TSNR stats table in the APQC HTML report, instead of just using the default 12 pre-selected regions.
The regions I want to use are: L. caudate, L. nucleus accumbens (NAcc), L. precuneus, L. ventral striatum, R. anterior inferior parietal lobule, R. caudate, R. dorsomedial prefrontal cortex, R. NAcc, R. posterior cingulate cortex (PCC), R. putamen, and R. ventral striatum.
Now, I understand that I need to specify an atlas dataset using the -ROI_import option, and then use the -regress_compute_tsnr_stats option to specify the desired ROIs in that atlas.
However, I don't know how to find an atlas that has the regions that I want to use or how to create one, while ensuring that it is in the final space of the EPI data. I am using the "MNI152_2009_template.nii.gz " template.
How can I proceed with this analysis? Is there some tutorial on this somewhere?
There are a few things you can do to find out which atlases have which atlases. In AFNI, the easiest thing to do is to look at the template you have and see which regions are at the location you click on in the GUI with the whereami functionality. Right-click on the image to open up that interface.
Programmatically, there are other ways - like the ones mentioned here:
To see which atlases and templates are in which spaces, you can use "whereami -show_atlases" for all the atlases and templates, as shown in this previous post:
Indeed, there are many atlases out there, and not all of them have what you want defined in a single set together. So, you might have to put together a "Frankenstein's atlas". You might also have to approximate some ROIs you want from ones called something else.
Some of what you want exists in the Freesurfer atlas, so you should be able to use the "FS.afni.MNI2009c_asym.nii.gz" that we distribute. For example, it has these (with L- or R- hemisphere partners):
Left-Caudate
Left-Accumbens-area
ctx_lh_G_precuneus
Right-Putamen
... and several parietal things you can check out for appropriateness:
Thank you for your detailed responses, Daniel and Paul.
While the idea of putting together a "Frankenstein's atlas" sounds like the way to go and what I'd have to do eventually, I think using the Freesurfer atlas for MNI 2009c asym template is sufficient for now and the path of least resistance. I have a few follow-up questions though.
In -regress_compute_tsnr_stats <label> ROI1 ROI2 ROI3 ..., do I put the integer code associated with each ROI when specifying ROIx?
Is there a straightforward/direct way of creating a copy of an atlas (e.g. the Freesurfer atlas mentioned above) and only keeping the desired ROIs in it?
In future, when I need to create a Frankenstein's atlas, is this tutorial sufficient?
You could make a new dset with the subset of regions, but I wouldn't really see the benefit of it here. You get to specify the subset for the table with the -regress_compute_tsnr_stats .., option, so that should be fine. If you really wanted to (again, I don't recommend here), you could use different variations of 3dcalc, like:
3dcalc -a FS.afni.MNI2009c_asym.nii.gz"<8,7,2087>" -expr 'a' -prefix short_atlas.nii.gz
But then you should perhaps copy over the full atlas for labels, and mark the header to have ROI-like colorbar, so then you would run:
... and if DSET_FRANK_overlap.nii.gz has nonzero values, then you have overlap. And a headache to decide what to do---but at least you know there was an issue.
And if you have the same ROI value in the two atlases, then you have to reassign one... life becomes tricky. If you have to offset one, you could add a large number to the atlas values that is "safe" to get above the values in the other. So, like, offsetting by 10000 here:
If the offset is large enough, you also have to make sure that the datum type of the dset can handle it. Like, a byte type dataset couldn't handle a 10000 offset. To check datum type, 3dinfo -datum DSET.
Thank you so much for the detailed and clear answers to all my questions. I think this is exactly what I was looking for and I can now try these out to confirm if it all works for me.
One question I had about the Frankenstein atlas is that if we have an atlas in the MNI space and one in the TT space, we would first have to transform one of the atlases (e.g., the TT space atlas) to the other's space (e.g., the MNI space) before using 3dcalc to combine them, right? Could you please share the command one can use for that as well?
Be careful mixing Talairach and MNI atlases. There have been several discussions over the years on this message board, like the one linked below. The transformations have been done in a variety of ways over the years. For some of the atlases, you can find them in either space. Of course, you will have to consider the specific MNI 2009c asymmetric - 1mm space. If you put the atlas regions into a single atlas, then you will also have to consider how to deal with overlapping regions. You can use multiple atlases instead of combining them too.
Thanks again, Daniel and Paul, for the guidance and words of caution.
It seems that the ROIs I wanted that are missing from the FS AFNI MNI2009c asym atlas are not present in other atlases anyway, so I am going to move forward without combining any atlases. If/when I need to do so in the future and I need to combine ROIs from incongruent atlases, the links in the message board discussion Daniel mentioned above seem like a good starting point.
Glad you got most of this worked out. For the missing regions, I would think that the Pauli subcortical atlas would provide a couple of these - nucleus accumbens, putamen. The ventral striatum includes the nucleus accumbens with the olfactory tubercule together. The olfactory tubercule is available in the AAL3 atlas. We provide a tweaked version of the Pauli atlas and also the AAL3 atlas.
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.