I would use @MakeLabelTable to do this, I think.
Also, what format are your ROIs in? Are they individual NIFTI files, each one a (binary) mask?
To be an "atlas", the basic process will be to make a single volume, where each ROI is made up of voxels of a different integer (they need not be consecutive 1...N). You can then associate a string label with each integer, if you would like.
It depends how much you really want to make an *atlas* specifically, vs how much you just want a volume of ROIs with labels attached.
For making an atlas *specifically*, you might want to see the documentation here, under the section "How to make an atlas for yourself":
[
afni.nimh.nih.gov]
But to make a volume that is an ROI map for running 3dNetCorr, then I would just use @MakeLabelTable; how the ROIs get combined into a file depends on the format they are in now (see above question on that).
The 3dNetCorr documentation on its partial correlation is:
-part_corr :output the partial correlation matrix. It is
calculated from the inverse of regular Pearson
matrix, R, as follows: let M = R^{I} be in the inverse
of the Pearson cc matrix. Then each element p_{ij} of
the partial correlation (PC) matrix is given as:
p_{ij} = -M_{ij}/sqrt( M_{ii} * M_{jj} ).
This will also calculate the PC-beta (PCB) matrix,
which is not symmetric, and whose values are given as:
b_{ij} = -M_{ij}/M_{ii}.
Use as you wish. For both PC and PCB, the diagonals
should be uniformly (negative) unity.
--pt