Skip to content

Commit

Permalink
Merge pull request #84 from effigies/mnt/dependency_updates
Browse files Browse the repository at this point in the history
MNT: Pybids 0.7 compatibility
  • Loading branch information
effigies authored Dec 12, 2018
2 parents ee7e063 + 1f11b09 commit ab13a6e
Show file tree
Hide file tree
Showing 7 changed files with 231 additions and 381 deletions.
9 changes: 4 additions & 5 deletions fitlins/__about__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,20 @@

REQUIRES = [
'nibabel>=2.0',
'nipype>=1.1.2',
'nipype>=1.1.6',
'seaborn>=0.7.1',
'numpy>=1.11',
'nilearn>=0.4.0',
'pandas>=0.19',
'tables>=3.2.1',
'nistats>=0.0.1a',
'grabbit>=0.2.3',
'nistats>=0.0.1b0',
'pybids>=0.6.5',
'jinja2',
]

LINKS_REQUIRES = [
'git+https://github.com/nistats/nistats.git@'
'ce3695e8f34c6f34323766dc96a60a53b69d2729#egg=nistats',
'git+https://github.com/bids-standard/pybids.git@'
'dd8c9bc6478bb63e09f6c95566a11677ce12ded7#egg=pybids',
]

TESTS_REQUIRES = [
Expand Down
16 changes: 5 additions & 11 deletions fitlins/cli/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ def get_parser():
'removed)')
g_bids.add_argument('-m', '--model', action='store', default='model.json',
help='location of BIDS model description (default bids_dir/model.json)')
g_bids.add_argument('-p', '--preproc-dir', action='store', default='fmriprep',
help='location of preprocessed data (if relative path, search '
'bids_dir/derivatives, followed by output_dir)')
g_bids.add_argument('-d', '--derivatives', action='store', nargs='+',
help='location of derivatives (including preprocessed images).'
'If none specified, indexes all derivatives under bids_dir/derivatives.')
g_bids.add_argument('--derivative-label', action='store', type=str,
help='execution label to append to derivative directory name')
g_bids.add_argument('--space', action='store',
Expand Down Expand Up @@ -139,13 +139,7 @@ def run_fitlins(argv=None):
if opts.model in (None, 'default') and not op.exists(model):
model = 'default'

preproc_dir = default_path(opts.preproc_dir,
op.join(opts.bids_dir, 'derivatives'),
'fmriprep')
if not op.exists(preproc_dir):
preproc_dir = default_path(opts.preproc_dir, opts.output_dir, 'fmriprep')
if not op.exists(preproc_dir):
raise RuntimeError("Preprocessed data could not be found")
derivatives = True if not opts.derivatives else opts.derivatives

pipeline_name = 'fitlins'
if opts.derivative_label:
Expand All @@ -158,7 +152,7 @@ def run_fitlins(argv=None):
work_dir = mkdtemp() if opts.work_dir is None else opts.work_dir

fitlins_wf = init_fitlins_wf(
opts.bids_dir, preproc_dir, deriv_dir, opts.space, model=model,
opts.bids_dir, derivatives, deriv_dir, opts.space, model=model,
participants=subject_list, base_dir=work_dir,
include_pattern=opts.include, exclude_pattern=opts.exclude
)
Expand Down
Loading

0 comments on commit ab13a6e

Please sign in to comment.