diff --git a/docs/source/v1.5.md.inc b/docs/source/v1.5.md.inc index 234232028..af661698d 100644 --- a/docs/source/v1.5.md.inc +++ b/docs/source/v1.5.md.inc @@ -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) diff --git a/mne_bids_pipeline/_main.py b/mne_bids_pipeline/_main.py index cd9ee1037..9489a2cca 100755 --- a/mne_bids_pipeline/_main.py +++ b/mne_bids_pipeline/_main.py @@ -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." ) @@ -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 @@ -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: