- qx_mri.general.general_glm_predict(flist, effects, targetf, options)#
general_glm_predict(flist, effects, targetf, options)
Computes predicted and residual signal based on GLM.
The function is based on the provided GLM file and (optionally) raw bold data.
- --flist (str):
Either a .list file listing the subjects and their files to use, or a well strucutured file list string (see general_read_file_list). The information should include at least glm: entries for each session, as well as raw bold or conc files if residuals are requested.
- --effects (cell array | str):
Either a cell array or a comma separated string listing the names of the effects that should be included in the prediction.
- --targetf (str, default '.'):
The folder to save images in. It has to specify either a target folder for all processed data or the location of session functional images folder.
- --options (str, 'default predicted_tail=|residual_tail=|save=|ignores>predict:mark,regress:mark|indtargetf=sfolder|bold_variant=|addidtofile=false|verbose=true|verboselevel=high'):
A string specifying additional analysis options formated as pipe separated pairs of colon separated key, value pairs:
It takes the following keys and values:
The tail to use for the predicted data. If no tail is provided, a '_pred-<effects abbreviation> tail will be added to the glm file name. <effects abbreviation> will be the first letters of all the predicted regressors. ['']
The tail to use for the residual data. If no tail is provided, a '_res-<effects abbreviation> tail will be added to each of the source BOLD files. <effects abbreviation> will be the first letters of all the predicted regressors. ['']
A comma separated string, listing the files to save ['']:
save predicted bold timeseries
save residual bold timeseries
How to deal with frames that were marked as bad and ignored when GLM solution was completed. The information should be specified separately for predicting timecourse and regressing signal:
The options have the following meaning:
keep the value in the original BOLD (only applicable to regressed signal)
mark the bad frames by setting the value to "NaN"
interpolate values for bad frames using linear interpolation
interpolate values for bad frames using spline interpolation
The default is 'ignores>predict:mark,regress:mark'
In case of group level extraction, where to save the individual data ['sfolder']:
in the group target folder
in the individual session folder
An optional string that specifies the tail to be added to the session 'image' subfolder if one is used. The target location will then be: <targetf>/<subjectid>/images<img_suffix>/functional<bold_variant> ['']
An optional string that specifies the tail be added to the session specific 'functional' subfolder if one is used. The target location will then be: <targetf>/<subjectid>/images<img_suffix>/functional<bold_variant> ['']
When running single session extraction or when saving to the individual session functional images folder, whether to add subjectid to the single session filename, if one is provided ['false'].
Whether to be verbose 'true' or not 'false', when running the analysis ['true']
Whether to be very detailed 'high' or not 'low', when reporting progress ['high']
If indtargetf is set to 'gfolder', all the resulting files will be saved in the same folder, specified by targetf parameter. If indtargetf is set to 'sfolder', then the results will be saved in the subject specific sessions subfolders within the sessions folder specified by the targetf parameter. If the files are in a variant functional folder, then the 'bold_variant' option has to be specified. In this case the location where the files will be saved is specified by:
The functions computes predicted timeseries and (if requested) residual after removal of the predicted signal, and saves the results.