diff --git a/WIP/boutiques/bidspm.json b/WIP/boutiques/bidspm.json deleted file mode 100644 index 4768d4b9d..000000000 --- a/WIP/boutiques/bidspm.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "bidspm", - "command-line": "bidspm [InputDataset] [OutputLocation] [AnalysisLevel] [ParticipantLabel] [Action]", - "container-image": { - "image": "bids/example", - "type": "docker" - }, - "description": "See https://github.com/cpp-lln-lab/bidspm.git", - "inputs": [ - { - "description": "The directory with the input dataset formatted according to the BIDS standard.", - "id": "InputDataset", - "name": "Input datasets", - "value-key": "[InputDataset]", - "type": "File", - "list": false, - "optional": false, - "command-line-flag": "--input-datasets" - }, - { - "description": "The directory where the output files should be stored. If you are running a group level analysis, this folder should be prepopulated with the results of the participant level analysis.", - "id": "OutputLocation", - "name": "Output location", - "value-key": "[OutputLocation]", - "type": "File", - "list": false, - "optional": false, - "command-line-flag": "--output-location" - }, - { - "description": "Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel).", - "id": "AnalysisLevel", - "name": "Analysis level", - "value-key": "[AnalysisLevel]", - "type": "String", - "optional": false, - "list": false, - "value-choices": [ - "subject", - "dataset" - ], - "default": "subject", - "command-line-flag": "--analysis-level" - }, - { - "description": "The label(s) of the participant(s) that should be analyzed. The label corresponds to sub- 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 separated list.", - "id": "SubjectLabel", - "name": "Subject labels", - "value-key": "[SubjectLabel]", - "type": "String", - "list": true, - "optional": false, - "command-line-flag": "--participant-label" - }, - { - "description": "Action to perform", - "id": "Action", - "name": "Action", - "value-key": "[Action]", - "type": "String", - "list": false, - "value-choices": [ - "preprocess", - "stats" - ], - "optional": false, - "command-line-flag": "--action" - }, - { - "description": " Path to a JSON file to filter input file", - "id": "BidsFileFilter", - "name": "Bids file filter", - "value-key": "[BidsFileFilter]", - "type": "File", - "default": "", - "list": false, - "optional": true, - "command-line-flag": "--bids-filter-file" - }, - { - "description": "for debugging", - "id": "DryRun", - "name": "Dry run", - "value-key": "[DryRun]", - "type": "File", - "default": false, - "list": false, - "optional": true, - "command-line-flag": "--dry-run" - } - ], - "output-files": [ - { - "description": "The directory where the output files should be stored. If you are running a group level analysis, this folder should be prepopulated with the results of the participant level analysis.", - "id": "OutputLocation", - "name": "Output location", - "optional": false, - "path-template": "OutputLocation" - } - ], - "schema-version": "0.5", - "tool-version": "dev" -} diff --git a/WIP/boutiques/invocation.json b/WIP/boutiques/invocation.json deleted file mode 100644 index 3c0c56832..000000000 --- a/WIP/boutiques/invocation.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "bids_dir": "ds001", - "output_dir_name": "example-output", - "analysis_level": "subject", - "participant_label": [ - "01" - ], - "action": "preprocess" -} diff --git a/WIP/create_boutiques_descriptor.py b/WIP/create_boutiques_descriptor.py new file mode 100644 index 000000000..313c7730a --- /dev/null +++ b/WIP/create_boutiques_descriptor.py @@ -0,0 +1,15 @@ +import boutiques.creator as bc + +from bidspm.parsers import common_parser + +newDescriptor = bc.CreateDescriptor(common_parser(), execname="bidspm") + +newDescriptor.save("my-new-descriptor.json") + +# args = common_parser.parse_args() +# invoc = newDescriptor.createInvocation(args) + +# # Then, if you want to save them to a file... +# import json +# with open('my-inputs.json', 'w') as fhandle: +# fhandle.write(json.dumps(invoc, indent=4)) diff --git a/WIP/write_model_graph.py b/WIP/write_model_graph.py new file mode 100644 index 000000000..798f99004 --- /dev/null +++ b/WIP/write_model_graph.py @@ -0,0 +1,11 @@ +from pathlib import Path + +from bids.modeling.statsmodels import BIDSStatsModelsGraph + +graph = BIDSStatsModelsGraph( + layout=Path("/home/remi/github/cpp-lln-lab/bidspm/demos/MoAE/inputs/raw"), + model="/home/remi/github/cpp-lln-lab/bidspm/demos/openneuro/models/model-narps_desc-U26C_smdl.json", +) + + +graph.write_graph() diff --git a/src/bidspm/parsers.py b/src/bidspm/parsers.py index 3fd0b3939..2256d0412 100644 --- a/src/bidspm/parsers.py +++ b/src/bidspm/parsers.py @@ -472,7 +472,7 @@ def _add_roi_atlas(parser: ArgumentParser) -> ArgumentParser: type=str, nargs=1, default="neuromorphometrics", - choices=SUPPORTED_ATLASES, + choices=list(SUPPORTED_ATLASES), ) return parser