Skip to content

Commit a47c1ef

Browse files

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

nipype/interfaces/io.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,22 @@ class S3DataGrabber(LibraryBaseInterface, IOBase):
829829
"template" uses regex style formatting, rather than the
830830
glob-style found in the original DataGrabber.
831831
832+
Examples
833+
--------
834+
835+
>>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"]))
836+
>>> s3grab.inputs.bucket = 'openneuro'
837+
>>> s3grab.inputs.sort_filelist = True
838+
>>> s3grab.inputs.template = '*'
839+
>>> s3grab.inputs.anon = True
840+
>>> s3grab.inputs.bucket_path = 'ds000101/ds000101_R2.0.0/uncompressed/'
841+
>>> s3grab.inputs.local_directory = '/tmp'
842+
>>> s3grab.inputs.field_template = {'anat': '%s/anat/%s_T1w.nii.gz', 'func': '%s/func/%s_task-simon_run-1_bold.nii.gz'}
843+
>>> s3grab.inputs.template_args = {'anat': [['subj_id', 'subj_id']], 'func': [['subj_id', 'subj_id']]}
844+
>>> s3grab.inputs.subj_id = 'sub-01'
845+
>>> s3grab.run() # doctest: +SKIP
832846
"""
847+
833848
input_spec = S3DataGrabberInputSpec
834849
output_spec = DynamicTraitedSpec
835850
_always_run = True

0 commit comments

Comments
 (0)