3dNetCorr error message


I’ve been trying to get 3dNetCorr to work but I keep getting the following error message: **ERROR: Need to load ROIs with >=1 subbrick…

3dNetCorr -inset Users/rs-fMRI/subject_[0-9][0-9][0-9][0-9][0][1]RSfMRI.nii -in_rois /Users/3dROIMaker/3droimaker_subject[0-9][0-9][0-9][0-9][0][1]GM.nii* -fish_z -ts_wb_corr -mask /Users/rs-fMRI/subject[0-9][0-9][0-9][0-9][0][1]_RSfMRI.ica*/reg_standard/*mask.nii.gz -prefix 3dNetcorr

I’m trying to run multiple subjects at once.

When I use this same command but for one subject it seems to work. But as soon as I try to run multiple subjects at once through 3dNetCorr it doesn’t seem to work.

Also, another question I had was: Can I get 3dNetCorr to output an averaged functional correlation coefficient matrix for all the subjects I’m running (instead of outputting a correlation coefficient matrix for each subject, individually)?

Thanks for your time.

Hi, Sondos-

I don’t think you can run multiple runs that way. You could loop through things, something like


foreach ii ( `seq 0 1 9` )
    foreach jj ( `seq 0 1 9` )
        [and here you can use ${ii} and ${jj} in variable names]

but the way you have written it, you would need a lot of loops, and I don’t quite understand some of the file naming as listed. Also, unless you have >1000 subjects (as guesstimated by having 4 digits in the numbers), you would also have to check whether the given file existed:


if ( -e FILE ) then
    [do something]

Also, I’m assuming in the first file name, that a slash “/” should precede “Users” in the path name of the file.

If you do something like this:


set allfiles = `ls /Users/rs-fMRI/subject_*_RSfMRI.nii`

foreach ff ( $allfiles ) 
    set bname = `basename $ff`
    set aa = $bname:gas/subject_//
    set nums = $aa:gas/_RSfMRI.nii//

    set my_roi = `ls /Users/3dROIMaker/3droimaker_subject${nums}_GM.nii*`
    set my_mask = `ls /Users/rs-fMRI/subject_${nums}_RSfMRI.ica*/reg_standard/*mask.nii.gz`

    3dNetCorr  -inset $ff -in_rois $my_roi -fish_z -ts_wb_corr -mask $my_mask -prefix 3dNetcorr_$nums 

… that might work, assuming all the files with matching numbers (stored in the variable “$nums” in the loop) exist. Note that this is also assuming that the number of bricks in your “-in_rois …” file matches that of your “-mask …” file; from the error message your reported, I wonder if you have more bricks in one file (say, the mask file) than in the GM file.