|
55 | 55 |
|
56 | 56 | import nipype.interfaces.fsl as fsl
|
57 | 57 | import nipype.interfaces.freesurfer as fs # freesurfer
|
58 |
| -import os.path as op # system functions |
| 58 | +import os.path as op # system functions |
59 | 59 | import cmp
|
60 | 60 | from nipype.workflows.dmri.camino.group_connectivity import create_group_connectivity_pipeline
|
61 | 61 | from nipype.workflows.dmri.connectivity.group_connectivity import (create_merge_networks_by_group_workflow,
|
|
103 | 103 |
|
104 | 104 | .. warning::
|
105 | 105 |
|
106 |
| -The 'info' dictionary below is used to define the input files. In this case, the diffusion weighted image contains the string 'dwi'. |
107 |
| -The same applies to the b-values and b-vector files, and this must be changed to fit your naming scheme. |
| 106 | + The 'info' dictionary below is used to define the input files. In this case, the diffusion weighted image contains the string 'dwi'. |
| 107 | + The same applies to the b-values and b-vector files, and this must be changed to fit your naming scheme. |
108 | 108 |
|
109 | 109 | """
|
110 | 110 |
|
|
120 | 120 | """
|
121 | 121 |
|
122 | 122 | """
|
123 |
| -Next we create and run the second-level pipeline. The purpose of this workflow is simple: |
124 |
| -It is used to merge each subject's CFF file into one, so that there is a single file containing |
125 |
| -all of the networks for each group. This can be useful for performing Network Brain Statistics |
| 123 | +The purpose of the second-level workflow is simple: It is used to merge each |
| 124 | +subject's CFF file into one, so that there is a single file containing all of the |
| 125 | +networks for each group. This can be useful for performing Network Brain Statistics |
126 | 126 | using the NBS plugin in ConnectomeViewer.
|
127 | 127 |
|
128 | 128 | .. seealso::
|
|
137 | 137 | title += group_id
|
138 | 138 | if not idx == len(group_list.keys()) - 1:
|
139 | 139 | title += '-'
|
| 140 | + |
140 | 141 | info = dict(dwi=[['subject_id', 'dti']],
|
141 | 142 | bvecs=[['subject_id', 'bvecs']],
|
142 | 143 | bvals=[['subject_id', 'bvals']])
|
| 144 | + |
143 | 145 | l1pipeline = create_group_connectivity_pipeline(group_list, group_id, data_dir, subjects_dir, output_dir, info)
|
144 | 146 |
|
| 147 | + # Here we define the parcellation scheme and the number of tracks to produce |
145 | 148 | parcellation_scheme = 'NativeFreesurfer'
|
146 | 149 | cmp_config = cmp.configuration.PipelineConfiguration()
|
147 | 150 | cmp_config.parcellation_scheme = parcellation_scheme
|
|
150 | 153 | l1pipeline.run()
|
151 | 154 | l1pipeline.write_graph(format='eps', graph2use='flat')
|
152 | 155 |
|
| 156 | + # The second-level pipeline is created here |
153 | 157 | l2pipeline = create_merge_networks_by_group_workflow(group_list, group_id, data_dir, subjects_dir, output_dir)
|
154 | 158 | l2pipeline.run()
|
155 | 159 | l2pipeline.write_graph(format='eps', graph2use='flat')
|
|
0 commit comments