Skip to content

Commit 423b0a2

Browse files
committed
Cleanup final touches.
1 parent da25a77 commit 423b0a2

File tree

1 file changed

+8
-31
lines changed

1 file changed

+8
-31
lines changed

examples/fmri_fsl_feeds.py

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@
1717

1818
import nipype.interfaces.io as nio # Data i/o
1919
import nipype.interfaces.fsl as fsl # fsl
20-
import nipype.interfaces.utility as util # utility
2120
import nipype.pipeline.engine as pe # pypeline engine
2221
import nipype.algorithms.modelgen as model # model generation
2322
from nipype.workflows.fmri.fsl import (create_featreg_preproc,
2423
create_modelfit_workflow,
25-
create_fixed_effects_flow,
2624
create_reg_workflow)
2725
from nipype.interfaces.base import Bunch
2826

@@ -37,23 +35,6 @@
3735

3836
fsl.FSLCommand.set_default_output_type('NIFTI_GZ')
3937

40-
"""
41-
Setting up workflows
42-
--------------------
43-
44-
In this tutorial we will be setting up a hierarchical workflow for fsl
45-
analysis. This will demonstrate how pre-defined workflows can be setup and
46-
shared across users, projects and labs.
47-
48-
49-
Setup preprocessing workflow
50-
----------------------------
51-
52-
This is a generic fsl feat preprocessing workflow encompassing skull stripping,
53-
motion correction and smoothing operations.
54-
55-
"""
56-
5738

5839

5940
"""
@@ -104,7 +85,7 @@
10485
regressor_names=None,
10586
regressors=None)]
10687

107-
modelfit = create_modelfit_workflow()
88+
modelfit = create_modelfit_workflow(f_contrasts=True)
10889
modelfit.inputs.inputspec.interscan_interval = TR
10990
modelfit.inputs.inputspec.model_serial_correlations = True
11091
modelfit.inputs.inputspec.bases = {'dgamma': {'derivs': True}}
@@ -141,17 +122,13 @@
141122
Setup the datasink
142123
"""
143124

144-
# datasink = pe.Node(interface=nio.DataSink(parameterization=False), name="datasink")
145-
# datasink.inputs.base_directory = os.path.abspath('./fsl_feeds/l1out')
146-
# datasink.inputs.substitutions = [('dtype_mcf_mask_mean', 'meanfunc'),
147-
# ('brain_brain_flirt','coregistered')]
148-
# # store relevant outputs from various stages of the 1st level analysis
149-
# l1pipeline.connect([(firstlevel, datasink,[('fixedfx.flameo.stats_dir',"fixedfx.@con"),
150-
# ('preproc.coregister.out_file','coregstruct'),
151-
# ('preproc.meanfunc2.out_file','meanfunc'),
152-
# ('modelfit.conestimate.zstats', 'level1.@Z'),
153-
# ])
154-
# ])
125+
datasink = pe.Node(interface=nio.DataSink(parameterization=False), name="datasink")
126+
datasink.inputs.base_directory = os.path.abspath('./fsl_feeds/l1out')
127+
datasink.inputs.substitutions = [('fmri_dtype_mcf_mask_smooth_mask_gms_mean_warp', 'meanfunc')]
128+
# store relevant outputs from various stages of the 1st level analysis
129+
l1pipeline.connect(registration, 'outputspec.transformed_files', datasink, 'level1.@Z')
130+
l1pipeline.connect(registration, 'outputspec.transformed_mean', datasink, 'meanfunc')
131+
155132
"""
156133
Execute the pipeline
157134
--------------------

0 commit comments

Comments
 (0)