@galaxyproject/orbit 0.0.0 → 0.9.0

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 (451) hide show
  1. package/CHANGELOG.md +123 -0
  2. package/LICENSE +21 -0
  3. package/README.md +760 -5
  4. package/bin/legacy-mcp-config.js +363 -0
  5. package/bin/orbit.js +810 -0
  6. package/bin/pi-extension-path.d.ts +4 -0
  7. package/bin/pi-extension-path.js +44 -0
  8. package/bin/provider-auth.d.ts +22 -0
  9. package/bin/provider-auth.js +77 -0
  10. package/bin/thinking-pref.js +38 -0
  11. package/bin/update-check.d.ts +15 -0
  12. package/bin/update-check.js +137 -0
  13. package/extensions/cli-update/index.ts +32 -0
  14. package/extensions/orbit/activity-hooks.ts +141 -0
  15. package/extensions/orbit/activity.ts +116 -0
  16. package/extensions/orbit/agent-dir.ts +11 -0
  17. package/extensions/orbit/auto-resume.ts +352 -0
  18. package/extensions/orbit/config.ts +3 -0
  19. package/extensions/orbit/confusables.ts +1 -0
  20. package/extensions/orbit/context.ts +957 -0
  21. package/extensions/orbit/dashboard-commands.ts +191 -0
  22. package/extensions/orbit/dashboard-store.ts +473 -0
  23. package/extensions/orbit/dashboard-tools.ts +1185 -0
  24. package/extensions/orbit/empty-completion.ts +99 -0
  25. package/extensions/orbit/evidence-gate.ts +1276 -0
  26. package/extensions/orbit/evidence-override-command.ts +294 -0
  27. package/extensions/orbit/exec-guard/bash-risk.ts +1408 -0
  28. package/extensions/orbit/exec-guard/gate.ts +181 -0
  29. package/extensions/orbit/exec-guard/guardian-config.ts +54 -0
  30. package/extensions/orbit/exec-guard/index.ts +1 -0
  31. package/extensions/orbit/exec-guard/model-tier.ts +36 -0
  32. package/extensions/orbit/exec-guard/path-jail.ts +54 -0
  33. package/extensions/orbit/exec-guard/policy.ts +342 -0
  34. package/extensions/orbit/exec-guard/runtime-state.ts +15 -0
  35. package/extensions/orbit/exec-guard/sensitive-read.ts +525 -0
  36. package/extensions/orbit/exec-guard/types.ts +42 -0
  37. package/extensions/orbit/execution-commands.ts +134 -0
  38. package/extensions/orbit/feedback-command.ts +81 -0
  39. package/extensions/orbit/feedback.ts +96 -0
  40. package/extensions/orbit/galaxy-api.test.ts +122 -0
  41. package/extensions/orbit/galaxy-api.ts +606 -0
  42. package/extensions/orbit/galaxy-artifact-link-guidance.ts +5 -0
  43. package/extensions/orbit/galaxy-destructive-gate.ts +113 -0
  44. package/extensions/orbit/galaxy-enrich.ts +1108 -0
  45. package/extensions/orbit/galaxy-failure.ts +101 -0
  46. package/extensions/orbit/galaxy-fixture.ts +126 -0
  47. package/extensions/orbit/galaxy-history-guard.ts +233 -0
  48. package/extensions/orbit/galaxy-job-block.ts +347 -0
  49. package/extensions/orbit/galaxy-job-ops.ts +288 -0
  50. package/extensions/orbit/galaxy-live-source.ts +929 -0
  51. package/extensions/orbit/galaxy-markdown-adapter.ts +248 -0
  52. package/extensions/orbit/galaxy-op-policy.ts +332 -0
  53. package/extensions/orbit/galaxy-ops-tools.ts +326 -0
  54. package/extensions/orbit/galaxy-output-store.ts +80 -0
  55. package/extensions/orbit/galaxy-output.ts +346 -0
  56. package/extensions/orbit/galaxy-page-binding.ts +222 -0
  57. package/extensions/orbit/galaxy-page-markdown-guidance.ts +15 -0
  58. package/extensions/orbit/galaxy-page-ops.ts +159 -0
  59. package/extensions/orbit/galaxy-page-sync.test.ts +417 -0
  60. package/extensions/orbit/galaxy-page-sync.ts +318 -0
  61. package/extensions/orbit/galaxy-pages-api.ts +203 -0
  62. package/extensions/orbit/galaxy-pages-sync.ts +409 -0
  63. package/extensions/orbit/galaxy-poll-guard.ts +189 -0
  64. package/extensions/orbit/galaxy-poller.ts +706 -0
  65. package/extensions/orbit/galaxy-provenance.ts +623 -0
  66. package/extensions/orbit/galaxy-reconcile.ts +956 -0
  67. package/extensions/orbit/galaxy-recovery.ts +176 -0
  68. package/extensions/orbit/galaxy-repeat-guard.ts +55 -0
  69. package/extensions/orbit/galaxy-submission-capture.ts +707 -0
  70. package/extensions/orbit/galaxy-submission.ts +502 -0
  71. package/extensions/orbit/galaxy-tool-source.ts +78 -0
  72. package/extensions/orbit/galaxy-tool-wrap.ts +234 -0
  73. package/extensions/orbit/galaxy-udt-block.ts +127 -0
  74. package/extensions/orbit/galaxy-upload-tus.ts +334 -0
  75. package/extensions/orbit/galaxy-upload.ts +300 -0
  76. package/extensions/orbit/galaxy-version-capture.ts +65 -0
  77. package/extensions/orbit/git.ts +173 -0
  78. package/extensions/orbit/harness-block-fields.ts +597 -0
  79. package/extensions/orbit/index.ts +593 -0
  80. package/extensions/orbit/init-gate.ts +284 -0
  81. package/extensions/orbit/instructions-command.ts +136 -0
  82. package/extensions/orbit/invocation-failure-hint.ts +57 -0
  83. package/extensions/orbit/iwc-plan-check.ts +94 -0
  84. package/extensions/orbit/lesson-command.ts +303 -0
  85. package/extensions/orbit/lesson-hint.ts +245 -0
  86. package/extensions/orbit/lesson-nudge.ts +106 -0
  87. package/extensions/orbit/lessons/compose.ts +177 -0
  88. package/extensions/orbit/lessons/counters.ts +120 -0
  89. package/extensions/orbit/lessons/enabled.ts +116 -0
  90. package/extensions/orbit/lessons/matcher.ts +346 -0
  91. package/extensions/orbit/lessons/paths.ts +286 -0
  92. package/extensions/orbit/lessons/pi-event-contract.ts +105 -0
  93. package/extensions/orbit/lessons/propose-replay.ts +103 -0
  94. package/extensions/orbit/lessons/propose-tool.ts +222 -0
  95. package/extensions/orbit/lessons/propose.ts +502 -0
  96. package/extensions/orbit/lessons/replay.ts +89 -0
  97. package/extensions/orbit/lessons/reproduction-index.ts +83 -0
  98. package/extensions/orbit/lessons/search-tool.ts +99 -0
  99. package/extensions/orbit/lessons/search.ts +136 -0
  100. package/extensions/orbit/lessons/store.ts +415 -0
  101. package/extensions/orbit/lessons/text.ts +36 -0
  102. package/extensions/orbit/lessons/types.ts +69 -0
  103. package/extensions/orbit/lessons/user-dir.ts +24 -0
  104. package/extensions/orbit/lessons/user-lesson.ts +88 -0
  105. package/extensions/orbit/lessons/wrapper.ts +61 -0
  106. package/extensions/orbit/lessons-command.ts +147 -0
  107. package/extensions/orbit/local-exec.ts +39 -0
  108. package/extensions/orbit/mcp-output.ts +179 -0
  109. package/extensions/orbit/mcp-servers.test.ts +24 -0
  110. package/extensions/orbit/mcp-servers.ts +25 -0
  111. package/extensions/orbit/model-script.ts +351 -0
  112. package/extensions/orbit/notebook-anchors.ts +342 -0
  113. package/extensions/orbit/notebook-writer.ts +863 -0
  114. package/extensions/orbit/observation-allowlists.ts +1109 -0
  115. package/extensions/orbit/observation-replay.ts +148 -0
  116. package/extensions/orbit/observation-triggers.ts +563 -0
  117. package/extensions/orbit/observation-ui.ts +175 -0
  118. package/extensions/orbit/observations-command.ts +421 -0
  119. package/extensions/orbit/observations-config.ts +200 -0
  120. package/extensions/orbit/observations.ts +1381 -0
  121. package/extensions/orbit/profiles.ts +270 -0
  122. package/extensions/orbit/progress-updates.ts +95 -0
  123. package/extensions/orbit/proposal-commands.ts +882 -0
  124. package/extensions/orbit/provenance-fs-file.ts +59 -0
  125. package/extensions/orbit/provenance-fs.ts +32 -0
  126. package/extensions/orbit/provenance-memory-fs.ts +59 -0
  127. package/extensions/orbit/record-store-file.ts +177 -0
  128. package/extensions/orbit/record-store-page.ts +77 -0
  129. package/extensions/orbit/record-store-seam.ts +47 -0
  130. package/extensions/orbit/record-store.ts +149 -0
  131. package/extensions/orbit/registry-carrier.ts +107 -0
  132. package/extensions/orbit/registry-eligibility.ts +95 -0
  133. package/extensions/orbit/registry-evaluation.ts +403 -0
  134. package/extensions/orbit/registry-evaluator.ts +519 -0
  135. package/extensions/orbit/registry-import.ts +91 -0
  136. package/extensions/orbit/registry-lock.ts +221 -0
  137. package/extensions/orbit/registry-memory-fs.ts +42 -0
  138. package/extensions/orbit/registry-page-carrier.ts +103 -0
  139. package/extensions/orbit/registry-proposal.ts +1348 -0
  140. package/extensions/orbit/registry-runtime.ts +234 -0
  141. package/extensions/orbit/registry-schema.ts +735 -0
  142. package/extensions/orbit/registry-submitter.ts +59 -0
  143. package/extensions/orbit/registry-templates.ts +346 -0
  144. package/extensions/orbit/registry.ts +476 -0
  145. package/extensions/orbit/sandbox/index.ts +120 -0
  146. package/extensions/orbit/sandbox/sandbox-bash.ts +93 -0
  147. package/extensions/orbit/sandbox/sandbox-config.ts +87 -0
  148. package/extensions/orbit/sandbox/sandbox-init-message.ts +28 -0
  149. package/extensions/orbit/secret-redaction.ts +247 -0
  150. package/extensions/orbit/session-index/cwd.ts +18 -0
  151. package/extensions/orbit/session-index/db.ts +56 -0
  152. package/extensions/orbit/session-index/indexer.ts +154 -0
  153. package/extensions/orbit/session-index/is-enabled.ts +17 -0
  154. package/extensions/orbit/session-index/parse.ts +254 -0
  155. package/extensions/orbit/session-index/query.ts +209 -0
  156. package/extensions/orbit/session-index/schema.ts +72 -0
  157. package/extensions/orbit/session-index/tools.ts +152 -0
  158. package/extensions/orbit/session-lifecycle.ts +321 -0
  159. package/extensions/orbit/skill-triggers.ts +159 -0
  160. package/extensions/orbit/skills-command.ts +48 -0
  161. package/extensions/orbit/skills-discovery.ts +435 -0
  162. package/extensions/orbit/skills.ts +84 -0
  163. package/extensions/orbit/sra-import-gate.ts +77 -0
  164. package/extensions/orbit/state.ts +265 -0
  165. package/extensions/orbit/submission-replay.ts +147 -0
  166. package/extensions/orbit/sync-command.ts +157 -0
  167. package/extensions/orbit/teams/critic-parser.ts +93 -0
  168. package/extensions/orbit/teams/dispatcher.ts +210 -0
  169. package/extensions/orbit/teams/is-enabled.ts +22 -0
  170. package/extensions/orbit/teams/tool.ts +187 -0
  171. package/extensions/orbit/teams/types.ts +57 -0
  172. package/extensions/orbit/teams/validate.ts +42 -0
  173. package/extensions/orbit/tester-id-command.ts +133 -0
  174. package/extensions/orbit/tools-sync.ts +279 -0
  175. package/extensions/orbit/tools.ts +1300 -0
  176. package/extensions/orbit/types.ts +41 -0
  177. package/extensions/orbit/ui-bridge.ts +55 -0
  178. package/extensions/orbit/ulid.ts +60 -0
  179. package/extensions/orbit/user-instructions.ts +388 -0
  180. package/extensions/orbit/vendor/skills/_catalog.json +68 -0
  181. package/extensions/orbit/vendor/skills/_manifest.json +1106 -0
  182. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/SKILL.md +112 -0
  183. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_provenance.json +218 -0
  184. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_required_tools.json +33 -0
  185. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_verify.json +4 -0
  186. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/add.json +50 -0
  187. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-extract.json +51 -0
  188. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-next-step.json +42 -0
  189. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-validate.json +140 -0
  190. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/list.json +32 -0
  191. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/galaxy-tool-job-failure-reference.md +137 -0
  192. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/open-requirements-ledger.md +173 -0
  193. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-tool-summary.schema.json +175 -0
  194. package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
  195. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/SKILL.md +82 -0
  196. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_provenance.json +133 -0
  197. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_required_tools.json +16 -0
  198. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_verify.json +4 -0
  199. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/cli/draft-validate.json +140 -0
  200. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/galaxy-workflow-draft-format.md +135 -0
  201. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
  202. package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
  203. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/SKILL.md +84 -0
  204. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_provenance.json +166 -0
  205. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_verify.json +29 -0
  206. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/galaxy-workflow-testability-design.md +136 -0
  207. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  208. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-test-data-conventions.md +308 -0
  209. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-asserts-idioms.md +246 -0
  210. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-workflow-test-architecture.md +151 -0
  211. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
  212. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  213. package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/tests-format.schema.json +7328 -0
  214. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/SKILL.md +127 -0
  215. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_provenance.json +198 -0
  216. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_required_tools.json +16 -0
  217. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_verify.json +4 -0
  218. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/cli/convert.json +123 -0
  219. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/galaxy-data-flow-draft-contract.md +129 -0
  220. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  221. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-test-data-conventions.md +308 -0
  222. package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/open-requirements-ledger.md +173 -0
  223. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/SKILL.md +73 -0
  224. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_provenance.json +160 -0
  225. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_verify.json +4 -0
  226. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.md +43 -0
  227. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.yml +1250 -0
  228. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-tool-job-failure-reference.md +137 -0
  229. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  230. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  231. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/nextflow-operators-to-galaxy-collection-recipes.md +98 -0
  232. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-asserts-idioms.md +246 -0
  233. package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-workflow-test-architecture.md +151 -0
  234. package/extensions/orbit/vendor/skills/discover-shed-tool/SKILL.md +174 -0
  235. package/extensions/orbit/vendor/skills/discover-shed-tool/_provenance.json +130 -0
  236. package/extensions/orbit/vendor/skills/discover-shed-tool/_required_tools.json +18 -0
  237. package/extensions/orbit/vendor/skills/discover-shed-tool/_verify.json +17 -0
  238. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-revisions.json +48 -0
  239. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-search.json +95 -0
  240. package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-versions.json +39 -0
  241. package/extensions/orbit/vendor/skills/discover-shed-tool/references/notes/component-tool-shed-search.md +230 -0
  242. package/extensions/orbit/vendor/skills/discover-shed-tool/references/schemas/galaxy-tool-discovery.schema.json +231 -0
  243. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/SKILL.md +93 -0
  244. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_provenance.json +201 -0
  245. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_required_tools.json +28 -0
  246. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_verify.json +17 -0
  247. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/planemo.md +44 -0
  248. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/validate-tests.json +40 -0
  249. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/galaxy-workflow-testability-design.md +136 -0
  250. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
  251. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-test-data-conventions.md +308 -0
  252. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
  253. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
  254. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
  255. package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/tests-format.schema.json +7328 -0
  256. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/SKILL.md +81 -0
  257. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_provenance.json +93 -0
  258. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_verify.json +17 -0
  259. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
  260. package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  261. package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/SKILL.md +81 -0
  262. package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/_assembly.json +23 -0
  263. package/extensions/orbit/vendor/skills/run-workflow-test/SKILL.md +79 -0
  264. package/extensions/orbit/vendor/skills/run-workflow-test/_provenance.json +125 -0
  265. package/extensions/orbit/vendor/skills/run-workflow-test/_required_tools.json +28 -0
  266. package/extensions/orbit/vendor/skills/run-workflow-test/_verify.json +4 -0
  267. package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/planemo.md +44 -0
  268. package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/validate-tests.json +40 -0
  269. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  270. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
  271. package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
  272. package/extensions/orbit/vendor/skills/run-workflow-test/references/schemas/tests-format.schema.json +7328 -0
  273. package/extensions/orbit/vendor/skills/skills/LICENSE +21 -0
  274. package/extensions/orbit/vendor/skills/skills/collection-manipulation/README.md +39 -0
  275. package/extensions/orbit/vendor/skills/skills/collection-manipulation/SKILL.md +892 -0
  276. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/api-patterns.md +927 -0
  277. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/apply-rules.md +1482 -0
  278. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/test-patterns.md +996 -0
  279. package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/tools.md +609 -0
  280. package/extensions/orbit/vendor/skills/skills/galaxy-data-libraries/SKILL.md +170 -0
  281. package/extensions/orbit/vendor/skills/skills/galaxy-integration/README.md +162 -0
  282. package/extensions/orbit/vendor/skills/skills/galaxy-integration/SKILL.md +99 -0
  283. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/README.md +119 -0
  284. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/tool-checking.md +419 -0
  285. package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/workflow-testing.md +617 -0
  286. package/extensions/orbit/vendor/skills/skills/galaxy-integration/galaxy-integration.md +614 -0
  287. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/SKILL.md +144 -0
  288. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/average_col3.ipynb +68 -0
  289. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/extract_sample_metadata.ipynb +190 -0
  290. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/variant_annotation.ipynb +816 -0
  291. package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/vcp_variant_map.ipynb +443 -0
  292. package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/README.md +165 -0
  293. package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/galaxy_tool_checker.py +521 -0
  294. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/SKILL.md +128 -0
  295. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/gotchas.md +135 -0
  296. package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/history-access.md +132 -0
  297. package/extensions/orbit/vendor/skills/skills/reproduciblify/SKILL.md +146 -0
  298. package/extensions/orbit/vendor/skills/skills/reproduciblify/references/directives.yml +496 -0
  299. package/extensions/orbit/vendor/skills/skills/udt-authoring/SKILL.md +245 -0
  300. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/01-minimal-echo.yml +27 -0
  301. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/02-single-data-in-out.yml +27 -0
  302. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/03-multiple-data-js.yml +28 -0
  303. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/04-select-integer-boolean.yml +41 -0
  304. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/05-resource-requirements.yml +25 -0
  305. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/06-biocontainer-tool.yml +38 -0
  306. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/07-inline-python-script.yml +56 -0
  307. package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/08-configfile-script.yml +74 -0
  308. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/common-mistakes.md +76 -0
  309. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/schema-reference.md +155 -0
  310. package/extensions/orbit/vendor/skills/skills/udt-authoring/references/templating.md +196 -0
  311. package/extensions/orbit/vendor/skills/skills/udt-authoring/scripts/validate.py +109 -0
  312. package/extensions/orbit/vendor/skills/skills/workflow-reports/README.md +71 -0
  313. package/extensions/orbit/vendor/skills/skills/workflow-reports/SKILL.md +190 -0
  314. package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/histology-staining.md +145 -0
  315. package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/tissue-microarray-analysis.md +176 -0
  316. package/extensions/orbit/vendor/skills/skills/workflow-reports/references/directives.md +415 -0
  317. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/SKILL.md +98 -0
  318. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_provenance.json +93 -0
  319. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_required_tools.json +28 -0
  320. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_verify.json +17 -0
  321. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/convert.json +123 -0
  322. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/foundry.md +25 -0
  323. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/validate.json +142 -0
  324. package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/schemas/summary-galaxy-workflow.schema.json +687 -0
  325. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/SKILL.md +74 -0
  326. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_provenance.json +71 -0
  327. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_required_tools.json +16 -0
  328. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_verify.json +4 -0
  329. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/cli/validate.json +142 -0
  330. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
  331. package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-testability-design.md +136 -0
  332. package/extensions/orbit/vendor-skills.ts +283 -0
  333. package/extensions/orbit/workspace-state-dir.ts +46 -0
  334. package/extensions/orbit-handoff/index.ts +73 -0
  335. package/extensions/orbit-handoff/orbit-launcher.ts +142 -0
  336. package/extensions/whats-new/index.ts +98 -0
  337. package/lessons/LICENSE +17 -0
  338. package/lessons/README.md +117 -0
  339. package/lessons/SCHEMA.md +187 -0
  340. package/lessons/build-snapshot.mjs +311 -0
  341. package/lessons/data/downloaded-file-is-not-what-its-extension-says.md +61 -0
  342. package/lessons/galaxy-api/403-history-is-a-hard-stop.md +57 -0
  343. package/lessons/galaxy-api/collection-into-single-dataset-input.md +61 -0
  344. package/lessons/galaxy-api/connectedvalue-in-command-line.md +62 -0
  345. package/lessons/galaxy-api/hid-is-not-an-id.md +59 -0
  346. package/lessons/galaxy-api/invoke-workflow-inputs-not-params.md +60 -0
  347. package/lessons/galaxy-api/repeat-param-pipe-keys.md +63 -0
  348. package/lessons/galaxy-api/run-tool-returns-on-submit.md +61 -0
  349. package/lessons/galaxy-tools/reference-index-not-on-server.md +62 -0
  350. package/lessons/log.md +42 -0
  351. package/lessons/reproduction/input-population-mismatch.md +59 -0
  352. package/lessons/reproduction/methods-text-vs-executed-parameters.md +62 -0
  353. package/lessons/snapshot.json +1004 -0
  354. package/lessons/stats/de-contrast-direction-and-sample-labels.md +63 -0
  355. package/lessons/stats/na-coerced-to-zero-in-filters.md +59 -0
  356. package/lessons/validate.mjs +1219 -0
  357. package/package.json +103 -5
  358. package/shared/agent-prompt.d.ts +8 -0
  359. package/shared/agent-prompt.js +15 -0
  360. package/shared/approval-prompt.d.ts +4 -0
  361. package/shared/approval-prompt.js +61 -0
  362. package/shared/brain-env.d.ts +14 -0
  363. package/shared/brain-env.js +108 -0
  364. package/shared/brain-exit.d.ts +20 -0
  365. package/shared/brain-exit.js +149 -0
  366. package/shared/capability-profile.d.ts +16 -0
  367. package/shared/capability-profile.js +75 -0
  368. package/shared/config-source.d.ts +13 -0
  369. package/shared/config-source.js +17 -0
  370. package/shared/confusables.d.ts +3 -0
  371. package/shared/confusables.js +93 -0
  372. package/shared/custom-provider.d.ts +45 -0
  373. package/shared/custom-provider.js +169 -0
  374. package/shared/dashboard-contract.d.ts +123 -0
  375. package/shared/dashboard-contract.js +560 -0
  376. package/shared/dashboard-layout-store.d.ts +44 -0
  377. package/shared/dashboard-layout-store.js +281 -0
  378. package/shared/feedback-contract.d.ts +61 -0
  379. package/shared/feedback-contract.js +146 -0
  380. package/shared/galaxy-artifact-links.d.ts +30 -0
  381. package/shared/galaxy-artifact-links.js +166 -0
  382. package/shared/galaxy-credentials.d.ts +26 -0
  383. package/shared/galaxy-credentials.js +71 -0
  384. package/shared/galaxy-destructive.d.ts +21 -0
  385. package/shared/galaxy-destructive.js +269 -0
  386. package/shared/galaxy-guidance.d.ts +2 -0
  387. package/shared/galaxy-guidance.js +53 -0
  388. package/shared/galaxy-live-contract.d.ts +92 -0
  389. package/shared/galaxy-live-contract.js +180 -0
  390. package/shared/galaxy-page-cells.d.ts +2 -0
  391. package/shared/galaxy-page-cells.js +22 -0
  392. package/shared/galaxy-tool-family.d.ts +5 -0
  393. package/shared/galaxy-tool-family.js +27 -0
  394. package/shared/galaxy-url.d.ts +1 -0
  395. package/shared/galaxy-url.js +48 -0
  396. package/shared/gtn.d.ts +31 -0
  397. package/shared/gtn.js +253 -0
  398. package/shared/handled-prompt.d.ts +3 -0
  399. package/shared/handled-prompt.js +26 -0
  400. package/shared/known-provider.d.ts +11 -0
  401. package/shared/known-provider.js +89 -0
  402. package/shared/lesson-hint-marker.d.ts +7 -0
  403. package/shared/lesson-hint-marker.js +32 -0
  404. package/shared/lesson-rules.d.ts +150 -0
  405. package/shared/lesson-rules.js +203 -0
  406. package/shared/malformed-object-ids.d.ts +1 -0
  407. package/shared/malformed-object-ids.js +37 -0
  408. package/shared/markdown-sections.d.ts +10 -0
  409. package/shared/markdown-sections.js +118 -0
  410. package/shared/notebook-fences.d.ts +12 -0
  411. package/shared/notebook-fences.js +53 -0
  412. package/shared/observation-contract.d.ts +91 -0
  413. package/shared/observation-contract.js +544 -0
  414. package/shared/orbit-config.d.ts +226 -0
  415. package/shared/orbit-config.js +189 -0
  416. package/shared/orbit-env.d.ts +13 -0
  417. package/shared/orbit-env.js +124 -0
  418. package/shared/orbit-shell-contract.d.ts +74 -0
  419. package/shared/orbit-shell-contract.js +30 -0
  420. package/shared/page-content-hash.d.ts +1 -0
  421. package/shared/page-content-hash.js +13 -0
  422. package/shared/pi-default-model.d.ts +7 -0
  423. package/shared/pi-default-model.js +41 -0
  424. package/shared/prompt-blocks.d.ts +87 -0
  425. package/shared/prompt-blocks.js +898 -0
  426. package/shared/provider-auth-caps.d.ts +22 -0
  427. package/shared/provider-auth-caps.js +57 -0
  428. package/shared/random.d.ts +2 -0
  429. package/shared/random.js +15 -0
  430. package/shared/record-excerpt.d.ts +4 -0
  431. package/shared/record-excerpt.js +16 -0
  432. package/shared/redirect-guard.d.ts +36 -0
  433. package/shared/redirect-guard.js +235 -0
  434. package/shared/skills-pin.d.ts +8 -0
  435. package/shared/skills-pin.js +9 -0
  436. package/shared/skills-router.d.ts +17 -0
  437. package/shared/skills-router.js +63 -0
  438. package/shared/sra-import.d.ts +34 -0
  439. package/shared/sra-import.js +206 -0
  440. package/shared/state-dir.d.ts +21 -0
  441. package/shared/state-dir.js +240 -0
  442. package/shared/team-dispatch-contract.d.ts +28 -0
  443. package/shared/team-dispatch-contract.js +1 -0
  444. package/shared/truncate-middle.d.ts +11 -0
  445. package/shared/truncate-middle.js +68 -0
  446. package/shared/version-compare.d.ts +10 -0
  447. package/shared/version-compare.js +74 -0
  448. package/shared/whats-new.d.ts +31 -0
  449. package/shared/whats-new.js +83 -0
  450. package/shared/wsl.d.ts +10 -0
  451. package/shared/wsl.js +24 -0
