[RESOLVED] General_extract_glm_volumes failure

Description:

< I’m trying to extract the GLM effects of interest using “general_extract_glm_volumes”, but it doesn’t work.>

Call:

< Here is the command I run (through sshcpu on grace):

qxCntnr=/gpfs/project/fas/n3/software/Singularity/qunex_suite-0.90.1.sif
qunex_container general_extract_glm_volumes \
     --flist=DP5-2ndLevel-Placebo_noBF.list \
	 --outf=DP5_GLM_EM_PL_noBF \
     --effects="encode" \
     --saveoption="by_session" \
	 --container=$qxCntnr 

here is a part of the .list file I use:

session id: ta6143
file:/gpfs/project/fas/n3/Studies/Anticevic.DP5/GLM_EM/sessions/ta6143/images/functional/bold_Atlas_conc_AR_noBF_pl_DP5_EM_pl_s_res-menoBF_pl_Bcoeff.dtseries.nii
session id: ta5880
file:/gpfs/project/fas/n3/Studies/Anticevic.DP5/GLM_EM/sessions/ta5880/images/functional/bold_Atlas_conc_AR_noBF_pl_DP5_EM_pl_s_res-menoBF_pl_Bcoeff.dtseries.nii
session id: ta5927
file:/gpfs/project/fas/n3/Studies/Anticevic.DP5/GLM_EM/sessions/ta5927/images/functional/bold_Atlas_conc_AR_noBF_pl_DP5_EM_pl_s_res-menoBF_pl_Bcoeff.dtseries.nii![Screen Shot 2021-12-23 at 3.18.12 PM|690x89](upload://8sCtt9sjGs22hl0PZzGcbh5fr6H.png)
>

Logs:

< while it says check the log file in the output:
 ---> Setting up Octave  

 ---> QuNex environment set successfully! 


 ........................ Running QuNex v0.90.1 ........................ 


    ---> Resetting to defaults: 


 ==> Note: general_extract_glm_volumes is part of the QuNex MATLAB.


--- Full QuNex call for command: general_extract_glm_volumes 

gmri general_extract_glm_volumes --flist="DP5-2ndLevel-Placebo_noBF.list" --outf="DP5_GLM_EM_PL_noBF" --effects="encode" --saveoption="by_session" 

--------------------------------------------------------- 



Running:
>>> general_extract_glm_volumes('DP5-2ndLevel-Placebo_noBF.list', 'DP5_GLM_EM_PL_noBF', 'encode', [], 'by_session', '', [], '')


Matlab Error! Processing Failed!
structure has no member 'glm'


ERROR: general_extract_glm_volumes failed! Please check output / log!

>

** For an example of how to report an issue, please refer to this post.

Hi! We will take a look at this and get back to you once we figure out what is going on.

Hi!

Thank you for your report! The general_extract_glm_volumes function looks for glm files in the file list. These have to be specified as:

session id: ta6143
    glm:/gpfs/project/fas/n3/Studies/Anticevic.DP5/GLM_EM/sessions/ta6143/images/functional/bold_Atlas_conc_AR_noBF_pl_DP5_EM_pl_s_res-menoBF_pl_Bcoeff.dtseries.nii

As no glm entries were found for the listed sessions, the function referenced a non-existing field and exited with an error. The solution is to adjust the list file and replace file: specifications with glm: specification. I have prepared and tested a corrected file list file, which you can find here:

/gpfs/gibbs/pi/n3/Studies/Anticevic.DP5/GLM_EM/analysis/SecondLevel/

along with the results. The fact that glm files have to be specified using the glm: rather than a general file: definition was not present in the inline documentation. I have now changed the relevant part of the inline help so that the specification is clearer:

   --flist       List of files / sessions to process. For each session id 
                 in the list, there has to be a `glm:` file listed that 
                 is a result of GLM analyses (a 'Bcoeff' file).

Also, the function will now explicitly check that all sessions listed in the list file have a glm: entry. It will print out a warning and exit with a clear error if that is not the case. Example:

...
     WARNING: Session id: pb3425 has  no glm file specified!
     WARNING: Session id: pb2572 has  no glm file specified!
     WARNING: Session id: pb4039 has  no glm file specified!
ERROR: Some sessions do not have a glm file specified in the file list.
       Please, check your list file!

The listed changes will be a part of a future QuNex release.

The next release (0.92.0) should be out within a week or so and it will include Grega’s patch.

For future use of list files, the descriptors in use are listed in the specification of the file format on the QuNex wiki page.