Skip to content
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

Added deriv_root argument to CLI #773

Merged
merged 11 commits into from
Aug 7, 2023
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
Loading