@@ -5,7 +5,7 @@ DataGrabber and DataSink explained
5
5
==================================
6
6
7
7
In this chapter we will try to explain the concepts behind DataGrabber and
8
- DataSink.
8
+ :ref: ` DataSink < nipype.interfaces.io.DataSink >` .
9
9
10
10
Why do we need these interfaces?
11
11
================================
@@ -39,7 +39,7 @@ However, in the context of complex workflows and given that users typically
39
39
arrange their imaging and other data in a semantically hierarchical data store,
40
40
an alternative mechanism for reading and writing the data generated by a workflow
41
41
is often necessary. As the names suggest DataGrabber is used to get at data
42
- stored in a shared file system while DataSink is used to store the data
42
+ stored in a shared file system while :ref: ` DataSink < nipype.interfaces.io.DataSink >` is used to store the data
43
43
generated by a workflow into a hierarchical structure on disk.
44
44
45
45
@@ -145,15 +145,15 @@ information such as execution reports, hashfiles determining the input state of
145
145
processes. All of this is embedded in a hierarchical structure that reflects the
146
146
iterables that have been used in the workflow. This makes navigating the working
147
147
directory a not so pleasant experience. And typically the user is interested in
148
- preserving only a small percentage of these outputs. The DataSink interface can
148
+ preserving only a small percentage of these outputs. The :ref: ` DataSink < nipype.interfaces.io.DataSink >` interface can
149
149
be used to extract components from this `cache ` and store it at a different
150
- location. For XNAT-based storage, see :ref: `nipype.interfaces.io.XNATSink ` .
150
+ location. For XNAT-based storage, see :ref: `XNATSink < nipype.interfaces.io.XNATSink > ` .
151
151
152
152
.. note ::
153
153
154
- Unlike other interfaces, a DataSink's inputs are defined and created by using
154
+ Unlike other interfaces, a :ref: ` DataSink < nipype.interfaces.io.DataSink >` 's inputs are defined and created by using
155
155
the workflow connect statement. Currently disconnecting an input from the
156
- datasink does not remove that connection port.
156
+ :ref: ` DataSink < nipype.interfaces.io.DataSink >` does not remove that connection port.
157
157
158
158
Let's assume we have the following workflow.
159
159
@@ -162,7 +162,7 @@ Let's assume we have the following workflow.
162
162
"InputNode" -> "Realign" -> "DataSink";
163
163
"InputNode" -> "DataSink";
164
164
165
- The following code segment defines the DataSink node and sets the `base_directory `
165
+ The following code segment defines the :ref: ` DataSink < nipype.interfaces.io.DataSink >` node and sets the `base_directory `
166
166
in which all outputs will be stored. The `container ` input creates a
167
167
subdirectory within the `base_directory `. If you are iterating a workflow over
168
168
subjects, it may be useful to save it within a folder with the subject id.
@@ -191,16 +191,16 @@ we need to create a second port. We can store the files in a separate folder.
191
191
192
192
The period (.) indicates that a subfolder called par should be created. But if
193
193
we wanted to store it in the same folder as the realigned files, we would use
194
- the `.@ ` syntax. The @ tells the datasink interface to not create the
195
- subfolder. This will allow us to create different named input ports for datasink
194
+ the `.@ ` syntax. The @ tells the :ref: ` DataSink < nipype.interfaces.io.DataSink >` interface to not create the
195
+ subfolder. This will allow us to create different named input ports for :ref: ` DataSink < nipype.interfaces.io.DataSink >`
196
196
and allow the user to store the files in the same folder.
197
197
198
198
::
199
199
200
200
workflow.connect(realigner, 'realigned_files', datasink, 'motion')
201
201
workflow.connect(realigner, 'realignment_parameters', datasink, 'motion.@par')
202
202
203
- The syntax for the input port of DataSink takes the following form:
203
+ The syntax for the input port of :ref: ` DataSink < nipype.interfaces.io.DataSink >` takes the following form:
204
204
205
205
::
206
206
@@ -210,7 +210,7 @@ The syntax for the input port of DataSink takes the following form:
210
210
MapNode
211
211
-------
212
212
213
- In order to use :ref: `nipype.interfaces.io.DataSink ` inside a MapNode, it's
213
+ In order to use :ref: `DataSink < nipype.interfaces.io.DataSink > ` inside a MapNode, it's
214
214
inputs have to be defined inside the constructor using the `infields ` keyword
215
215
arg.
216
216
@@ -222,7 +222,7 @@ over various inputs using the iterables attribute of nodes. This means that a
222
222
given workflow can have multiple outputs depending on how many iterables are
223
223
there. Iterables create working directory subfolders such as
224
224
`_iterable_name_value `. The `parameterization ` input parameter controls whether
225
- the data stored using DataSink is in a folder structure that contains this
225
+ the data stored using :ref: ` DataSink < nipype.interfaces.io.DataSink >` is in a folder structure that contains this
226
226
iterable information or not. It is generally recommended to set this to `True `
227
227
when using multiple nested iterables.
228
228
0 commit comments