[RESOLVED] General_extract_glm_volumes failure


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


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

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

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

session id: ta6143
session id: ta5880
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)


< 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" 


>>> 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.


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

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:


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.