From 4c2b4c4df46f6d77a6af1f392c7613b04e36990f Mon Sep 17 00:00:00 2001 From: Tristan Glatard Date: Fri, 1 Sep 2017 00:53:29 -0700 Subject: [PATCH 1/2] Boutiques descriptor and example --- boutiques/README.md | 12 ++++++ boutiques/SPM.json | 77 +++++++++++++++++++++++++++++++++++++++ boutiques/invocation.json | 8 ++++ 3 files changed, 97 insertions(+) create mode 100644 boutiques/README.md create mode 100644 boutiques/SPM.json create mode 100644 boutiques/invocation.json diff --git a/boutiques/README.md b/boutiques/README.md new file mode 100644 index 0000000..ddcbe29 --- /dev/null +++ b/boutiques/README.md @@ -0,0 +1,12 @@ +# Boutiques descriptor + +This directory contains a +[Boutiques](https://github.com/boutiques/boutiques) descriptor for the +BIDS app and an example of invocation. + +## How to use + +* Install Boutiques: `pip install boutiques` +* Run the example: `bosh ./SPM.json -i ./invocation.json -e -d` + (assumes `ds001` is a valid dataset in the current working + directory.) diff --git a/boutiques/SPM.json b/boutiques/SPM.json new file mode 100644 index 0000000..bb364c4 --- /dev/null +++ b/boutiques/SPM.json @@ -0,0 +1,77 @@ +{ + "name" : "SPM", + "tool-version" : "dev", + "description" : "See https://github.com/BIDS-Apps/SPM", + "command-line" : "mkdir -p OUTPUT_DIR; /opt/spm12/run.sh BIDS_DIR OUTPUT_DIR ANALYSIS_LEVEL PARTICIPANT_LABEL SESSION_LABEL", + "container-image": { + "type": "docker", + "image": "bids/spm" + }, + "schema-version" : "0.5", + "inputs" : [{ + "id" : "bids_dir", + "name" : "BIDS directory", + "type" : "File", + "description" : "The directory with the input dataset formatted according to the BIDS standard.", + "value-key" : "BIDS_DIR", + "optional" : false + + }, { + "id" : "output_dir_name", + "name" : "Output directory name", + "type" : "String", + "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.", + "value-key" : "OUTPUT_DIR", + "optional" : true + },{ + "id" : "participant_level_analysis_dir", + "name" : "Participants dir", + "type" : "File", + "description": "Directory containing the output of the participants analysis.", + "value-key" : "OUTPUT_DIR", + "optional" : true + },{ + "id" : "analysis_level", + "name" : "Analysis level", + "type" : "String", + "optional" : false, + "value-key" : "ANALYSIS_LEVEL", + "value-choices" : [ "participant", "group", "session" ], + "description": "Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel)." + }, { + "id" : "participant_label", + "name" : "Participant label", + "type" : "String", + "value-key": "PARTICIPANT_LABEL", + "command-line-flag": "--participant_label", + "list" : true, + "optional": true, + "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" : "session_label", + "name" : "Session label", + "type" : "String", + "value-key": "SESSION_LABEL", + "command-line-flag": "--session_label", + "list" : true, + "optional": true, + "description": "The label(s) of the session(s) that should be analyzed. The label corresponds to ses-, an extension of the BIDS spec (so it does not include \"ses-\"). If this parameter is not provided all sessions will be analyzed. Multiple sessions can be specified with a space separated list." + }], + "output-files" : [{ + "id" : "output_dir", + "name" : "Output directory", + "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.", + "path-template" : "OUTPUT_DIR", + "optional" : false + }], + "groups" : [ + { + "id": "output_directory", + "name": "Output Directory", + "members" : [ "output_dir_name", "participant_level_analysis_dir" ], + "description" : "For a participants analysis, an output directory name must be specified. For a group analysis, a directory containing the output of participant-level analyses must be selected. ", + "mutually-exclusive":true, + "one-is-required": true + } + ] +} diff --git a/boutiques/invocation.json b/boutiques/invocation.json new file mode 100644 index 0000000..54c1011 --- /dev/null +++ b/boutiques/invocation.json @@ -0,0 +1,8 @@ +{ + "inputs": [ + { "bids_dir" : "ds001"}, + { "output_dir_name" : "example-output"}, + { "analysis_level": "participant" }, + { "participant_label": "01" } + ] +} From f856acc4d6d9ee64261b5a5bfe11b4a16c8da591 Mon Sep 17 00:00:00 2001 From: Tristan Glatard Date: Thu, 28 Sep 2017 11:37:09 -0400 Subject: [PATCH 2/2] Updates to match boutiques version 0.5.3 --- boutiques/README.md | 2 +- boutiques/invocation.json | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/boutiques/README.md b/boutiques/README.md index ddcbe29..2aa121c 100644 --- a/boutiques/README.md +++ b/boutiques/README.md @@ -7,6 +7,6 @@ BIDS app and an example of invocation. ## How to use * Install Boutiques: `pip install boutiques` -* Run the example: `bosh ./SPM.json -i ./invocation.json -e -d` +* Run the example: `bosh ./SPM.json -i ./invocation.json -e` (assumes `ds001` is a valid dataset in the current working directory.) diff --git a/boutiques/invocation.json b/boutiques/invocation.json index 54c1011..f8ecb7e 100644 --- a/boutiques/invocation.json +++ b/boutiques/invocation.json @@ -1,8 +1,6 @@ { - "inputs": [ - { "bids_dir" : "ds001"}, - { "output_dir_name" : "example-output"}, - { "analysis_level": "participant" }, - { "participant_label": "01" } - ] + "bids_dir" : "ds001", + "output_dir_name" : "example-output", + "analysis_level": "participant", + "participant_label": "01" }