Hello there;
i am tring to do the group analysis resting-state fmri using the 3dttest manually (because it can not import PyQt4.QtGui).
any way when i type the 3dttest commands to the Ubuntu terminal like this;
#!/bin/tcsh -xef
created by uber_ttest.py: version 2.0 (December 28, 2017)
creation date: Wed Feb 19 11:33:21 2020
---------------------- set process variables ----------------------
set mask_dset = /home/osman/Deneyler/s01/s01.results/pACC.z+tlrc
set dirA = /home/osman/Deneyler
specify and possibly create results directory
set results_dir = test.results
if ( ! -d $results_dir ) mkdir $results_dir
------------------------- process the data -------------------------
I think that particular error message means that “$mask_dset” is somehow purely empty, and therefore it looks like nothing is there, and that “-setA” is the name of the mask dataset… which the code is having a hard time opening, hence the error.
So, I think you should verify that you have set mask_dset correctly—e.g., with a print statement prior to that?
Note once that is solved, you can use AFNI’s gen_group_command.py to set up the ttest for you, writing the command to a text file (here, called cmd_ttest.tcsh), which you can then execute (e.g., “tcsh cmd_ttest.tcsh”):
Indeed, or maybe mask_dset is an empty string, and 3dttest++ is reading “-setA” to be the mask dataset name, instead (hence it would not even see -setA as an option).
And certainly Paul’s suggestion is a good one, as usual. If you are used to using uber_ttest.py, then gen_group_command.py is a fine alternative.
thank you ptaylor:
after i make sure that the file pACC.z+tlrc in the right directory. i run the command you suggested above like this:
set dirA = /home/osman/Deneyler
set mask_dset = /home/osman/Deneyler/s01/s01.results/pACC.z+tlrc
gen_group_command.py
-command 3dttest++
-write_script cmd_ttest.tcsh
-prefix out_ttest
-dsets $dirA/s01/s01.results/pACC.z+tlrc*HEAD
-subs_betas ‘0’
-options
-mask ${mask_dset}
this created a script file in the same directory named cmd_ttest.tcsh. whivh content is:
when ı run this script to the terminal i get this error message:
++ 3dttest++: AFNI version=AFNI_22.1.04 (Apr 18 2022) [64-bit]
++ Authored by: Zhark++
++ option -setA :: processing as LONG form (label label dset label dset …) + WARNING: -setA: LONG form dataset label ‘pACC.z+tlrc.HEAD’ looks like a dataset name – is this OK ?!?
** FATAL ERROR: Option -setA: can’t open dataset '/pACC.z+tlrcHEAD[0]’
** Program compile date = Apr 18 2022
Can you please copy+paste the contenst of cmd_ttest.tcsh again? That doesn’t seem to be something program would output to me. It should just be a 3dttest++ command, with no variables and a long list of datasets.
Hi rick-
i am using Ubuntu 20.04 and i converted it frombash to tcsh but still get the same resulted script.
here is the command used to execute the cmd_ttest.tcsh script:
set dirA = /home/osman/Deneyler
set mask_dset = /home/osman/Deneyler/s01/s01.results/pACC.z+tlrc
gen_group_command.py
-command 3dttest++
-write_script cmd_ttest.tcsh
-prefix out_ttest
-dsets $dirA/s01/s01.results/pACC.z+tlrc*HEAD
-subs_betas ‘0’
-options
-mask ${mask_dset}
That particular text output is a tcsh script to execute (which looks okay, except for having only 1 dataset listed).
Have you executed that script? And using what command?
For example :
tcsh -x cmd_ttest.tcsh
To get more subjects, the previous script should have wildcards in place of s01/s01, e.g. s*/s* .
To back up a moment, the purpose of gen_group_command.py is to help write the script for 3dttest++ for example, while allowing one to use wildcards to select subject datasets. It has a similar functionality to that of uber_ttest.py, except that it does not have a graphical interface.
Typically, you should not edit it resulting command script (in this case, the script that runs 3dttest++).
We can fix the problems with the 3dttest++ script (the data_dir has been altered, and there is a wildcard character in it), but it is the gen_group_command.py script that should really be fixed, and then it will create the 3dttest++ command script, which you should try not to edit.
The way you are running the 3dttest++ script is good, you can even run the gen_group_command.py script that way. But let’s now back up and fix the ggc one.
The gen_group_command.py script seemed okay, except that it selected datasets using:
-dsets $dirA/s01/s01.results/pACC.z+tlrc*HEAD \
But that will not list all datasets, because they are not all in the s01 directory. Try something like:
now when i run this script like that tcsh -x cmd_ttest.tcsh i get this error message:
osman@osman-VirtualBox:~/Deneyler/s01/s01.results$ tcsh -x cmd_ttest.tcsh
set data_dir = /s*/s*.results
set: No match.
But back to that first command, you still seem to be running it via bash, the wildcard expressions are failing to match any files, and it is therefore putting wildcard characters into the ttest++ script. Those “set dirA = …” types of commands are not in bash syntax.
The ggc command is using tcsh syntax in bash, and it is not working.
Do not execute ggc on the command line (if you are), but put that in its own tcsh script, and run it via the same “tcsh -x SCRIPT …” syntax as with the 3dttest++ one.
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.