Skip to content

Commit 98f498f

Browse files
committed
make the changes to use niworkflows BIDSDataGrabber
1 parent 6ed1e21 commit 98f498f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

fmriprep/cli/run.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,6 @@ def build_workflow(opts, retval):
512512
from niworkflows.reports import generate_reports
513513
from ..__about__ import __version__
514514
from ..workflows.base import init_fmriprep_wf
515-
from nipype.interfaces.base import Undefined
516515

517516
build_log = nlogging.getLogger('nipype.workflow')
518517

@@ -527,7 +526,7 @@ def build_workflow(opts, retval):
527526
output_dir = opts.output_dir.resolve()
528527
work_dir = opts.work_dir.resolve()
529528
bids_filters_file = opts.bids_filters.resolve()
530-
bids_filters = json.load(open(bids_filters_file)) if bids_filters_file else Undefined
529+
bids_filters = json.load(open(bids_filters_file)) if bids_filters_file else None
531530

532531
retval['return_code'] = 1
533532
retval['workflow'] = None

fmriprep/workflows/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def init_single_subject_wf(
471471
'bold': ['/completely/made/up/path/sub-01_task-nback_bold.nii.gz']
472472
}
473473
else:
474-
subject_data = collect_data(layout, subject_id, task_id, echo_idx)[0]
474+
subject_data = collect_data(layout, subject_id, task_id, echo_idx, bids_filters=bids_filters)[0]
475475

476476
# Make sure we always go through these two checks
477477
if not anat_only and subject_data['bold'] == []:
@@ -523,7 +523,7 @@ def init_single_subject_wf(
523523
inputnode = pe.Node(niu.IdentityInterface(fields=['subjects_dir']),
524524
name='inputnode')
525525

526-
bidssrc = pe.Node(BIDSDataGrabber(subject_data=subject_data, anat_only=anat_only, output_query=bids_filters),
526+
bidssrc = pe.Node(BIDSDataGrabber(subject_data=subject_data, anat_only=anat_only),
527527
name='bidssrc')
528528

529529
bids_info = pe.Node(BIDSInfo(

0 commit comments

Comments
 (0)