@@ -0,0 +1,1250 @@
1
+ - doc: |
2
+ # Collection Semantics
3
+
4
+ This document describes the semantics around working with Galaxy dataset collections.
5
+ In particular it describes how they operate within Galaxy tools and workflows.
6
+
7
+ :::{admonition} You Probably Don't Need to Read This
8
+ :class: caution
9
+
10
+ Any significantly sophisticated workflow language will have ways to collect data
11
+ into arrays or vectors or dictionaries and apply operations across this data (mapping)
12
+ or reduce the dimensionality of this data (reductions). Typically, this is explicitly
13
+ annotated with map functions or for loops. Galaxy however is designed to be a point
14
+ and click interface for connecting steps and running tools. It is important that steps
15
+ just connect and just do the most natural thing - and this is what Galaxy does.
16
+ This document just provides a mathematical formalism to that "what should just
17
+ intuitively work" that can be used to document test cases and help with implementation.
18
+ This is reference documentation not user documentation, Galaxy should just work.
19
+ :::
20
+
21
+ ## Mapping
22
+
23
+ If a tool consumes a simple dataset parameter and produces a simple dataset parameter,
24
+ then any collection type may be "mapped over" the data input to that tool. The result of
25
+ that is the tool being applied to each element of the collection and "implicit collections"
26
+ being created from the outputs that are produced from those operations. Those implicit
27
+ collections have the same element identifiers in the same order as the input collection that is
28
+ mapped over. Each element of the implicit collections correspond to their own job and
29
+ Galaxy very naturally and intuitively parallelizes jobs without extra work from the user
30
+ and without any knowledge of the tool.
31
+
32
+ - example:
33
+ label: BASIC_MAPPING_PAIRED
34
+ assumptions:
35
+ - datasets: [d_f, d_r]
36
+ - tool:
37
+ in: {i: dataset}
38
+ out: {o: dataset}
39
+ - collections:
40
+ C: [paired, {forward: d_f, reverse: d_r}]
41
+ then:
42
+ type: map_over
43
+ invocation:
44
+ inputs:
45
+ i: {type: map_over, collection: C}
46
+ produces:
47
+ o:
48
+ type: collection
49
+ collection_type: paired
50
+ elements:
51
+ forward:
52
+ type: tool_output_ref
53
+ invocation: {inputs: {i: {type: dataset, ref: d_f}}}
54
+ output: o
55
+ reverse:
56
+ type: tool_output_ref
57
+ invocation: {inputs: {i: {type: dataset, ref: d_r}}}
58
+ output: o
59
+ tests:
60
+ tool_runtime:
61
+ api_test: "test_tool_execute.py::test_map_over_collection"
62
+ workflow_runtime:
63
+ framework_test: "collection_semantics_cat_0"
64
+ workflow_editor: "accepts paired data -> data connection"
65
+
66
+ - example:
67
+ label: BASIC_MAPPING_PAIRED_OR_UNPAIRED_PAIRED
68
+ assumptions:
69
+ - datasets: [d_f, d_r]
70
+ - tool:
71
+ in: {i: dataset}
72
+ out: {o: dataset}
73
+ - collections:
74
+ C: [paired_or_unpaired, {forward: d_f, reverse: d_r}]
75
+ then:
76
+ type: map_over
77
+ invocation:
78
+ inputs:
79
+ i: {type: map_over, collection: C}
80
+ produces:
81
+ o:
82
+ type: collection
83
+ collection_type: paired_or_unpaired
84
+ elements:
85
+ forward:
86
+ type: tool_output_ref
87
+ invocation: {inputs: {i: {type: dataset, ref: d_f}}}
88
+ output: o
89
+ reverse:
90
+ type: tool_output_ref
91
+ invocation: {inputs: {i: {type: dataset, ref: d_r}}}
92
+ output: o
93
+ tests:
94
+ tool_runtime:
95
+ api_test: "test_tool_execute.py::test_map_over_data_with_paired_or_unpaired_paired"
96
+ workflow_runtime:
97
+ framework_test: "collection_semantics_cat_1"
98
+ workflow_editor: "accepts paired_or_unpaired data -> data connection"
99
+
100
+ - example:
101
+ label: BASIC_MAPPING_PAIRED_OR_UNPAIRED_UNPAIRED
102
+ assumptions:
103
+ - datasets: [d_u]
104
+ - tool:
105
+ in: {i: dataset}
106
+ out: {o: dataset}
107
+ - collections:
108
+ C: [paired_or_unpaired, {unpaired: d_u}]
109
+ then:
110
+ type: map_over
111
+ invocation:
112
+ inputs:
113
+ i: {type: map_over, collection: C}
114
+ produces:
115
+ o:
116
+ type: collection
117
+ collection_type: paired_or_unpaired
118
+ elements:
119
+ unpaired:
120
+ type: tool_output_ref
121
+ invocation: {inputs: {i: {type: dataset, ref: d_u}}}
122
+ output: o
123
+ tests:
124
+ tool_runtime:
125
+ api_test: "test_tool_execute.py::test_map_over_data_with_paired_or_unpaired_unpaired"
126
+ workflow_runtime:
127
+ framework_test: "collection_semantics_cat_2"
128
+ workflow_editor: "accepts paired_or_unpaired data -> data connection"
129
+
130
+ - example:
131
+ label: BASIC_MAPPING_LIST
132
+ assumptions:
133
+ - datasets: ["d_1,...,d_n"]
134
+ - tool:
135
+ in: {i: dataset}
136
+ out: {o: dataset}
137
+ - collections:
138
+ C: [list, {i1: "d_1", ..., in: "d_n"}]
139
+ then:
140
+ type: map_over
141
+ invocation:
142
+ inputs:
143
+ i: {type: map_over, collection: C}
144
+ produces:
145
+ o:
146
+ type: collection
147
+ collection_type: list
148
+ elements:
149
+ i1:
150
+ type: tool_output_ref
151
+ invocation: {inputs: {i: {type: dataset, ref: d_1}}}
152
+ output: o
153
+ "...": {type: ellipsis}
154
+ in:
155
+ type: tool_output_ref
156
+ invocation: {inputs: {i: {type: dataset, ref: d_n}}}
157
+ output: o
158
+ tests:
159
+ workflow_editor: "accepts collection data -> data connection"
160
+
161
+ - doc: |
162
+ The above description of mapping over inputs works naturally and as expected for
163
+ nested collections.
164
+
165
+ - example:
166
+ label: NESTED_LIST_MAPPING
167
+ assumptions:
168
+ - datasets: ["d_1,...,d_n"]
169
+ - tool:
170
+ in: {i: dataset}
171
+ out: {o: dataset}
172
+ - collections:
173
+ C: ["list:list", {o1: {inner: d_1}, ..., "on": {inner: d_n}}]
174
+ then:
175
+ type: map_over
176
+ invocation:
177
+ inputs:
178
+ i: {type: map_over, collection: C}
179
+ produces:
180
+ o:
181
+ type: collection
182
+ collection_type: "list:list"
183
+ elements:
184
+ o1:
185
+ type: nested_elements
186
+ elements:
187
+ inner:
188
+ type: tool_output_ref
189
+ invocation: {inputs: {i: {type: dataset, ref: d_1}}}
190
+ output: o
191
+ "...": {type: ellipsis}
192
+ "on":
193
+ type: nested_elements
194
+ elements:
195
+ inner:
196
+ type: tool_output_ref
197
+ invocation: {inputs: {i: {type: dataset, ref: d_n}}}
198
+ output: o
199
+ tests:
200
+ tool_runtime:
201
+ api_test: "test_tools.py::TestToolsApi::test_map_over_nested_collections"
202
+ workflow_editor: "accepts list:list data -> data connection"
203
+
204
+ - example:
205
+ label: BASIC_MAPPING_LIST_PAIRED_OR_UNPAIRED
206
+ assumptions:
207
+ - datasets: [d_f, d_r]
208
+ - tool:
209
+ in: {i: dataset}
210
+ out: {o: dataset}
211
+ - collections:
212
+ C: ["list:paired_or_unpaired", {el1: {forward: d_f, reverse: d_r}}]
213
+ then:
214
+ type: map_over
215
+ invocation:
216
+ inputs:
217
+ i: {type: map_over, collection: C}
218
+ produces:
219
+ o:
220
+ type: collection
221
+ collection_type: "list:paired_or_unpaired"
222
+ elements:
223
+ el1:
224
+ type: nested_elements
225
+ elements:
226
+ forward:
227
+ type: tool_output_ref
228
+ invocation: {inputs: {i: {type: dataset, ref: d_f}}}
229
+ output: o
230
+ reverse:
231
+ type: tool_output_ref
232
+ invocation: {inputs: {i: {type: dataset, ref: d_r}}}
233
+ output: o
234
+ tests:
235
+ tool_runtime:
236
+ api_test: "test_tool_execute.py::test_map_over_data_with_list_paired_or_unpaired"
237
+ workflow_runtime:
238
+ framework_test: "collection_semantics_cat_3"
239
+ workflow_editor: "accepts list:paired_or_unpaired data -> data connection"
240
+
241
+ - doc: |
242
+
243
+ For tools with multiple data inputs, the tool can be executed with individual
244
+ datasets for the non-mapped over input and each tool execution will just be executed
245
+ with that dataset. The dataset not mapped over serves as the input for each execution.
246
+
247
+ - example:
248
+ label: BASIC_MAPPING_INCLUDING_SINGLE_DATASET
249
+ assumptions:
250
+ - datasets: ["d_1,...,d_n", "d_o"]
251
+ - tool:
252
+ in: {i: dataset, i2: dataset}
253
+ out: {o: dataset}
254
+ - collections:
255
+ C: ["list", {i1: d_1, ..., in: d_n}]
256
+ then:
257
+ type: map_over
258
+ invocation:
259
+ inputs:
260
+ i: {type: map_over, collection: C}
261
+ i2: {type: dataset, ref: d_o}
262
+ produces:
263
+ o:
264
+ type: collection
265
+ collection_type: list
266
+ elements:
267
+ i1:
268
+ type: tool_output_ref
269
+ invocation: {inputs: {i: {type: dataset, ref: d_1}, i2: {type: dataset, ref: d_o}}}
270
+ output: o
271
+ "...": {type: ellipsis}
272
+ in:
273
+ type: tool_output_ref
274
+ invocation: {inputs: {i: {type: dataset, ref: d_n}, i2: {type: dataset, ref: d_o}}}
275
+ output: o
276
+ tests:
277
+ tool_runtime:
278
+ api_test: "test_tools.py::TestToolsApi::test_map_over_collected_and_individual_datasets"
279
+ workflow_runtime:
280
+ framework_test: "collection_semantics_cat_two_inputs_0"
281
+
282
+ - doc: |
283
+ If a tool consumes two input datasets and produces one output dataset, you can map two
284
+ collections with identical structure (same element identifiers in the same order) over
285
+ the respective inputs and the result is an implicit collection with the same structure
286
+ as the inputs and where each output in the implicit collection corresponds to the tool
287
+ being executed with the two inputs corresponding to that position in the input
288
+ collections.
289
+
290
+ The default behavior here is the collections are linked and the act of mapping over
291
+ inputs to the tool are sort of a flat map or a dot product. No extra dimensionality
292
+ in the resulting collections.
293
+
294
+ From a user perspective this means if you start with a collection and apply a bunch
295
+ of map over operations on tools - the results will all continue to match and work together
296
+ very naturally - again without extra work by the user and without extra knowledge
297
+ by the tool author.
298
+
299
+ - example:
300
+ label: BASIC_MAPPING_TWO_INPUTS_WITH_IDENTICAL_STRUCTURE
301
+ assumptions:
302
+ - datasets: ["d1_1,...,d1_n", "d2_1,...,d2_n"]
303
+ - tool:
304
+ in: {i: dataset, i2: dataset}
305
+ out: {o: dataset}
306
+ - collections:
307
+ C1: ["list", {i1: d1_1, ..., in: d1_n}]
308
+ C2: ["list", {i1: d2_1, ..., in: d2_n}]
309
+ then:
310
+ type: map_over
311
+ invocation:
312
+ inputs:
313
+ i: {type: map_over, collection: C1}
314
+ i2: {type: map_over, collection: C2}
315
+ produces:
316
+ o:
317
+ type: collection
318
+ collection_type: list
319
+ elements:
320
+ i1:
321
+ type: tool_output_ref
322
+ invocation: {inputs: {i: {type: dataset, ref: d1_1}, i2: {type: dataset, ref: d2_1}}}
323
+ output: o
324
+ "...": {type: ellipsis}
325
+ in:
326
+ type: tool_output_ref
327
+ invocation: {inputs: {i: {type: dataset, ref: d1_n}, i2: {type: dataset, ref: d2_n}}}
328
+ output: o
329
+ tests:
330
+ tool_runtime:
331
+ api_test: test_tools.py::TestToolsApi::test_map_over_two_collections
332
+ workflow_runtime:
333
+ framework_test: "collection_semantics_cat_two_inputs_1"
334
+
335
+ - doc: "## Reduction"
336
+ - doc: |
337
+ Not all tool executions result in implicit collections and mapping
338
+ over inputs. Tool inputs of ``type`` ``data_collection`` can consume
339
+ collections directly and do not necessarily result in mapping over.
340
+
341
+ Tools that consume collections and output datasets effectively
342
+ reduce the dimension of the Galaxy data structure. When used at runtime
343
+ this is often referred to as a "reduction" in the code.
344
+
345
+ - example:
346
+ label: COLLECTION_INPUT_PAIRED
347
+ assumptions:
348
+ - datasets: ["d_f", "d_r"]
349
+ - tool:
350
+ in: {i: "collection<paired>"}
351
+ out: {o: dataset}
352
+ - collections:
353
+ C: [paired, {forward: d_f, reverse: d_r}]
354
+ then:
355
+ type: reduction
356
+ invocation:
357
+ inputs:
358
+ i: {type: collection, ref: C}
359
+ produces:
360
+ o: {type: dataset}
361
+ tests:
362
+ tool_runtime:
363
+ tool: collection_paired_test
364
+ workflow_editor: "accepts paired -> paired connection"
365
+
366
+ - example:
367
+ label: COLLECTION_INPUT_LIST
368
+ assumptions:
369
+ - datasets: ["d_1,...,d_n"]
370
+ - tool:
371
+ in: {i: "collection<list>"}
372
+ out: {o: dataset}
373
+ - collections:
374
+ C: [list, {el1: d_1, ..., eln: d_n}]
375
+ then:
376
+ type: reduction
377
+ invocation:
378
+ inputs:
379
+ i: {type: collection, ref: C}
380
+ produces:
381
+ o: {type: dataset}
382
+ tests:
383
+ workflow_runtime:
384
+ framework_test: "collection_semantics_cat_collection_0"
385
+ workflow_editor: "accepts list -> list connection"
386
+
387
+ - example:
388
+ label: COLLECTION_INPUT_PAIRED_OR_UNPAIRED
389
+ assumptions:
390
+ - datasets: [d_f, d_r]
391
+ - tool:
392
+ in: {i: "collection<paired_or_unpaired>"}
393
+ out: {o: dataset}
394
+ - collections:
395
+ C: [paired_or_unpaired, {forward: d_f, reverse: d_r}]
396
+ then:
397
+ type: reduction
398
+ invocation:
399
+ inputs:
400
+ i: {type: collection, ref: C}
401
+ produces:
402
+ o: {type: dataset}
403
+ tests:
404
+ tool_runtime:
405
+ tool: collection_paired_or_unpaired
406
+ workflow_runtime:
407
+ framework_test: "collection_semantics_paired_or_unpaired_0"
408
+ workflow_editor: "accepts paired_or_unpaired data -> paired_or_unpaired connection"
409
+
410
+ - example:
411
+ label: COLLECTION_INPUT_LIST_PAIRED_OR_UNPAIRED
412
+ assumptions:
413
+ - datasets: [d_f, d_r]
414
+ - tool:
415
+ in: {i: "collection<list:paired_or_unpaired>"}
416
+ out: {o: dataset}
417
+ - collections:
418
+ C: ["list:paired_or_unpaired", {el1: {forward: d_f, reverse: d_r}}]
419
+ then:
420
+ type: reduction
421
+ invocation:
422
+ inputs:
423
+ i: {type: collection, ref: C}
424
+ produces:
425
+ o: {type: dataset}
426
+ tests:
427
+ tool_runtime:
428
+ tool: collection_list_paired_or_unpaired
429
+ workflow_runtime:
430
+ framework_test: "collection_semantics_list_paired_or_unpaired_0"
431
+ workflow_editor: "accepts list:paired_or_unpaired data -> list:paired_or_unpaired connection"
432
+
433
+ - doc: |
434
+ For nested collections where each rank is a ``list`` or a ``paired`` collection,
435
+ then collection inputs must match every part of the collection type input definition.
436
+
437
+ - example:
438
+ label: COLLECTION_INPUT_LIST_NOT_CONSUMES_PAIRS
439
+ assumptions:
440
+ - datasets: [d_f, d_r]
441
+ - tool:
442
+ in: {i: "collection<list>"}
443
+ out: {o: dataset}
444
+ - collections:
445
+ C: [paired, {forward: d_f, reverse: d_r}]
446
+ then:
447
+ type: invalid
448
+ invocation:
449
+ inputs:
450
+ i: {type: collection, ref: C}
451
+ is_valid: false
452
+ tests:
453
+ workflow_editor: "rejects connecting paired -> list"
454
+
455
+ - example:
456
+ label: COLLECTION_INPUT_PAIRED_NOT_CONSUMES_LIST
457
+ assumptions:
458
+ - datasets: ["d_1,...,d_n"]
459
+ - tool:
460
+ in: {i: "collection<paired>"}
461
+ out: {o: dataset}
462
+ - collections:
463
+ C: [list, {i1: d_1, ..., in: d_n}]
464
+ then:
465
+ type: invalid
466
+ invocation:
467
+ inputs:
468
+ i: {type: collection, ref: C}
469
+ is_valid: false
470
+ tests:
471
+ workflow_editor: "rejects connecting list -> paired"
472
+
473
+ - example:
474
+ label: COLLECTION_INPUT_LIST_PAIRED_NOT_CONSUMES_PAIRED_PAIRED
475
+ assumptions:
476
+ - datasets: [d_f, d_r]
477
+ - tool:
478
+ in: {i: "collection<list:paired>"}
479
+ out: {o: dataset}
480
+ - collections:
481
+ C: ["paired:paired", {forward: {forward: d_f, reverse: d_r}, reverse: {forward: d_f, reverse: d_r}}]
482
+ then:
483
+ type: invalid
484
+ invocation:
485
+ inputs:
486
+ i: {type: collection, ref: C}
487
+ is_valid: false
488
+ tests:
489
+ workflow_editor: "rejects paired:paired -> list:paired connection"
490
+
491
+ - example:
492
+ label: COLLECTION_INPUT_LIST_PAIRED_OR_NOT_PAIRED_NOT_CONSUMES_PAIRED_PAIRED
493
+ assumptions:
494
+ - datasets: [d_f, d_r]
495
+ - tool:
496
+ in: {i: "collection<list:paired_or_unpaired>"}
497
+ out: {o: dataset}
498
+ - collections:
499
+ C: ["paired:paired", {forward: {forward: d_f, reverse: d_r}, reverse: {forward: d_f, reverse: d_r}}]
500
+ then:
501
+ type: invalid
502
+ invocation:
503
+ inputs:
504
+ i: {type: collection, ref: C}
505
+ is_valid: false
506
+ tests:
507
+ workflow_editor: "rejects paired:paired -> list:paired_or_unpaired connection"
508
+
509
+ - doc: |
510
+ In addition to explicit collection inputs, tool inputs of ``type`` ``data``
511
+ where ``multiple="true"`` can consume lists directly. This is likewise a
512
+ "reduction" and does not result in implicit collection creation.
513
+
514
+ - example:
515
+ label: LIST_REDUCTION
516
+ assumptions:
517
+ - datasets: ["d_1,...,d_n"]
518
+ - tool:
519
+ in: {i: "dataset<multiple=true>"}
520
+ out: {o: dataset}
521
+ - collections:
522
+ C: [list, {i1: d_1, ..., in: d_n}]
523
+ then:
524
+ type: equivalence
525
+ left:
526
+ inputs:
527
+ i: {type: collection, ref: C}
528
+ right:
529
+ inputs:
530
+ i: {type: dataset_list, refs: ["d_1", "...", "d_n"]}
531
+ tests:
532
+ tool_runtime:
533
+ api_test: "test_tools.py::TestToolsApi::test_reduce_collections"
534
+ workflow_runtime:
535
+ framework_test: "collection_semantics_multi_data_optional_0"
536
+ workflow_editor: "treats multi data input as list input"
537
+
538
+ - doc: |
539
+ Paired collections cannot be reduced this way. ``paired`` is not meant
540
+ to represent a list/array/vector data structure - it is more like a tuple.
541
+
542
+ - example:
543
+ label: PAIRED_REDUCTION_INVALID
544
+ assumptions:
545
+ - datasets: [d_f, d_r]
546
+ - tool:
547
+ in: {i: "dataset<multiple=true>"}
548
+ out: {o: dataset}
549
+ - collections:
550
+ C: [paired, {forward: d_f, reverse: d_r}]
551
+ then:
552
+ type: invalid
553
+ invocation:
554
+ inputs:
555
+ i: {type: collection, ref: C}
556
+ is_valid: false
557
+ tests:
558
+ workflow_editor: "rejects paired input on multi-data input"
559
+
560
+ - example:
561
+ label: PAIRED_OR_UNPAIRED_REDUCTION_INVALID
562
+ assumptions:
563
+ - datasets: [d_f, d_r]
564
+ - tool:
565
+ in: {i: "dataset<multiple=true>"}
566
+ out: {o: dataset}
567
+ - collections:
568
+ C: [paired_or_unpaired, {forward: d_f, reverse: d_r}]
569
+ then:
570
+ type: invalid
571
+ invocation:
572
+ inputs:
573
+ i: {type: collection, ref: C}
574
+ is_valid: false
575
+ tests:
576
+ workflow_editor: "rejects paired_or_unpaired input on multi-data input"
577
+
578
+ - doc: "## Sub-collection Mapping"
579
+ - doc: |
580
+ ![](https://planemo.readthedocs.io/en/master/_images/subcollection_mapping_identifiers.svg)
581
+
582
+ - example:
583
+ label: MAPPING_LIST_PAIRED_OVER_PAIRED
584
+ assumptions:
585
+ - datasets: [d_f, d_r]
586
+ - tool:
587
+ in: {i: "collection<paired>"}
588
+ out: {o: dataset}
589
+ - collections:
590
+ C: ["list:paired", {el1: {forward: d_f, reverse: d_r}}]
591
+ "C\\_PAIRED": [paired, {forward: d_f,reverse: d_r}]
592
+ then:
593
+ type: map_over
594
+ invocation:
595
+ inputs:
596
+ i: {type: map_over, collection: C, sub_collection_type: paired}
597
+ produces:
598
+ o:
599
+ type: collection
600
+ collection_type: list
601
+ elements:
602
+ el1:
603
+ type: tool_output_ref
604
+ invocation: {inputs: {i: {type: collection, ref: "C\\_PAIRED"}}}
605
+ output: o
606
+ tests:
607
+ tool_runtime:
608
+ api_test: "test_tool_execute.py::test_simple_subcollection_mapping"
609
+ workflow_editor: "accepts list:paired -> paired connection"
610
+
611
+ - doc: |
612
+ The natural extension of multiple data input parameters consuming list collections as described
613
+ above when discussing reductions is that nested lists of lists (``list:list``) can be mapped
614
+ over a multiple data input parameter. Each nested list will be reduced by this operation but the
615
+ results will be mapped over. The result will be a list with the same structure as the outer list
616
+ of the input collection.
617
+
618
+ - example:
619
+ label: NESTED_LIST_REDUCTION
620
+ assumptions:
621
+ - datasets: ["d_1,...,d_n"]
622
+ - tool:
623
+ in: {i: "dataset<multiple=true>"}
624
+ out: {o: dataset}
625
+ - collections:
626
+ C: ["list:list", {o1: {inner: d_1}, ..., "on": {inner: d_n}}]
627
+ then:
628
+ type: map_over
629
+ invocation:
630
+ inputs:
631
+ i: {type: map_over, collection: C, sub_collection_type: list}
632
+ produces:
633
+ o:
634
+ type: collection
635
+ collection_type: list
636
+ elements:
637
+ o1:
638
+ type: tool_output_ref
639
+ invocation: {inputs: {i: {type: dataset_list, refs: ["d_1"]}}}
640
+ output: o
641
+ "...": {type: ellipsis}
642
+ "on":
643
+ type: tool_output_ref
644
+ invocation: {inputs: {i: {type: dataset_list, refs: ["d_n"]}}}
645
+ output: o
646
+ tests:
647
+ workflow_editor: "maps list:list over multi data input"
648
+
649
+ - doc: |
650
+ Just as a paired collection won't be reduced by a multiple data input, any sort of nested
651
+ collection ending in a paired collection cannot be mapped over such an input. So a multiple
652
+ data input parameter cannot be mapped over by a list of pairs (``list:paired``) for instance.
653
+
654
+ - example:
655
+ label: LIST_PAIRED_REDUCTION_INVALID
656
+ assumptions:
657
+ - datasets: [d_f, d_r]
658
+ - tool:
659
+ in: {i: "dataset<multiple=true>"}
660
+ out: {o: dataset}
661
+ - collections:
662
+ C: ["list:paired", {el1: {forward: d_f, reverse: d_r}}]
663
+ then:
664
+ type: invalid
665
+ invocation:
666
+ inputs:
667
+ i: {type: map_over, collection: C, sub_collection_type: paired}
668
+ is_valid: false
669
+ tests:
670
+ workflow_editor: "rejects list:paired input on multi-data input"
671
+
672
+ - example:
673
+ label: LIST_PAIRED_OR_UNPAIRED_REDUCTION_INVALID
674
+ assumptions:
675
+ - datasets: [d_f, d_r]
676
+ - tool:
677
+ in: {i: "dataset<multiple=true>"}
678
+ out: {o: dataset}
679
+ - collections:
680
+ C: ["list:paired_or_unpaired", {el1: {forward: d_f, reverse: d_r}}]
681
+ then:
682
+ type: invalid
683
+ invocation:
684
+ inputs:
685
+ i: {type: map_over, collection: C, sub_collection_type: paired_or_unpaired}
686
+ is_valid: false
687
+ tests:
688
+ workflow_editor: "rejects list:paired_or_unpaired input on multi-data input"
689
+
690
+ - doc: "## paired_or_unpaired Collections"
691
+ - doc: |
692
+ The collection type ``paired_or_unpaired`` is meant to serve as a stand-in for
693
+ an entity that can be either a single dataset or what is effectively a ``paired``
694
+ dataset collection. These collections either have one element with identifier
695
+ ``unpaired`` or two elements with identifiers ``forward`` and ``reverse``.
696
+
697
+ Tools can declare a data_collection input with collection type ``paired_or_unpaired``
698
+ and that input will consume either an explicit ``paired_or_unpaired`` collection
699
+ normally or can consume a ``paired`` input.
700
+
701
+ - example:
702
+ label: PAIRED_OR_UNPAIRED_CONSUMES_PAIRED
703
+ assumptions:
704
+ - datasets: [d_f, d_r]
705
+ - tool:
706
+ in: {i: "collection<paired_or_unpaired>"}
707
+ out: {o: dataset}
708
+ - collections:
709
+ C: [paired, {forward: d_f, reverse: d_r}]
710
+ - "C_AS_MIXED = CollectionInstance<paired_or_unpaired, {forward: d_f, reverse: d_r}>"
711
+ then:
712
+ type: equivalence
713
+ left:
714
+ inputs:
715
+ i: {type: collection, ref: C}
716
+ right:
717
+ inputs:
718
+ i: {type: collection, ref: C_AS_MIXED}
719
+ tests:
720
+ tool_runtime:
721
+ tool: collection_paired_or_unpaired
722
+ workflow_runtime:
723
+ framework_test: "collection_semantics_paired_or_unpaired_1"
724
+ workflow_editor: "accepts paired -> paired_or_unpaired connection"
725
+
726
+ - doc: |
727
+
728
+ The inverse of this doesn't work intentionally. In some ways a ``paired`` collection
729
+ acts as a ``paired_or_unpaired`` collection but a ``paired_or_unpaired`` is not a paired
730
+ collection. This makes a lot of sense in terms of tools - a tool consuming a ``paired``
731
+ dataset expects to find both a ``forward`` and ``reverse`` element but these may not exist
732
+ in ``paired_or_unpaired`` collection.
733
+
734
+ - example:
735
+ label: PAIRED_OR_UNPAIRED_NOT_CONSUMED_BY_PAIRED
736
+ assumptions:
737
+ - datasets: [d_f, d_r]
738
+ - tool:
739
+ in: {i: "collection<paired>"}
740
+ out: {o: dataset}
741
+ - collections:
742
+ C: [paired_or_unpaired, {forward: d_f, reverse: d_r}]
743
+ then:
744
+ type: invalid
745
+ invocation:
746
+ inputs:
747
+ i: {type: collection, ref: C}
748
+ is_valid: false
749
+ tests:
750
+ workflow_editor: "rejects paired_or_unpaired -> paired connection"
751
+
752
+ - doc: |
753
+
754
+ The same logic holds for mapping, lists of paired datasets (``list:paired``) can be mapped over these
755
+ ``paired_or_unpaired`` inputs and mixed lists of pairs (``list:paired_or_unpaired``) cannot
756
+ be mapped over a ``paired`` input. Following the same logic, ``list:paired_or_unpaired`` cannot
757
+ be mapped over a ``list`` input or multiple data input.
758
+
759
+ - example:
760
+ label: MAPPING_LIST_PAIRED_OVER_PAIRED_OR_UNPAIRED
761
+ assumptions:
762
+ - datasets: [d_f, d_r]
763
+ - tool:
764
+ in: {i: "collection<paired_or_unpaired>"}
765
+ out: {o: dataset}
766
+ - collections:
767
+ C: ["list:paired", {el: {forward: d_f, reverse: d_r}}]
768
+ C_AS_MIXED: ["list:paired_or_unpaired", {el: {forward: d_f, reverse: d_r}}]
769
+ then:
770
+ type: equivalence
771
+ left:
772
+ inputs:
773
+ i: {type: map_over, collection: C}
774
+ right:
775
+ inputs:
776
+ i: {type: map_over, collection: C_AS_MIXED}
777
+ tests:
778
+ workflow_runtime:
779
+ framework_test: "collection_semantics_paired_or_unpaired_2"
780
+ workflow_editor: "accepts list:paired -> paired_or_unpaired connection"
781
+
782
+ - example:
783
+ label: PAIRED_OR_UNPAIRED_NOT_CONSUMED_BY_PAIRED_WHEN_MAPPING
784
+ assumptions:
785
+ - datasets: [d_f, d_r]
786
+ - tool:
787
+ in: {i: "collection<paired>"}
788
+ out: {o: dataset}
789
+ - collections:
790
+ C: ["list:paired_or_unpaired", {el: {forward: d_f, reverse: d_r}}]
791
+ then:
792
+ type: invalid
793
+ invocation:
794
+ inputs:
795
+ i: {type: map_over, collection: C}
796
+ is_valid: false
797
+ tests:
798
+ tool_runtime:
799
+ api_test: "test_tool_execute.py::test_paired_or_unpaired_not_consumed_by_paired_when_mapping"
800
+ workflow_editor: "rejects list:paired_or_unpaired -> paired connection"
801
+
802
+ - example:
803
+ label: PAIRED_OR_UNPAIRED_NOT_CONSUMED_BY_LIST_WHEN_MAPPING
804
+ assumptions:
805
+ - datasets: [d_f, d_r]
806
+ - tool:
807
+ in: {i: "collection<list>"}
808
+ out: {o: dataset}
809
+ - collections:
810
+ C: ["list:paired_or_unpaired", {el: {forward: d_f, reverse: d_r}}]
811
+ then:
812
+ type: invalid
813
+ invocation:
814
+ inputs:
815
+ i: {type: map_over, collection: C}
816
+ is_valid: false
817
+ tests:
818
+ workflow_editor: "rejects list:paired_or_unpaired -> list connection"
819
+
820
+ - doc: |
821
+ This logic extends naturally into higher dimensional collections. A ``list:list:paired``
822
+ can be mapped over either a ``paired_or_unpaired`` input to produce a nested list (``list:list``)
823
+ or a ``list:paired_or_unpaired`` input to produce a flat list (``list``).
824
+
825
+ - example:
826
+ label: MAPPING_LIST_LIST_PAIRED_OVER_PAIRED_OR_UNPAIRED
827
+ assumptions:
828
+ - datasets: [d_f, d_r]
829
+ - tool:
830
+ in: {i: "collection<paired_or_unpaired>"}
831
+ out: {o: dataset}
832
+ - collections:
833
+ C: ["list:list:paired", {o1: {el1: {forward: d_f, reverse: d_r}}}]
834
+ C_AS_MIXED: ["list:list:paired_or_unpaired", {o1: {el1: {forward: d_f, reverse: d_r}}}]
835
+ then:
836
+ type: equivalence
837
+ left:
838
+ inputs:
839
+ i: {type: map_over, collection: C}
840
+ right:
841
+ inputs:
842
+ i: {type: map_over, collection: C_AS_MIXED}
843
+ tests:
844
+ workflow_runtime:
845
+ framework_test: "collection_semantics_paired_or_unpaired_3"
846
+ workflow_editor: "accepts list:list:paired -> paired_or_unpaired connection"
847
+
848
+ - doc: |
849
+
850
+ In order for ``paired_or_unpaired`` collections to also act as a single dataset,
851
+ a flat list can be mapped over a such an input with a special sub collection mapping
852
+ type of 'single_datasets'.
853
+
854
+ - example:
855
+ label: MAPPING_LIST_OVER_PAIRED_OR_UNPAIRED
856
+ assumptions:
857
+ - datasets: ["d_1,...,d_n"]
858
+ - tool:
859
+ in: {i: "collection<paired_or_unpaired>"}
860
+ out: {o: dataset}
861
+ - collections:
862
+ C: [list, {i1: d_1, ..., in: d_n}]
863
+ - "C_AS_UNPAIRED_i = CollectionInstance<paired_or_unpaired,{unpaired=di}> for i from 1...n"
864
+ then:
865
+ type: map_over
866
+ invocation:
867
+ inputs:
868
+ i: {type: map_over, collection: C, sub_collection_type: single_datasets}
869
+ produces:
870
+ o:
871
+ type: collection
872
+ collection_type: list
873
+ elements:
874
+ i1:
875
+ type: tool_output_ref
876
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_1}}}
877
+ output: o
878
+ "...": {type: ellipsis}
879
+ in:
880
+ type: tool_output_ref
881
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_n}}}
882
+ output: o
883
+ tests:
884
+ tool_runtime:
885
+ api_test: "test_tool_execute.py::test_map_over_paired_or_unpaired_with_list"
886
+ workflow_runtime:
887
+ framework_test: "collection_semantics_paired_or_unpaired_7"
888
+ workflow_editor: "accepts list -> paired_or_unpaired connection"
889
+
890
+ - doc: |
891
+ This treatment of lists without pairing extends to nested structures naturally.
892
+ For instance, a list of list of datasets (``list:list``) can be mapped over a
893
+ ``paired_or_unpaired`` input to produce a nested list of lists (``list:list``)
894
+ with a structure matching the input. Likewise, the nested list can be mapped over
895
+ a ``list:paired_or_unpaired`` input to produce a flat list with the same structure
896
+ as the outer list of the input.
897
+
898
+ - example:
899
+ label: MAPPING_LIST_LIST_OVER_PAIRED_OR_UNPAIRED
900
+ assumptions:
901
+ - datasets: ["d_1,...,d_n"]
902
+ - tool:
903
+ in: {i: "collection<paired_or_unpaired>"}
904
+ out: {o: dataset}
905
+ - collections:
906
+ C: ["list:list", {o1: {inner: d_1}, ..., "on": {inner: d_n}}]
907
+ - "C_AS_UNPAIRED_j = CollectionInstance<paired_or_unpaired,{unpaired=dj}> for each dataset dj in C"
908
+ then:
909
+ type: map_over
910
+ invocation:
911
+ inputs:
912
+ i: {type: map_over, collection: C, sub_collection_type: single_datasets}
913
+ produces:
914
+ o:
915
+ type: collection
916
+ collection_type: "list:list"
917
+ elements:
918
+ o1:
919
+ type: nested_elements
920
+ elements:
921
+ inner:
922
+ type: tool_output_ref
923
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_1}}}
924
+ output: o
925
+ "...": {type: ellipsis}
926
+ "on":
927
+ type: nested_elements
928
+ elements:
929
+ inner:
930
+ type: tool_output_ref
931
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_n}}}
932
+ output: o
933
+ tests:
934
+ workflow_editor: "accepts list:list -> paired_or_unpaired connection"
935
+
936
+ - example:
937
+ label: MAPPING_LIST_LIST_OVER_LIST_PAIRED_OR_UNPAIRED
938
+ assumptions:
939
+ - datasets: ["d_1,...,d_n"]
940
+ - tool:
941
+ in: {i: "collection<list:paired_or_unpaired>"}
942
+ out: {o: dataset}
943
+ - collections:
944
+ C: ["list:list", {o1: {inner: d_1}, ..., "on": {inner: d_n}}]
945
+ - "C_AS_LPU_i = inner list of C at position i, treated as list:paired_or_unpaired via single_datasets"
946
+ then:
947
+ type: map_over
948
+ invocation:
949
+ inputs:
950
+ i: {type: map_over, collection: C, sub_collection_type: "list:paired_or_unpaired"}
951
+ produces:
952
+ o:
953
+ type: collection
954
+ collection_type: list
955
+ elements:
956
+ o1:
957
+ type: tool_output_ref
958
+ invocation: {inputs: {i: {type: collection, ref: C_AS_LPU_1}}}
959
+ output: o
960
+ "...": {type: ellipsis}
961
+ "on":
962
+ type: tool_output_ref
963
+ invocation: {inputs: {i: {type: collection, ref: C_AS_LPU_n}}}
964
+ output: o
965
+ tests:
966
+ tool_runtime:
967
+ api_test: "test_tool_execute.py::test_map_over_list_paired_or_unpaired_with_list_of_lists"
968
+ workflow_runtime:
969
+ framework_test: "collection_semantics_list_paired_or_unpaired_2"
970
+ workflow_editor: "accepts list:list -> list:paired_or_unpaired connection"
971
+
972
+ - doc: |
973
+ Due only to implementation time, the special casing of allowing paired_or_unpaired
974
+ act as both datasets and paired collections only works when it is the deepest
975
+ collection type. So while list:paired can be consumed by a list:paired_or_unpaired
976
+ input, a paired:list cannot be consumed by a paired_or_unpaired:list input though
977
+ it should be able to for consistency. We have focused our time on data structures
978
+ more likely to be used in actual Galaxy analyses given current and guessed future
979
+ usage.
980
+
981
+ - doc: "## sample_sheet Collections"
982
+ - doc: |
983
+ The collection type ``sample_sheet`` attaches typed, columnar metadata to each
984
+ element of a dataset collection. For mapping and type matching purposes,
985
+ ``sample_sheet`` behaves identically to ``list`` - it can be mapped over tool
986
+ inputs, matched against ``list`` collection inputs, and composed with inner types
987
+ (``sample_sheet:paired``, ``sample_sheet:paired_or_unpaired``). The key asymmetry
988
+ is that while a ``sample_sheet`` output can satisfy a ``list`` input, a ``list``
989
+ output cannot satisfy a ``sample_sheet`` input - sample sheets carry metadata
990
+ that plain lists do not.
991
+
992
+ - example:
993
+ label: SAMPLE_SHEET_MAPPING
994
+ assumptions:
995
+ - datasets: ["d_1,...,d_n"]
996
+ - tool:
997
+ in: {i: dataset}
998
+ out: {o: dataset}
999
+ - collections:
1000
+ C: [sample_sheet, {i1: "d_1", ..., in: "d_n"}]
1001
+ then:
1002
+ type: map_over
1003
+ invocation:
1004
+ inputs:
1005
+ i: {type: map_over, collection: C}
1006
+ produces:
1007
+ o:
1008
+ type: collection
1009
+ collection_type: sample_sheet
1010
+ elements:
1011
+ i1:
1012
+ type: tool_output_ref
1013
+ invocation: {inputs: {i: {type: dataset, ref: d_1}}}
1014
+ output: o
1015
+ "...": {type: ellipsis}
1016
+ in:
1017
+ type: tool_output_ref
1018
+ invocation: {inputs: {i: {type: dataset, ref: d_n}}}
1019
+ output: o
1020
+ tests:
1021
+ workflow_runtime:
1022
+ framework_test: "collection_semantics_cat_4"
1023
+ workflow_editor: "accepts sample_sheet data -> data connection (maps like list)"
1024
+
1025
+ - example:
1026
+ label: SAMPLE_SHEET_MATCHES_LIST
1027
+ assumptions:
1028
+ - datasets: ["d_1,...,d_n"]
1029
+ - tool:
1030
+ in: {i: "collection<list>"}
1031
+ out: {o: dataset}
1032
+ - collections:
1033
+ C: [sample_sheet, {i1: d_1, ..., in: d_n}]
1034
+ then:
1035
+ type: reduction
1036
+ invocation:
1037
+ inputs:
1038
+ i: {type: collection, ref: C}
1039
+ produces:
1040
+ o: {type: dataset}
1041
+ tests:
1042
+ workflow_runtime:
1043
+ framework_test: "collection_semantics_cat_collection_1"
1044
+ workflow_editor: "accepts sample_sheet -> list connection (canMatch)"
1045
+
1046
+ - doc: |
1047
+ Sub-collection mapping works the same as for ``list`` composites. A
1048
+ ``sample_sheet:paired`` can be mapped over a ``paired`` collection input,
1049
+ extracting each inner pair and producing a ``sample_sheet`` implicit output.
1050
+
1051
+ - example:
1052
+ label: SAMPLE_SHEET_PAIRED_MAPPING_OVER_PAIRED
1053
+ assumptions:
1054
+ - datasets: [d_f, d_r]
1055
+ - tool:
1056
+ in: {i: "collection<paired>"}
1057
+ out: {o: dataset}
1058
+ - collections:
1059
+ C: ["sample_sheet:paired", {el1: {forward: d_f, reverse: d_r}}]
1060
+ "C\\_PAIRED": [paired, {forward: d_f, reverse: d_r}]
1061
+ then:
1062
+ type: map_over
1063
+ invocation:
1064
+ inputs:
1065
+ i: {type: map_over, collection: C, sub_collection_type: paired}
1066
+ produces:
1067
+ o:
1068
+ type: collection
1069
+ collection_type: sample_sheet
1070
+ elements:
1071
+ el1:
1072
+ type: tool_output_ref
1073
+ invocation: {inputs: {i: {type: collection, ref: "C\\_PAIRED"}}}
1074
+ output: o
1075
+ tests:
1076
+ workflow_runtime:
1077
+ framework_test: "collection_semantics_paired_or_unpaired_5"
1078
+ workflow_editor: "accepts sample_sheet:paired -> paired connection (maps over like list:paired)"
1079
+
1080
+ - example:
1081
+ label: SAMPLE_SHEET_PAIRED_MATCHES_LIST_PAIRED
1082
+ assumptions:
1083
+ - datasets: [d_f, d_r]
1084
+ - tool:
1085
+ in: {i: "collection<list:paired>"}
1086
+ out: {o: dataset}
1087
+ - collections:
1088
+ C: ["sample_sheet:paired", {el1: {forward: d_f, reverse: d_r}}]
1089
+ then:
1090
+ type: reduction
1091
+ invocation:
1092
+ inputs:
1093
+ i: {type: collection, ref: C}
1094
+ produces:
1095
+ o: {type: dataset}
1096
+ tests:
1097
+ workflow_runtime:
1098
+ framework_test: "collection_semantics_list_paired_0"
1099
+ workflow_editor: "accepts sample_sheet:paired -> list:paired connection (canMatch)"
1100
+
1101
+ - doc: |
1102
+ The ``paired_or_unpaired`` integration rules carry over from ``list`` to
1103
+ ``sample_sheet``. A flat ``sample_sheet`` can be mapped over a
1104
+ ``paired_or_unpaired`` input via ``single_datasets`` sub-collection mapping,
1105
+ and ``sample_sheet:paired`` can be mapped over ``paired_or_unpaired`` just as
1106
+ ``list:paired`` can.
1107
+
1108
+ - example:
1109
+ label: SAMPLE_SHEET_MAPPING_OVER_PAIRED_OR_UNPAIRED
1110
+ assumptions:
1111
+ - datasets: ["d_1,...,d_n"]
1112
+ - tool:
1113
+ in: {i: "collection<paired_or_unpaired>"}
1114
+ out: {o: dataset}
1115
+ - collections:
1116
+ C: [sample_sheet, {i1: d_1, ..., in: d_n}]
1117
+ - "C_AS_UNPAIRED_i = CollectionInstance<paired_or_unpaired,{unpaired=di}> for i from 1...n"
1118
+ then:
1119
+ type: map_over
1120
+ invocation:
1121
+ inputs:
1122
+ i: {type: map_over, collection: C, sub_collection_type: single_datasets}
1123
+ produces:
1124
+ o:
1125
+ type: collection
1126
+ collection_type: sample_sheet
1127
+ elements:
1128
+ i1:
1129
+ type: tool_output_ref
1130
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_1}}}
1131
+ output: o
1132
+ "...": {type: ellipsis}
1133
+ in:
1134
+ type: tool_output_ref
1135
+ invocation: {inputs: {i: {type: collection, ref: C_AS_UNPAIRED_n}}}
1136
+ output: o
1137
+ tests:
1138
+ tool_runtime:
1139
+ api_test: "test_tool_execute.py::test_map_over_paired_or_unpaired_with_sample_sheet"
1140
+ workflow_runtime:
1141
+ framework_test: "collection_semantics_paired_or_unpaired_8"
1142
+ workflow_editor: "accepts sample_sheet -> paired_or_unpaired connection"
1143
+
1144
+ - example:
1145
+ label: SAMPLE_SHEET_PAIRED_MAPPING_OVER_PAIRED_OR_UNPAIRED
1146
+ assumptions:
1147
+ - datasets: [d_f, d_r]
1148
+ - tool:
1149
+ in: {i: "collection<paired_or_unpaired>"}
1150
+ out: {o: dataset}
1151
+ - collections:
1152
+ C: ["sample_sheet:paired", {el1: {forward: d_f, reverse: d_r}}]
1153
+ C_AS_MIXED: ["sample_sheet:paired_or_unpaired", {el1: {forward: d_f, reverse: d_r}}]
1154
+ then:
1155
+ type: equivalence
1156
+ left:
1157
+ inputs:
1158
+ i: {type: map_over, collection: C}
1159
+ right:
1160
+ inputs:
1161
+ i: {type: map_over, collection: C_AS_MIXED}
1162
+ tests:
1163
+ workflow_runtime:
1164
+ framework_test: "collection_semantics_paired_or_unpaired_6"
1165
+ workflow_editor: "accepts sample_sheet:paired -> paired_or_unpaired connection"
1166
+
1167
+ - example:
1168
+ label: SAMPLE_SHEET_PAIRED_OR_UNPAIRED_MATCHES_LIST_PAIRED_OR_UNPAIRED
1169
+ assumptions:
1170
+ - datasets: [d_f, d_r]
1171
+ - tool:
1172
+ in: {i: "collection<list:paired_or_unpaired>"}
1173
+ out: {o: dataset}
1174
+ - collections:
1175
+ C: ["sample_sheet:paired_or_unpaired", {el1: {forward: d_f, reverse: d_r}}]
1176
+ then:
1177
+ type: reduction
1178
+ invocation:
1179
+ inputs:
1180
+ i: {type: collection, ref: C}
1181
+ produces:
1182
+ o: {type: dataset}
1183
+ tests:
1184
+ workflow_runtime:
1185
+ framework_test: "collection_semantics_list_paired_or_unpaired_1"
1186
+ workflow_editor: "accepts sample_sheet:paired_or_unpaired -> list:paired_or_unpaired connection (canMatch)"
1187
+
1188
+ - doc: |
1189
+ The type matching is asymmetric: a ``sample_sheet`` output can satisfy a ``list``
1190
+ input because sample sheets carry all the structural information lists have (plus
1191
+ metadata). However, a ``list`` output cannot satisfy a ``sample_sheet`` input because
1192
+ lists lack the ``column_definitions`` and per-element ``columns`` metadata that
1193
+ sample sheet consumers expect.
1194
+
1195
+ - example:
1196
+ label: LIST_NOT_MATCHES_SAMPLE_SHEET
1197
+ assumptions:
1198
+ - datasets: ["d_1,...,d_n"]
1199
+ - tool:
1200
+ in: {i: "collection<sample_sheet>"}
1201
+ out: {o: dataset}
1202
+ - collections:
1203
+ C: [list, {i1: d_1, ..., in: d_n}]
1204
+ then:
1205
+ type: invalid
1206
+ invocation:
1207
+ inputs:
1208
+ i: {type: collection, ref: C}
1209
+ is_valid: false
1210
+ tests:
1211
+ workflow_editor: "rejects list -> sample_sheet connection (asymmetry)"
1212
+
1213
+ - example:
1214
+ label: LIST_PAIRED_NOT_MATCHES_SAMPLE_SHEET_PAIRED
1215
+ assumptions:
1216
+ - datasets: [d_f, d_r]
1217
+ - tool:
1218
+ in: {i: "collection<sample_sheet:paired>"}
1219
+ out: {o: dataset}
1220
+ - collections:
1221
+ C: ["list:paired", {el1: {forward: d_f, reverse: d_r}}]
1222
+ then:
1223
+ type: invalid
1224
+ invocation:
1225
+ inputs:
1226
+ i: {type: collection, ref: C}
1227
+ is_valid: false
1228
+ tests:
1229
+ workflow_editor: "rejects list:paired -> sample_sheet:paired connection (asymmetry)"
1230
+
1231
+ - example:
1232
+ label: SAMPLE_SHEET_MATCHES_SAMPLE_SHEET
1233
+ assumptions:
1234
+ - datasets: ["d_1,...,d_n"]
1235
+ - tool:
1236
+ in: {i: "collection<sample_sheet>"}
1237
+ out: {o: dataset}
1238
+ - collections:
1239
+ C: [sample_sheet, {i1: d_1, ..., in: d_n}]
1240
+ then:
1241
+ type: reduction
1242
+ invocation:
1243
+ inputs:
1244
+ i: {type: collection, ref: C}
1245
+ produces:
1246
+ o: {type: dataset}
1247
+ tests:
1248
+ workflow_runtime:
1249
+ framework_test: "collection_semantics_cat_sample_sheet_0"
1250
+ workflow_editor: "accepts sample_sheet -> sample_sheet connection"