-
Notifications
You must be signed in to change notification settings - Fork 532
[ENH] Update BIDSDataGrabber for pybids 0.7 #2737
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
Changes from 4 commits
ffd0d8e
8db5111
801b295
1d267c8
b0121c0
cc89c58
b8aacce
a0e92f1
0f94d9d
77a0510
26a57a6
2a84cab
5590d4d
3c21466
d2e53fb
b75bf7c
7105cb5
09a1a43
75a5a2b
139c163
b623cdd
aeda06a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -591,9 +591,9 @@ def test_bids_grabber(tmpdir): | |
bg.inputs.base_dir = os.path.join(datadir, 'ds005') | ||
bg.inputs.subject = '01' | ||
results = bg.run() | ||
assert 'sub-01_T1w.nii.gz' in map(os.path.basename, results.outputs.anat) | ||
assert 'sub-01_T1w.nii.gz' in map(os.path.basename, results.outputs.T1w) | ||
assert 'sub-01_task-mixedgamblestask_run-01_bold.nii.gz' in \ | ||
map(os.path.basename, results.outputs.func) | ||
map(os.path.basename, results.outputs.bold) | ||
|
||
|
||
@pytest.mark.skipif(not have_pybids, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we remove the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I guess... |
||
|
@@ -633,9 +633,9 @@ def test_bids_infields_outfields(tmpdir): | |
for outfield in outfields: | ||
assert(outfield in bg._outputs().traits()) | ||
|
||
# now try without defining outfields, we should get anat and func for free | ||
# now try without defining outfields | ||
bg = nio.BIDSDataGrabber() | ||
for outfield in ['anat', 'func']: | ||
for outfield in ['T1w', 'bold']: | ||
assert outfield in bg._outputs().traits() | ||
|
||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a problem for this PR, but we may want to think about making it a much more generally usable default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. Such as? you mean returning more things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah. Ideally something that will contain most, if not all, files, and can just be queried sensibly. I feel like specifying the query is more of a power-user move, so making sure there's a reasonable way to ask for the files most people will want would be good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds good to me, although I worry about about performance if a bunch of unnecessary queries are made. Although the indexing itself is probably the slowest part, so it should probably be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're at it, other fields you'd want?
brain_mask
is another one I can think of for fmri. I would like to hear from ppl doing preprocessing and and DWI as I'm unfamiliar with what is typically expected.