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

Boutiques descriptor and example #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 12 additions & 0 deletions boutiques/README.md
Original file line number Diff line number Diff line change
@@ -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`
(assumes `ds001` is a valid dataset in the current working
directory.)
77 changes: 77 additions & 0 deletions boutiques/SPM.json
Original file line number Diff line number Diff line change
@@ -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-<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 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-<session_label>, 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
}
]
}
6 changes: 6 additions & 0 deletions boutiques/invocation.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"bids_dir" : "ds001",
"output_dir_name" : "example-output",
"analysis_level": "participant",
"participant_label": "01"
}