Skip to content

Commit

Permalink
Added deriv_root argument to CLI (#773)
Browse files Browse the repository at this point in the history
Co-authored-by: Richard Höchenberger <[email protected]>
  • Loading branch information
vferat and hoechenberger authored Aug 7, 2023
1 parent 4b289c9 commit 721e728
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/source/v1.5.md.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### :new: New features & enhancements

- Added `deriv_root` argument to CLI (#773 by @vferat)
- Added support for annotating bad segments based on head movement velocity (#757 by @larsoner)
- Added examples of T1 and FLASH BEM to website (#758 by @larsoner)
- Added support for extended SSS (eSSS) in Maxwell filtering (#762 by @larsoner)
Expand Down
17 changes: 17 additions & 0 deletions mne_bids_pipeline/_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,18 @@ def main():
default=None,
help="BIDS root directory of the data to process.",
)
parser.add_argument(
"--deriv_root",
dest="deriv_root",
default=None,
help=dedent(
"""\
The root of the derivatives directory
in which the pipeline will store the processing results.
If unspecified, this will be derivatives/mne-bids-pipeline
inside the BIDS root."""
),
),
parser.add_argument(
"--subject", dest="subject", default=None, help="The subject to process."
)
Expand Down Expand Up @@ -115,6 +127,7 @@ def main():
)
steps = options.steps
root_dir = options.root_dir
deriv_root = options.deriv_root
subject, session = options.subject, options.session
task, run = options.task, options.run
n_jobs = options.n_jobs
Expand Down Expand Up @@ -148,6 +161,10 @@ def main():
overrides = SimpleNamespace()
if root_dir:
overrides.bids_root = pathlib.Path(root_dir).expanduser().resolve(strict=True)
if deriv_root:
overrides.deriv_root = (
pathlib.Path(deriv_root).expanduser().resolve(strict=False)
)
if subject:
overrides.subjects = [subject]
if session:
Expand Down

0 comments on commit 721e728

Please sign in to comment.