@fnndsc/chili 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/chefs/chefs.d.ts +15 -0
  4. package/dist/chefs/chefs.js +195 -0
  5. package/dist/commands/compute/fields.d.ts +6 -0
  6. package/dist/commands/compute/fields.js +13 -0
  7. package/dist/commands/compute/list.d.ts +19 -0
  8. package/dist/commands/compute/list.js +20 -0
  9. package/dist/commands/connect/login.d.ts +16 -0
  10. package/dist/commands/connect/login.js +18 -0
  11. package/dist/commands/connect/logout.d.ts +6 -0
  12. package/dist/commands/connect/logout.js +16 -0
  13. package/dist/commands/feed/comments.d.ts +41 -0
  14. package/dist/commands/feed/comments.js +45 -0
  15. package/dist/commands/feed/create.d.ts +13 -0
  16. package/dist/commands/feed/create.js +40 -0
  17. package/dist/commands/feed/note.d.ts +21 -0
  18. package/dist/commands/feed/note.js +24 -0
  19. package/dist/commands/feeds/delete.d.ts +14 -0
  20. package/dist/commands/feeds/delete.js +34 -0
  21. package/dist/commands/feeds/fields.d.ts +6 -0
  22. package/dist/commands/feeds/fields.js +17 -0
  23. package/dist/commands/feeds/list.d.ts +17 -0
  24. package/dist/commands/feeds/list.js +38 -0
  25. package/dist/commands/feeds/share.d.ts +17 -0
  26. package/dist/commands/feeds/share.js +19 -0
  27. package/dist/commands/file/view.d.ts +8 -0
  28. package/dist/commands/file/view.js +25 -0
  29. package/dist/commands/files/delete.d.ts +16 -0
  30. package/dist/commands/files/delete.js +36 -0
  31. package/dist/commands/files/fields.d.ts +7 -0
  32. package/dist/commands/files/fields.js +18 -0
  33. package/dist/commands/files/list.d.ts +11 -0
  34. package/dist/commands/files/list.js +23 -0
  35. package/dist/commands/fs/cat.d.ts +15 -0
  36. package/dist/commands/fs/cat.js +26 -0
  37. package/dist/commands/fs/cp.d.ts +17 -0
  38. package/dist/commands/fs/cp.js +26 -0
  39. package/dist/commands/fs/create.d.ts +15 -0
  40. package/dist/commands/fs/create.js +83 -0
  41. package/dist/commands/fs/download.d.ts +25 -0
  42. package/dist/commands/fs/download.js +235 -0
  43. package/dist/commands/fs/edit.d.ts +16 -0
  44. package/dist/commands/fs/edit.js +25 -0
  45. package/dist/commands/fs/ls.d.ts +18 -0
  46. package/dist/commands/fs/ls.js +142 -0
  47. package/dist/commands/fs/mkdir.d.ts +8 -0
  48. package/dist/commands/fs/mkdir.js +21 -0
  49. package/dist/commands/fs/mv.d.ts +13 -0
  50. package/dist/commands/fs/mv.js +73 -0
  51. package/dist/commands/fs/rm.d.ts +24 -0
  52. package/dist/commands/fs/rm.js +108 -0
  53. package/dist/commands/fs/touch.d.ts +16 -0
  54. package/dist/commands/fs/touch.js +62 -0
  55. package/dist/commands/fs/upload.d.ts +55 -0
  56. package/dist/commands/fs/upload.js +221 -0
  57. package/dist/commands/groups/fields.d.ts +6 -0
  58. package/dist/commands/groups/fields.js +13 -0
  59. package/dist/commands/groups/list.d.ts +16 -0
  60. package/dist/commands/groups/list.js +26 -0
  61. package/dist/commands/man/doc.d.ts +16 -0
  62. package/dist/commands/man/doc.js +32 -0
  63. package/dist/commands/man/topics.d.ts +6 -0
  64. package/dist/commands/man/topics.js +27 -0
  65. package/dist/commands/pipeline/fields.d.ts +6 -0
  66. package/dist/commands/pipeline/fields.js +13 -0
  67. package/dist/commands/pipeline/run.d.ts +18 -0
  68. package/dist/commands/pipeline/run.js +33 -0
  69. package/dist/commands/plugin/readme.d.ts +14 -0
  70. package/dist/commands/plugin/readme.js +49 -0
  71. package/dist/commands/plugin/run.d.ts +10 -0
  72. package/dist/commands/plugin/run.js +29 -0
  73. package/dist/commands/plugin/search.d.ts +7 -0
  74. package/dist/commands/plugin/search.js +18 -0
  75. package/dist/commands/plugininstances/fields.d.ts +6 -0
  76. package/dist/commands/plugininstances/fields.js +13 -0
  77. package/dist/commands/plugininstances/list.d.ts +16 -0
  78. package/dist/commands/plugininstances/list.js +26 -0
  79. package/dist/commands/pluginmetas/fields.d.ts +6 -0
  80. package/dist/commands/pluginmetas/fields.js +13 -0
  81. package/dist/commands/pluginmetas/list.d.ts +16 -0
  82. package/dist/commands/pluginmetas/list.js +26 -0
  83. package/dist/commands/plugins/add.d.ts +34 -0
  84. package/dist/commands/plugins/add.js +374 -0
  85. package/dist/commands/plugins/delete.d.ts +14 -0
  86. package/dist/commands/plugins/delete.js +34 -0
  87. package/dist/commands/plugins/fields.d.ts +6 -0
  88. package/dist/commands/plugins/fields.js +17 -0
  89. package/dist/commands/plugins/list.d.ts +17 -0
  90. package/dist/commands/plugins/list.js +40 -0
  91. package/dist/commands/plugins/overview.d.ts +6 -0
  92. package/dist/commands/plugins/overview.js +17 -0
  93. package/dist/commands/store/list.d.ts +23 -0
  94. package/dist/commands/store/list.js +48 -0
  95. package/dist/commands/tags/fields.d.ts +6 -0
  96. package/dist/commands/tags/fields.js +13 -0
  97. package/dist/commands/tags/list.d.ts +16 -0
  98. package/dist/commands/tags/list.js +26 -0
  99. package/dist/commands/workflows/fields.d.ts +6 -0
  100. package/dist/commands/workflows/fields.js +13 -0
  101. package/dist/commands/workflows/list.d.ts +16 -0
  102. package/dist/commands/workflows/list.js +26 -0
  103. package/dist/config/colorConfig.d.ts +56 -0
  104. package/dist/config/colorConfig.js +161 -0
  105. package/dist/connect/connectHandler.d.ts +15 -0
  106. package/dist/connect/connectHandler.js +48 -0
  107. package/dist/context/contextCommand.d.ts +13 -0
  108. package/dist/context/contextCommand.js +193 -0
  109. package/dist/controllers/baseController.d.ts +43 -0
  110. package/dist/controllers/baseController.js +67 -0
  111. package/dist/controllers/feedController.d.ts +35 -0
  112. package/dist/controllers/feedController.js +53 -0
  113. package/dist/controllers/fileController.d.ts +56 -0
  114. package/dist/controllers/fileController.js +93 -0
  115. package/dist/controllers/pluginContextController.d.ts +24 -0
  116. package/dist/controllers/pluginContextController.js +49 -0
  117. package/dist/controllers/pluginController.d.ts +70 -0
  118. package/dist/controllers/pluginController.js +98 -0
  119. package/dist/controllers/pluginMetaController.d.ts +41 -0
  120. package/dist/controllers/pluginMetaController.js +52 -0
  121. package/dist/feeds/feedHandler.d.ts +64 -0
  122. package/dist/feeds/feedHandler.js +203 -0
  123. package/dist/filesystem/fileGroupHandler.d.ts +92 -0
  124. package/dist/filesystem/fileGroupHandler.js +318 -0
  125. package/dist/filesystem/filesystemHandler.d.ts +12 -0
  126. package/dist/filesystem/filesystemHandler.js +135 -0
  127. package/dist/filesystem/inodeCommand.d.ts +12 -0
  128. package/dist/filesystem/inodeCommand.js +37 -0
  129. package/dist/handlers/baseGroupHandler.d.ts +103 -0
  130. package/dist/handlers/baseGroupHandler.js +342 -0
  131. package/dist/index.d.ts +7 -0
  132. package/dist/index.js +239 -0
  133. package/dist/lfs/lfs.d.ts +25 -0
  134. package/dist/lfs/lfs.js +74 -0
  135. package/dist/man/man.d.ts +15 -0
  136. package/dist/man/man.js +31 -0
  137. package/dist/man/renderer.d.ts +26 -0
  138. package/dist/man/renderer.js +187 -0
  139. package/dist/models/feed.d.ts +18 -0
  140. package/dist/models/feed.js +8 -0
  141. package/dist/models/listing.d.ts +33 -0
  142. package/dist/models/listing.js +9 -0
  143. package/dist/models/plugin.d.ts +27 -0
  144. package/dist/models/plugin.js +1 -0
  145. package/dist/models/resource.d.ts +39 -0
  146. package/dist/models/resource.js +9 -0
  147. package/dist/pacs/pacsQueryHandler.d.ts +55 -0
  148. package/dist/pacs/pacsQueryHandler.js +196 -0
  149. package/dist/pacs/pacsQueryPayload.d.ts +19 -0
  150. package/dist/pacs/pacsQueryPayload.js +44 -0
  151. package/dist/pacs/pacsResultRender.d.ts +20 -0
  152. package/dist/pacs/pacsResultRender.js +141 -0
  153. package/dist/pacs/pacsRetrieveHandler.d.ts +87 -0
  154. package/dist/pacs/pacsRetrieveHandler.js +272 -0
  155. package/dist/pacs/pacsServerHandler.d.ts +15 -0
  156. package/dist/pacs/pacsServerHandler.js +32 -0
  157. package/dist/path/pathCommand.d.ts +64 -0
  158. package/dist/path/pathCommand.js +805 -0
  159. package/dist/path/pathMapper.d.ts +189 -0
  160. package/dist/path/pathMapper.js +382 -0
  161. package/dist/plugins/pluginGroupHandler.d.ts +42 -0
  162. package/dist/plugins/pluginGroupHandler.js +90 -0
  163. package/dist/plugins/pluginHandler.d.ts +87 -0
  164. package/dist/plugins/pluginHandler.js +303 -0
  165. package/dist/plugins/pluginMetaHandler.d.ts +21 -0
  166. package/dist/plugins/pluginMetaHandler.js +27 -0
  167. package/dist/screen/screen.d.ts +214 -0
  168. package/dist/screen/screen.js +478 -0
  169. package/dist/utils/admin_prompt.d.ts +42 -0
  170. package/dist/utils/admin_prompt.js +105 -0
  171. package/dist/utils/cli.d.ts +67 -0
  172. package/dist/utils/cli.js +112 -0
  173. package/dist/utils/docker.d.ts +74 -0
  174. package/dist/utils/docker.js +155 -0
  175. package/dist/utils/input_format.d.ts +77 -0
  176. package/dist/utils/input_format.js +135 -0
  177. package/dist/utils/sort.d.ts +29 -0
  178. package/dist/utils/sort.js +63 -0
  179. package/dist/utils/ui.d.ts +7 -0
  180. package/dist/utils/ui.js +26 -0
  181. package/dist/utils.d.ts +15 -0
  182. package/dist/utils.js +14 -0
  183. package/dist/views/compute.d.ts +17 -0
  184. package/dist/views/compute.js +40 -0
  185. package/dist/views/connect.d.ts +13 -0
  186. package/dist/views/connect.js +35 -0
  187. package/dist/views/feed.d.ts +44 -0
  188. package/dist/views/feed.js +110 -0
  189. package/dist/views/file.d.ts +25 -0
  190. package/dist/views/file.js +71 -0
  191. package/dist/views/fs.d.ts +51 -0
  192. package/dist/views/fs.js +105 -0
  193. package/dist/views/ls.d.ts +37 -0
  194. package/dist/views/ls.js +190 -0
  195. package/dist/views/plugin.d.ts +28 -0
  196. package/dist/views/plugin.js +71 -0
  197. package/dist/views/pluginParameters.d.ts +17 -0
  198. package/dist/views/pluginParameters.js +79 -0
  199. package/docs/00_intro.adoc +25 -0
  200. package/docs/01_setup.adoc +63 -0
  201. package/docs/02_context.adoc +128 -0
  202. package/docs/03_searchable.adoc +134 -0
  203. package/docs/10_everyday_examples.adoc +9 -0
  204. package/docs/11_upload_data.adoc +146 -0
  205. package/docs/12_create_a_feed.adoc +9 -0
  206. package/docs/13_run_a_plugin.adoc +271 -0
  207. package/docs/20_plugins.adoc +16 -0
  208. package/docs/21_pluginReadme.adoc +123 -0
  209. package/docs/30_filesystem.adoc +93 -0
  210. package/docs/31_fileops.adoc +51 -0
  211. package/docs/32_file_content.adoc +471 -0
  212. package/docs/_architecture.adoc +48 -0
  213. package/docs/_deepContext.adoc +84 -0
  214. package/docs/_roadmap.adoc +42 -0
  215. package/docs/_searchable.adoc +187 -0
  216. package/docs/_state.adoc +68 -0
  217. package/docs/pacs.adoc +101 -0
  218. package/docs/pathMapper.md +246 -0
  219. package/package.json +92 -0
