Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC: Add S3DataGrabber example #2849

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 23, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions 15 nipype/interfaces/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,22 @@ class S3DataGrabber(LibraryBaseInterface, IOBase):
"template" uses regex style formatting, rather than the
glob-style found in the original DataGrabber.

Examples
--------

>>> s3grab = S3DataGrabber(infields=['subj_id'], outfields=["func", "anat"])
>>> s3grab.inputs.bucket = 'openneuro'
>>> s3grab.inputs.sort_filelist = True
>>> s3grab.inputs.template = '*'
effigies marked this conversation as resolved.
Show resolved Hide resolved
>>> s3grab.inputs.anon = True
>>> s3grab.inputs.bucket_path = 'ds000101/ds000101_R2.0.0/uncompressed/'
effigies marked this conversation as resolved.
Show resolved Hide resolved
>>> s3grab.inputs.local_directory = '/tmp'
effigies marked this conversation as resolved.
Show resolved Hide resolved
>>> s3grab.inputs.field_template = {'anat': '%s/anat/%s_T1w.nii.gz', 'func': '%s/func/%s_task-simon_run-1_bold.nii.gz'}
effigies marked this conversation as resolved.
Show resolved Hide resolved
>>> s3grab.inputs.template_args = {'anat': [['subj_id', 'subj_id']], 'func': [['subj_id', 'subj_id']]}
effigies marked this conversation as resolved.
Show resolved Hide resolved
>>> s3grab.inputs.subj_id = 'sub-01'
>>> s3grab.run() # doctest: +SKIP
"""

input_spec = S3DataGrabberInputSpec
output_spec = DynamicTraitedSpec
_always_run = True
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.