workflows.fmri.fsl.estimate¶
create_fixed_effects_flow()¶
Create a fixed-effects workflow
This workflow is used to combine registered copes and varcopes across runs for an individual subject
Example¶
>>> fixedfx = create_fixed_effects_flow()
>>> fixedfx.base_dir = '.'
>>> fixedfx.inputs.inputspec.copes = [['cope1run1.nii.gz', 'cope1run2.nii.gz'], ['cope2run1.nii.gz', 'cope2run2.nii.gz']] # per contrast
>>> fixedfx.inputs.inputspec.varcopes = [['varcope1run1.nii.gz', 'varcope1run2.nii.gz'], ['varcope2run1.nii.gz', 'varcope2run2.nii.gz']] # per contrast
>>> fixedfx.inputs.inputspec.dof_files = ['dofrun1', 'dofrun2'] # per run
>>> fixedfx.run() #doctest: +SKIP
Inputs:
inputspec.copes : list of list of cope files (one list per contrast)
inputspec.varcopes : list of list of varcope files (one list per
                     contrast)
inputspec.dof_files : degrees of freedom files for each run
Outputs:
outputspec.res4d : 4d residual time series
outputspec.copes : contrast parameter estimates
outputspec.varcopes : variance of contrast parameter estimates
outputspec.zstats : z statistics of contrasts
outputspec.tstats : t statistics of contrasts
Graph¶
![digraph fixedfx{
  label="fixedfx";
  fixedfx_l2model[label="l2model (fsl)"];
  fixedfx_inputspec[label="inputspec (utility)"];
  fixedfx_varcopemerge[label="varcopemerge (fsl)"];
  fixedfx_copemerge[label="copemerge (fsl)"];
  fixedfx_gendofvolume[label="gendofvolume (utility)"];
  fixedfx_flameo[label="flameo (fsl)"];
  fixedfx_outputspec[label="outputspec (utility)"];
  fixedfx_l2model -> fixedfx_flameo;
  fixedfx_l2model -> fixedfx_flameo;
  fixedfx_l2model -> fixedfx_flameo;
  fixedfx_inputspec -> fixedfx_copemerge;
  fixedfx_inputspec -> fixedfx_varcopemerge;
  fixedfx_inputspec -> fixedfx_gendofvolume;
  fixedfx_varcopemerge -> fixedfx_flameo;
  fixedfx_copemerge -> fixedfx_gendofvolume;
  fixedfx_copemerge -> fixedfx_flameo;
  fixedfx_gendofvolume -> fixedfx_flameo;
  fixedfx_flameo -> fixedfx_outputspec;
  fixedfx_flameo -> fixedfx_outputspec;
  fixedfx_flameo -> fixedfx_outputspec;
  fixedfx_flameo -> fixedfx_outputspec;
  fixedfx_flameo -> fixedfx_outputspec;
}](../../../_images/graphviz-21476875d1e19d9e9bbe8a3e50ed3499cab744c3.png)
create_modelfit_workflow()¶
Create an FSL individual modelfitting workflow
Example¶
>>> modelfit = create_modelfit_workflow()
>>> modelfit.base_dir = '.'
>>> info = dict()
>>> modelfit.inputs.inputspec.session_info = info
>>> modelfit.inputs.inputspec.interscan_interval = 3.
>>> modelfit.inputs.inputspec.film_threshold = 1000
>>> modelfit.run() #doctest: +SKIP
Inputs:
inputspec.session_info : info generated by modelgen.SpecifyModel
inputspec.interscan_interval : interscan interval
inputspec.contrasts : list of contrasts
inputspec.film_threshold : image threshold for FILM estimation
inputspec.model_serial_correlations
inputspec.bases
Outputs:
outputspec.copes
outputspec.varcopes
outputspec.dof_file
outputspec.pfiles
outputspec.zfiles
outputspec.parameter_estimates
Graph¶
![digraph modelfit{
  label="modelfit";
  modelfit_inputspec[label="inputspec (utility)"];
  modelfit_level1design[label="level1design (fsl)"];
  modelfit_modelgen[label="modelgen (fsl)"];
  modelfit_modelestimate[label="modelestimate (fsl)"];
  modelfit_merge_contrasts[label="merge_contrasts (utility)"];
  modelfit_ztop[label="ztop (fsl)"];
  modelfit_outputspec[label="outputspec (utility)"];
  modelfit_inputspec -> modelfit_level1design;
  modelfit_inputspec -> modelfit_level1design;
  modelfit_inputspec -> modelfit_level1design;
  modelfit_inputspec -> modelfit_level1design;
  modelfit_inputspec -> modelfit_level1design;
  modelfit_inputspec -> modelfit_modelestimate;
  modelfit_inputspec -> modelfit_modelestimate;
  modelfit_level1design -> modelfit_modelgen;
  modelfit_level1design -> modelfit_modelgen;
  modelfit_modelgen -> modelfit_modelestimate;
  modelfit_modelgen -> modelfit_modelestimate;
  modelfit_modelgen -> modelfit_modelestimate;
  modelfit_modelestimate -> modelfit_outputspec;
  modelfit_modelestimate -> modelfit_outputspec;
  modelfit_modelestimate -> modelfit_outputspec;
  modelfit_modelestimate -> modelfit_outputspec;
  modelfit_modelestimate -> modelfit_merge_contrasts;
  modelfit_modelestimate -> modelfit_merge_contrasts;
  modelfit_merge_contrasts -> modelfit_ztop;
  modelfit_merge_contrasts -> modelfit_outputspec;
  modelfit_ztop -> modelfit_outputspec;
}](../../../_images/graphviz-eacc921f35e37fdc4a85482c86bf7e5d4baa7ca7.png)
 
        
![digraph overlay{
  label="overlay";
  overlay_overlaystats[label="overlaystats (fsl)"];
  overlay_slicestats[label="slicestats (fsl)"];
  overlay_overlaystats -> overlay_slicestats;
}](../../../_images/graphviz-1a8f005a9d2b8be77f284d51a708a3cb4cf21354.png)