@@ -0,0 +1,271 @@
1
+ = run a plugin
2
+
3
+ == intro
4
+
5
+ Assuming some data has been uploaded into ChRIS, perhaps one of the most common intents is to run some analysis on this data. The simplest case would be running a single specific analysis, or in the parlance of ChRIS, a single _plugin_. A ChRIS plugin can be thought of as a command line program with its associated _flags_ -- these _flags_ control how the plugin will run. Each plugin will have its own unique set of flags.
6
+
7
+ Additionally, each ChRIS plugin has two _implicit_ parameters that point to where the input data is in ChRIS and where to save the output data. We don't need to worry about this since ChRIS takes care of that for us.
8
+
9
+ Mostly the only thing we need to know is _where_ in ChRIS is the data we wish to analyze, what analysis program to run, and what _flags_ (if any) to use in the analysis.
10
+
11
+ == prerequisites
12
+
13
+ The following prerequisites are relevant:
14
+
15
+ * you are in some Linux (or macOS) terminal with access to the `chili` program. Again, consult the appropriate manual page if this hasn't been setup yet.
16
+
17
+ * you have already logged into a ChRIS instance. Please consult the appropriate manual page if you haven't logged in yet.
18
+
19
+ == first gather your data
20
+
21
+ Let's assume you have data on your computer that you want to process. Let's assume this data is a set of image files, e.g. DICOM images. Of course, it can be anything. The first step is to get this data into ChRIS. Let's say your login in your computer is user `jane` and you have data in a directory here:
22
+
23
+ ```
24
+ /home/jane/data/brainproject/scan-1
25
+ ```
26
+
27
+ you can upload this to ChRIS with
28
+
29
+ ```
30
+ chili host upload ~/data/brainproject/scan-1 /home/jane.doe/data/brainproject/scan-1
31
+ ```
32
+
33
+ The first part `~/data/brainproject/scan-1` is the location of the data on your local computer, and the second part `/home/jane.doe/data/brainproject/scan-1` is the location in ChRIS to which you want to upload. Here, we assume your ChRIS login name is `jane.doe`. Note how the internal ChRIS file system mimics a typical Linux system with a `/home/<username>` layout.
34
+
35
+ You should see something like this:
36
+
37
+ ```
38
+ ____ _ ___ _ ___
39
+ / ___| |__ |_ _| | |_ _|
40
+ | | | '_ \ | || | | |
41
+ | |___| | | || || |___ | |
42
+ \____|_| |_|___|_____|___|
43
+
44
+ The ChRIS Interactive Line Interface
45
+ Scanning files to upload...
46
+ Uploading [████████████████████████████████████████] 100% | ETA: 0s | 8/8 files | 4.01 KB/4.01 KB
47
+
48
+ Upload Summary:
49
+ ┌──────────────────────────────┬────────────────────┐
50
+ │ Metric │ Value │
51
+ ├──────────────────────────────┼────────────────────┤
52
+ │ Total files │ 8 │
53
+ ├──────────────────────────────┼────────────────────┤
54
+ │ Successfully uploaded │ 8 │
55
+ ├──────────────────────────────┼────────────────────┤
56
+ │ Failed to upload │ 0 │
57
+ ├──────────────────────────────┼────────────────────┤
58
+ │ Total data uploaded │ 4.01 KB │
59
+ ├──────────────────────────────┼────────────────────┤
60
+ │ Average upload speed │ 5.18 KB/s │
61
+ ├──────────────────────────────┼────────────────────┤
62
+ │ Duration │ 0.77 seconds │
63
+ └──────────────────────────────┴────────────────────┘
64
+
65
+ ```
66
+
67
+ == now create a feed
68
+
69
+ Having done this, the next step is to create a _feed_. A _feed_ is simply the name for an analysis that you want to run. The ChRIS UI can interpret this _feed_ as a graphical representation showing all the analysis performed on the data and how different analyses relate to each other.
70
+
71
+ A _feed_ **always** starts with a single root node. We need to create a new feed with a root node linked to the data we just uploaded.
72
+
73
+ ```
74
+ chili feed create --params "title: A demo analysis" --dirs "/home/jane.doe/brainproject/scan-1"
75
+ ```
76
+
77
+ where the text "A demo analysis" is the title of the feed, and the `--dirs` flag denotes the "directories" inside ChRIS to add to the root. Here, we only add one, the directory containing the data we just uploaded, but you can specify multiple ChRIS directories separating them with a comma character. If successful, this should return something like:
78
+
79
+ ```
80
+ ____ _ ___ _ ___
81
+ / ___| |__ |_ _| | |_ _|
82
+ | | | '_ \ | || | | |
83
+ | |___| | | || || |___ | |
84
+ \____|_| |_|___|_____|___|
85
+
86
+ The ChRIS Interactive Line Interface
87
+
88
+ Feed Creation Result:
89
+ ┌────────────────────┬──────────────────────────────────────────────────┐
90
+ │ Property │ Value │
91
+ ├────────────────────┼──────────────────────────────────────────────────┤
92
+ │ Status │ Success │
93
+ ├────────────────────┼──────────────────────────────────────────────────┤
94
+ │ Plugin ID │ 37 │
95
+ ├────────────────────┼──────────────────────────────────────────────────┤
96
+ │ Feed ID │ 37 │
97
+ ├────────────────────┼──────────────────────────────────────────────────┤
98
+ │ Feed Name │ A demo analysis │
99
+ ├────────────────────┼──────────────────────────────────────────────────┤
100
+ │ Owner │ jane.doe │
101
+ └────────────────────┴──────────────────────────────────────────────────┘
102
+ ```
103
+
104
+ Note the ID of the plugin. This is needed in the next step.
105
+
106
+ == now let's run an analysis on this root node
107
+
108
+ Having created the feed, the next step is to run your actual analysis plugin. From the feed creation output above, note the **Plugin ID** value (in this example, it's 37). This is the plugin instance ID of the `pl-dircopy` that forms the root of your feed. We need this ID to tell ChRIS that our next plugin should use this data as input.
109
+
110
+ Let's say you want to run `pl-dcm2niix` to convert your DICOM images to NIfTI format. You would invoke it like this:
111
+
112
+ ```
113
+ chili pluginInstanceID=37 plugin run pl-dcm2niix --params "outputdir: converted"
114
+ ```
115
+
116
+ Let's break this down:
117
+
118
+ * `pluginInstanceID=37` - This sets the **context** to plugin instance 37 (our pl-dircopy root node). This tells ChRIS: "use the output of instance 37 as input for the next plugin"
119
+
120
+ * `plugin run` - The chili command to execute a plugin
121
+
122
+ * `pl-dcm2niix` - The **searchable** identifier for the plugin. This can be:
123
+ - Simple name: `pl-dcm2niix` (matches by name)
124
+ - Exact name: `name_exact: pl-dcm2niix` (precise match)
125
+ - With version: `name: pl-dcm2niix, version: 2.1.1` (specific version)
126
+ - By ID: `id: 42` (if you know the plugin's database ID)
127
+
128
+ * `--params "outputdir: converted"` - Plugin-specific parameters as comma-separated key:value pairs
129
+
130
+ If successful, you should see output similar to:
131
+
132
+ ```
133
+ ____ _ ___ _ ___
134
+ / ___| |__ |_ _| | |_ _|
135
+ | | | '_ \ | || | | |
136
+ | |___| | | || || |___ | |
137
+ \____|_| |_|___|_____|___|
138
+
139
+ The ChRIS Interactive Line Interface
140
+
141
+ Plugin Instance Created:
142
+ ┌────────────────────┬──────────────────────────────────────────────────┐
143
+ │ Property │ Value │
144
+ ├────────────────────┼──────────────────────────────────────────────────┤
145
+ │ Status │ Success │
146
+ ├────────────────────┼──────────────────────────────────────────────────┤
147
+ │ Instance ID │ 38 │
148
+ ├────────────────────┼──────────────────────────────────────────────────┤
149
+ │ Plugin Name │ pl-dcm2niix │
150
+ ├────────────────────┼──────────────────────────────────────────────────┤
151
+ │ Feed ID │ 37 │
152
+ ├────────────────────┼──────────────────────────────────────────────────┤
153
+ │ Status │ scheduled │
154
+ └────────────────────┴──────────────────────────────────────────────────┘
155
+ ```
156
+
157
+ The new plugin instance (ID 38 in this example) has been scheduled to run. ChRIS will execute it on a compute resource, reading data from the output of instance 37 (the dircopy) and writing results to instance 38's output directory.
158
+
159
+ == understanding the feed structure
160
+
161
+ After creating the feed and running the plugin, your ChRIS filesystem will look like this:
162
+
163
+ ```
164
+ /home/jane.doe/
165
+ └── feeds/
166
+ └── feed_37/ # The feed we created
167
+ ├── pl-dircopy_37/ # Root node (instance ID 37)
168
+ │ └── data/ # Contains: brainproject/scan-1/
169
+ └── pl-dcm2niix_38/ # Child node (instance ID 38)
170
+ └── data/ # Will contain: converted NIfTI files
171
+ ```
172
+
173
+ Notice the directory naming pattern: `<plugin-name>_<instance-id>`. This encodes both:
174
+ 1. Which plugin created the data
175
+ 2. The instance ID (for referencing in further operations)
176
+
177
+ The `data/` subdirectory in each plugin instance directory contains that plugin's output.
178
+
179
+ == viewing results
180
+
181
+ Once the plugin completes (this may take time depending on the plugin), you can browse the results:
182
+
183
+ ```
184
+ chili chefs ls /home/jane.doe/feeds/feed_37/pl-dcm2niix_38/data/
185
+ ```
186
+
187
+ This will show the NIfTI files produced by pl-dcm2niix.
188
+
189
+ == continuing the analysis
190
+
191
+ To run another plugin using the output of pl-dcm2niix as input, simply use its instance ID:
192
+
193
+ ```
194
+ chili pluginInstanceID=38 plugin run pl-freesurfer --params "subject: patient001"
195
+ ```
196
+
197
+ This creates a new plugin instance (let's say ID 39) that reads from instance 38's output, creating a graph:
198
+
199
+ ```
200
+ pl-dircopy_37 (root)
201
+ └── pl-dcm2niix_38
202
+ └── pl-freesurfer_39
203
+ ```
204
+
205
+ == parallel branches
206
+
207
+ You can also create parallel branches by running multiple plugins from the same parent:
208
+
209
+ ```
210
+ # Branch 1: Brain extraction
211
+ chili pluginInstanceID=38 plugin run pl-fsl-bet --params "threshold: 0.5"
212
+
213
+ # Branch 2: Registration
214
+ chili pluginInstanceID=38 plugin run pl-fsl-flirt --params "reference: MNI152"
215
+ ```
216
+
217
+ This creates:
218
+
219
+ ```
220
+ pl-dircopy_37 (root)
221
+ └── pl-dcm2niix_38
222
+ ├── pl-fsl-bet_40 # Parallel branch 1
223
+ └── pl-fsl-flirt_41 # Parallel branch 2
224
+ ```
225
+
226
+ == asynchronous execution
227
+
228
+ **Important:** Plugin execution in ChRIS is **asynchronous**. When you run a plugin:
229
+
230
+ 1. ChRIS validates the request
231
+ 2. Schedules the job on a compute resource
232
+ 3. Returns immediately with the instance ID
233
+ 4. The plugin runs in the background
234
+
235
+ The plugin status starts as "scheduled", transitions to "started" when running, and eventually becomes "finishedSuccessfully" or "finishedWithError".
236
+
237
+ You can check status by:
238
+
239
+ ```
240
+ chili feeds list
241
+ # Look for your feed and check instance statuses
242
+ ```
243
+
244
+ Or use the ChRIS web UI to visualize the feed graph and see real-time status updates.
245
+
246
+ == the chell alternative
247
+
248
+ The `chell` interactive shell provides a more intuitive way to run plugins by treating them like local executables. Instead of managing plugin instance IDs explicitly, you simply navigate to your data and type the plugin name:
249
+
250
+ ```
251
+ chell> cd ~/uploads/brainproject/scan-1
252
+ chell> pl-dcm2niix-v2.1.1 --outputdir converted
253
+ Feed created: 37
254
+ Job scheduled: pl-dcm2niix-v2.1.1 (ID: 38)
255
+ Output will be in: ~/feeds/feed_37/pl-dcm2niix_38/data/
256
+ ```
257
+
258
+ See `chell/docs/pluginrun.adoc` for comprehensive documentation on this workflow.
259
+
260
+ == summary
261
+
262
+ Running a plugin analysis in ChRIS involves:
263
+
264
+ 1. **Upload data** to ChRIS using `chili chefs upload`
265
+ 2. **Create a feed** using `chili feed create --dirs <path>`
266
+ 3. **Note the plugin instance ID** from the feed creation output
267
+ 4. **Run your plugin** using `chili pluginInstanceID=<id> plugin run <searchable> --params <params>`
268
+ 5. **View results** by browsing the feed filesystem structure
269
+ 6. **Continue the analysis** by running additional plugins using the new instance IDs
270
+
271
+ The key concept: Each plugin instance has an ID, and you specify the "previous" instance ID to create parent-child relationships in the analysis graph.
@@ -0,0 +1,16 @@
1
+ = plugins
2
+
3
+ == intro
4
+
5
+ `plugins` are a central concept within ChRIS and can be accessed via several subcommands in `chili`
6
+
7
+ * `plugin`
8
+ * `plugins`
9
+ * `pluginMetas`
10
+ * `computesofplugin`
11
+ * `instancesofplugin`
12
+ * `parametersofplugin`
13
+
14
+ == how to use
15
+
16
+ See various document chapters for information and examples on each.
@@ -0,0 +1,123 @@
1
+ = plugin readme
2
+
3
+ == intro
4
+
5
+ Each plugin should have a corresponding `README` file that the developer created documenting important information. This `README` can exist in various formats, but is typically in github markdown syntax and unsurprisingly is assumed to be accessible on github.
6
+
7
+ The `plugin` subcommand can be used to return the `readme` of a given plugin. It operates by examining the `url` of the plugin json representation and searching in that location for a `README` file in various formats.
8
+
9
+ == how to use
10
+
11
+ Various use cases exist in which to collect and print this `readme` information
12
+
13
+ === getting a list of available plugins
14
+
15
+ A tabulated list of plugins is useful, and can be achieved with:
16
+
17
+ ```
18
+ chili plugins list --fields id,name,version,title --page 500
19
+ ```
20
+
21
+ the `--page 500` is a "hack" to collect all the plugins in one list. Adjust as necessary.
22
+
23
+ Typically, such a call will return
24
+
25
+ ```
26
+ ____ _ ___ _ ___
27
+ / ___| |__ |_ _| | |_ _|
28
+ | | | '_ \ | || | | |
29
+ | |___| | | || || |___ | |
30
+ \____|_| |_|___|_____|___|
31
+
32
+ The ChRIS Interactive Line Interface
33
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
34
+ │ plugins │
35
+ ├────┬────────────────────┬─────────┬──────────────────────────────────────────────────────────────────────────────────────┤
36
+ │ id │ name │ version │ title │
37
+ ├────┼────────────────────┼─────────┼──────────────────────────────────────────────────────────────────────────────────────┤
38
+ │ 16 │ pl-pfdorun │ 2.2.14 │ A ChRIS plugin app │
39
+ │ 14 │ pl-shexec │ 1.2.16 │ Execute shell-type commands across input spaces │
40
+ │ 12 │ pl-dcm2mha_cnvtr │ 1.2.24 │ A ChRIS plugin app to convert dcm files to mha and vice-versa │
41
+ │ 11 │ pl-simpledsapp │ 2.1.3 │ Simple chris ds app │
42
+ │ 10 │ pl-bulk-rename │ 0.1.2 │ Bulk Rename │
43
+ │ 9 │ pl-markimg │ 1.5.8 │ An app to mark landmark points and lines on an input image │
44
+ │ 15 │ pl-lld_inference │ 2.2.10 │ A ChRIS plugin that runs an inference model to predict landmark points on leg images │
45
+ │ 8 │ pl-lld_inference │ 2.2.11 │ A ChRIS plugin that runs an inference model to predict landmark points on leg images │
46
+ │ 7 │ pl-neurofiles-push │ 0.2.0 │ Push files into /neuro │
47
+ │ 5 │ pl-csv2json │ 1.2.4 │ An app to convert CSV generated from pl-lld_inference to a JSON representation │
48
+ │ 17 │ pl-dylld │ 4.4.40 │ Leg-Length Discrepency - Dynamic Compute Flow │
49
+ │ 4 │ pl-dylld │ 4.4.42 │ Leg-Length Discrepency - Dynamic Compute Flow │
50
+ │ 3 │ pl-dicommake │ 2.3.6 │ DICOM image make │
51
+ │ 2 │ pl-lld_chxr │ 1.1.2 │ A ChRIS plugin to analyze the result produced by an LLD analysis │
52
+ │ 1 │ pl-dicom_dirsend │ 1.1.6 │ A ChRIS plugin to send DICOMs to a remote PACS store │
53
+ │ 13 │ pl-dircopy │ 2.1.2 │ A ChRIS fs app to copy obj storage directories │
54
+ │ 6 │ pl-topologicalcopy │ 1.0.2 │ A ChRIS ts app to copy filtered output dirs from a list of plugin instances │
55
+ └────┴────────────────────┴─────────┴──────────────────────────────────────────────────────────────────────────────────────┘
56
+
57
+
58
+ ```
59
+
60
+
61
+ === simplest case
62
+
63
+ Every element within CUBE has a corresponding unique ID, and plugins are of course no exception. The simplest mechanism to print the readme is to use the `plugin` subcommand with a given plugin id in the pattern
64
+
65
+ ```
66
+ plugin readme <id>
67
+ ```
68
+
69
+ So, given the table above, to get the readme of the `pl-shexec` we note its id is `14`, and thus:
70
+
71
+ ```
72
+ chili plugin readme 14
73
+ ```
74
+
75
+ === using a searchable
76
+
77
+ A more intuitive manner is to use a `--search <searchable>` (see elsewhere for full description of `<searchables>`). This is typically useful if the name of the plugin is known and it is simply more convenient to use this explicitly:
78
+
79
+ ```
80
+ chili plugin readme --search "name: pl-shexec"
81
+ ```
82
+
83
+ In fact, the intial command using the plugin <id> is equivalent to:
84
+
85
+ ```
86
+ chili plugin readme --search "id: 14"
87
+ ```
88
+
89
+ Note the quotes in the above are for readability and to protect the embedded space. One could just as easily have
90
+
91
+
92
+ ```
93
+ chili plugin readme --search name:pl-shexec
94
+ chili plugin readme --search id:14
95
+ ```
96
+
97
+ === using a context specification
98
+
99
+ A final mechanism for specifying the plugin to process, is to use a _context_ construction. Here, we specify the plugin as a _context_ and call the `readme` subcommand without any arguments:
100
+
101
+ ```
102
+ chili plugin=14 plugin readme
103
+ ```
104
+
105
+ Since the plugin context is also a _searchable_ we can equally do
106
+
107
+ ```
108
+ chili plugin=name:pl-shexec plugin readme
109
+ ```
110
+
111
+ and even
112
+
113
+ ```
114
+ chili plugin=name:pl-dylld,version=4.4.40 plugin readme
115
+ ```
116
+
117
+ Take note that using a _context_ specification *will update the plugin context that persists across subsequent operations*.
118
+
119
+ == final notes
120
+
121
+ A successful readme call is dependent on a correct/complete set of meta data for a plugin. Careless developers might not specifiy the "url" in their plugin code meta parameters, in which case no readme lookup can occur. Should this be the case, a friendly PR nudge to the plugin developer might be needed.
122
+
123
+ _-30-_
@@ -0,0 +1,93 @@
1
+ = filesystem interaction
2
+
3
+ == intro
4
+
5
+ While `chili` is great at managing abstract things like "feeds" and "plugins," sometimes you just want to look at your files. You want to know what data you have, where it is, and how to organize it.
6
+
7
+ We are building a suite of commands called `chefs` (Chris Experimental File System) to give you a familiar, shell-like way to browse your ChRIS storage.
8
+
9
+ == the chefs ls command
10
+
11
+ If you have ever used a Linux or Mac terminal, you know the `ls` command. It lists files. We have brought this same convenience to `chili`.
12
+
13
+ ```bash
14
+ chili chefs ls
15
+ ```
16
+
17
+ This command looks at your current ChRIS folder context (remember _context_?) and lists everything in it.
18
+
19
+ === what you will see
20
+
21
+ The output is designed to be clean and readable, using colors to help you distinguish item types:
22
+
23
+ |===
24
+ | Type | Color | Example
25
+
26
+ | **Directory**
27
+ | **Bold Blue**
28
+ | `data/`
29
+
30
+ | **Link**
31
+ | **Cyan**
32
+ | `link -> target`
33
+
34
+ | **File**
35
+ | Standard
36
+ | `image.dcm`
37
+ |===
38
+
39
+ It organizes the names into neat columns, so even if you have hundreds of files, you can scan them easily.
40
+
41
+ === looking elsewhere
42
+
43
+ You aren't limited to just looking at your current directory. You can peek into any path you have access to:
44
+
45
+ ```bash
46
+ chili chefs ls /home/jane.doe/uploads
47
+ ```
48
+
49
+ This will list the contents of that specific folder without changing your current location.
50
+
51
+ == moving around
52
+
53
+ You can also change your current working directory using the `cd` command, just like in a real shell:
54
+
55
+ ```bash
56
+ chili chefs cd /home/jane.doe/analysis
57
+ ```
58
+
59
+ And if you ever get lost, you can ask "where am I?" with:
60
+
61
+ ```bash
62
+ chili chefs pwd
63
+ ```
64
+
65
+ == making things
66
+
67
+ Just like a real filesystem, you can create new directories and files.
68
+
69
+ === creating folders
70
+
71
+ Need a new place to store your data? Use `mkdir`:
72
+
73
+ ```bash
74
+ chili chefs mkdir new_project
75
+ ```
76
+
77
+ This creates a folder named `new_project` in your current directory. You can also create folders deeper in the hierarchy:
78
+
79
+ ```bash
80
+ chili chefs mkdir /home/jane.doe/analysis/run_01
81
+ ```
82
+
83
+ === touching files
84
+
85
+ Sometimes you just need an empty file, maybe as a placeholder or a signal. Use `touch`:
86
+
87
+ ```bash
88
+ chili chefs touch empty_file.txt
89
+ ```
90
+
91
+ This creates a zero-byte file at the specified path. If you need to create a file with content, check out the specialized file operations.
92
+
93
+ These tools are designed to make the remote ChRIS filesystem feel as comfortable and accessible as the one on your own laptop.
@@ -0,0 +1,51 @@
1
+ = advanced file operations
2
+
3
+ == intro
4
+
5
+ While `chefs` gives you the basics (`ls`, `touch`), sometimes you need to do more with files. You might want to create a file with specific text, upload a local file to ChRIS, or peek at what's inside a file stored on the server.
6
+
7
+ For these tasks, `chili` provides the `file` command suite.
8
+
9
+ == creating files with content
10
+
11
+ The `chefs touch` command is great for empty files, but what if you want to write a note or a script directly?
12
+
13
+ ```bash
14
+ chili file create notes.txt --content "meeting at 2pm"
15
+ ```
16
+
17
+ This creates `notes.txt` in your current folder and fills it with your text.
18
+
19
+ === specifying paths
20
+
21
+ You aren't stuck in your current directory. You can tell `chili` exactly where to put the file:
22
+
23
+ ```bash
24
+ chili file create --name README.md --path /home/jane.doe/project --content "# Project X"
25
+ ```
26
+
27
+ Or, just include the path in the filename:
28
+
29
+ ```bash
30
+ chili file create /home/jane.doe/project/README.md --content "# Project X"
31
+ ```
32
+
33
+ == uploading from local
34
+
35
+ This is where it gets powerful. You can "create" a file in ChRIS by reading from a file on your own computer.
36
+
37
+ ```bash
38
+ chili file create data.csv --from-file ./local_data.csv
39
+ ```
40
+
41
+ This takes `./local_data.csv` from your laptop and creates `data.csv` on the ChRIS server. It's a quick and easy way to get single files into the system.
42
+
43
+ == viewing files
44
+
45
+ Want to see what's in a file without downloading it?
46
+
47
+ ```bash
48
+ chili file view results.json
49
+ ```
50
+
51
+ This prints the content of the file directly to your terminal. It's perfect for checking configuration files, logs, or small datasets.