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)?
I don’t think you can run multiple runs that way. You could loop through things, something like
#!/bin/tcsh
foreach ii ( `seq 0 1 9` )
foreach jj ( `seq 0 1 9` )
[and here you can use ${ii} and ${jj} in variable names]
end
end
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:
#!/bin/tcsh
if ( -e FILE ) then
[do something]
endif
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:
#!/bin/tcsh
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
end
… 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.
–pt
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.