Skip to content

Commit dd4d2fc

Browse files
authored
Merge pull request #16 from glatard/master
Boutiques descriptor
2 parents 1e3b6eb + b49dfad commit dd4d2fc

3 files changed

Lines changed: 97 additions & 0 deletions

File tree

boutiques/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Boutiques descriptor
2+
3+
This directory contains a
4+
[Boutiques](https://github.com/boutiques/boutiques) descriptor for the
5+
BIDS app and an example of invocation.
6+
7+
## How to use
8+
9+
* Install Boutiques: `pip install boutiques`
10+
* Run the example: `bosh ./bids-app-example.json -i ./invocation.json -e`
11+
(assumes `ds001` is a valid dataset in the current working
12+
directory.)

boutiques/bids-app-example.json

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"name" : "example",
3+
"tool-version" : "dev",
4+
"description" : "See https://github.com/BIDS-Apps/example",
5+
"command-line" : "mkdir -p OUTPUT_DIR; /run.py BIDS_DIR OUTPUT_DIR ANALYSIS_LEVEL PARTICIPANT_LABEL SESSION_LABEL",
6+
"container-image": {
7+
"type": "docker",
8+
"image": "bids/example"
9+
},
10+
"schema-version" : "0.5",
11+
"inputs" : [{
12+
"id" : "bids_dir",
13+
"name" : "BIDS directory",
14+
"type" : "File",
15+
"description" : "The directory with the input dataset formatted according to the BIDS standard.",
16+
"value-key" : "BIDS_DIR",
17+
"optional" : false
18+
19+
}, {
20+
"id" : "output_dir_name",
21+
"name" : "Output directory name",
22+
"type" : "String",
23+
"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.",
24+
"value-key" : "OUTPUT_DIR",
25+
"optional" : true
26+
},{
27+
"id" : "participant_level_analysis_dir",
28+
"name" : "Participants dir",
29+
"type" : "File",
30+
"description": "Directory containing the output of the participants analysis.",
31+
"value-key" : "OUTPUT_DIR",
32+
"optional" : true
33+
},{
34+
"id" : "analysis_level",
35+
"name" : "Analysis level",
36+
"type" : "String",
37+
"optional" : false,
38+
"value-key" : "ANALYSIS_LEVEL",
39+
"value-choices" : [ "participant", "group", "session" ],
40+
"description": "Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel)."
41+
}, {
42+
"id" : "participant_label",
43+
"name" : "Participant label",
44+
"type" : "String",
45+
"value-key": "PARTICIPANT_LABEL",
46+
"command-line-flag": "--participant_label",
47+
"list" : true,
48+
"optional": true,
49+
"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."
50+
}, {
51+
"id" : "session_label",
52+
"name" : "Session label",
53+
"type" : "String",
54+
"value-key": "SESSION_LABEL",
55+
"command-line-flag": "--session_label",
56+
"list" : true,
57+
"optional": true,
58+
"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."
59+
}],
60+
"output-files" : [{
61+
"id" : "output_dir",
62+
"name" : "Output directory",
63+
"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.",
64+
"path-template" : "OUTPUT_DIR",
65+
"optional" : false
66+
}],
67+
"groups" : [
68+
{
69+
"id": "output_directory",
70+
"name": "Output Directory",
71+
"members" : [ "output_dir_name", "participant_level_analysis_dir" ],
72+
"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. ",
73+
"mutually-exclusive":true,
74+
"one-is-required": true
75+
}
76+
]
77+
}

boutiques/invocation.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"inputs": [
3+
{ "bids_dir" : "ds001"},
4+
{ "output_dir_name" : "example-output"},
5+
{ "analysis_level": "participant" },
6+
{ "participant_label": "01" }
7+
]
8+
}

0 commit comments

Comments
 (0)