Skip to content

Commit ffa1fb1

Browse files
authored
Merge pull request #511 from Remi-Gau/API_design
[WIP] API design
2 parents 238bf72 + 9d9bd8b commit ffa1fb1

File tree

9 files changed

+436
-192
lines changed

9 files changed

+436
-192
lines changed

boutiques/WIP.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 -d`
11+
(assumes `ds001` is a valid dataset in the current working
12+
directory.)

boutiques/cpp_spm.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"name": "cpp_spm",
3+
"command-line": "cpp_spm [InputDataset] [OutputLocation] [AnalysisLevel] [ParticipantLabel] [Action]",
4+
"container-image": {
5+
"image": "bids/example",
6+
"type": "docker"
7+
},
8+
"description": "See https://github.com/Remi-Gau/bidsNighres.git",
9+
"inputs": [
10+
{
11+
"description": "The directory with the input dataset formatted according to the BIDS standard.",
12+
"id": "InputDataset",
13+
"name": "Input datasets",
14+
"value-key": "[InputDataset]",
15+
"type": "File",
16+
"list": false,
17+
"optional": false,
18+
"command-line-flag": "--input-datasets"
19+
},
20+
{
21+
"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.",
22+
"id": "OutputLocation",
23+
"name": "Output location",
24+
"value-key": "[OutputLocation]",
25+
"type": "File",
26+
"list": false,
27+
"optional": false,
28+
"command-line-flag": "--output-location"
29+
},
30+
{
31+
"description": "Level of the analysis that will be performed. Multiple participant level analyses can be run independently (in parallel).",
32+
"id": "AnalysisLevel",
33+
"name": "Analysis level",
34+
"value-key": "[AnalysisLevel]",
35+
"type": "String",
36+
"optional": false,
37+
"list": false,
38+
"value-choices": [
39+
"subject",
40+
"dataset"
41+
],
42+
"default": "subject",
43+
"command-line-flag": "--analysis-level"
44+
},
45+
{
46+
"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.",
47+
"id": "SubjectLabel",
48+
"name": "Subject labels",
49+
"value-key": "[SubjectLabel]",
50+
"type": "String",
51+
"list": true,
52+
"optional": false,
53+
"command-line-flag": "--participant-label"
54+
},
55+
{
56+
"description": "Action to perform",
57+
"id": "Action",
58+
"name": "Action",
59+
"value-key": "[Action]",
60+
"type": "String",
61+
"list": false,
62+
"value-choices": [
63+
"genT1map",
64+
"skullstrip",
65+
"segment"
66+
],
67+
"optional": false,
68+
"command-line-flag": "--action"
69+
},
70+
{
71+
"description": " Path to a JSON file to filter input file",
72+
"id": "BidsFileFilter",
73+
"name": "Bids file filter",
74+
"value-key": "[BidsFileFilter]",
75+
"type": "File",
76+
"default": "",
77+
"list": false,
78+
"optional": true,
79+
"command-line-flag": "--action"
80+
},
81+
{
82+
"description": "for debugging",
83+
"id": "DryRun",
84+
"name": "Dry run",
85+
"value-key": "[DryRun]",
86+
"type": "File",
87+
"default": false,
88+
"list": false,
89+
"optional": true,
90+
"command-line-flag": "--action"
91+
}
92+
],
93+
"output-files": [
94+
{
95+
"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.",
96+
"id": "OutputLocation",
97+
"name": "Output location",
98+
"optional": false,
99+
"path-template": "OutputLocation"
100+
}
101+
],
102+
"schema-version": "0.5",
103+
"tool-version": "dev"
104+
}

boutiques/invocation.json

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

0 commit comments

Comments
 (0)