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

Update to snakebids v0.12.x #100

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions docs/usage/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ cases, only the required arguments are needed.

```{argparse}
---
filename: ../scattr/run.py
func: get_parser
ref: scattr.run.get_parser
#filename: ../scattr/run.py
#func: get_parser
prog: scattr
---
```
Expand All @@ -34,4 +35,4 @@ module: snakemake
func: get_argument_parser
prog: snakemake
---
```
```
31 changes: 0 additions & 31 deletions scattr/config/snakebids.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,6 @@ pybids_inputs_dwi:
# Configuration for the command-line parameters to make available
# passed on the argparse add_argument()
parse_args:
#--- core BIDS-app options --- (do not modify below) ---#
bids_dir:
help: The directory with the input dataset formatted according to the
BIDS standard.

output_dir:
help: The directory where the output files should be stored. If you are
running group level analysis, this folder should be prepopulated
with the results of the participant level analysis.

analysis_level:
help: Level of the analysis that will be performed
choices: *analysis_levels

--participant_label:
help: The label(s) of the participant(s) that should be analyzed. The label
corresponds to sub-<participant_label> from the BIDS spec (so it does
not include "sub-"). If this parameter is not provided, all subjects
will be analyzed. Multiple participants can be specified with a space
seperated list.
nargs: "+"

--exclude_participant_label:
help: The label(s) of the participant(s) that should be excluded. The label
corresponds to sub-<participant_label> from the BIDS spec (so it does
not include "sub-"). If this parameter is not provided, all subjects
will be analyzed. Multiple participants can be specified with a space
sepearated list.
nargs: "+"
#-----------------------------------------------------#

#--- additional BIDS-app options --- (add in below) --#
--slurm_tmpdir:
help: "Flag to indicate use of SLURM temporary directory. A temporary
Expand Down
21 changes: 11 additions & 10 deletions scattr/run.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
#!/usr/bin/env python
import os
from pathlib import Path

from snakebids.app import SnakeBidsApp
from snakebids.cli import add_dynamic_args
from snakebids import bidsapp, plugins

app = bidsapp.app(
[
plugins.SnakemakeBidsApp(Path(__file__).resolve().parent),
plugins.Version(distribution="scattr"),
]
)


def get_parser():
"""Exposes parser for sphinx doc generation, cwd is the docs dir"""
app = SnakeBidsApp("../scattr", skip_parse_args=True)
add_dynamic_args(
app.parser, app.config["parse_args"], app.config["pybids_inputs"]
)
return app.parser
return app.build_parser().parser


def main():
app = SnakeBidsApp(os.path.abspath(os.path.dirname(__file__)))
app.run_snakemake()
app.run()


if __name__ == "__main__":
Expand Down
Loading