@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.
- package/CHANGELOG.md +123 -0
- package/LICENSE +21 -0
- package/README.md +760 -5
- package/bin/legacy-mcp-config.js +363 -0
- package/bin/orbit.js +810 -0
- package/bin/pi-extension-path.d.ts +4 -0
- package/bin/pi-extension-path.js +44 -0
- package/bin/provider-auth.d.ts +22 -0
- package/bin/provider-auth.js +77 -0
- package/bin/thinking-pref.js +38 -0
- package/bin/update-check.d.ts +15 -0
- package/bin/update-check.js +137 -0
- package/extensions/cli-update/index.ts +32 -0
- package/extensions/orbit/activity-hooks.ts +141 -0
- package/extensions/orbit/activity.ts +116 -0
- package/extensions/orbit/agent-dir.ts +11 -0
- package/extensions/orbit/auto-resume.ts +352 -0
- package/extensions/orbit/config.ts +3 -0
- package/extensions/orbit/confusables.ts +1 -0
- package/extensions/orbit/context.ts +957 -0
- package/extensions/orbit/dashboard-commands.ts +191 -0
- package/extensions/orbit/dashboard-store.ts +473 -0
- package/extensions/orbit/dashboard-tools.ts +1185 -0
- package/extensions/orbit/empty-completion.ts +99 -0
- package/extensions/orbit/evidence-gate.ts +1276 -0
- package/extensions/orbit/evidence-override-command.ts +294 -0
- package/extensions/orbit/exec-guard/bash-risk.ts +1408 -0
- package/extensions/orbit/exec-guard/gate.ts +181 -0
- package/extensions/orbit/exec-guard/guardian-config.ts +54 -0
- package/extensions/orbit/exec-guard/index.ts +1 -0
- package/extensions/orbit/exec-guard/model-tier.ts +36 -0
- package/extensions/orbit/exec-guard/path-jail.ts +54 -0
- package/extensions/orbit/exec-guard/policy.ts +342 -0
- package/extensions/orbit/exec-guard/runtime-state.ts +15 -0
- package/extensions/orbit/exec-guard/sensitive-read.ts +525 -0
- package/extensions/orbit/exec-guard/types.ts +42 -0
- package/extensions/orbit/execution-commands.ts +134 -0
- package/extensions/orbit/feedback-command.ts +81 -0
- package/extensions/orbit/feedback.ts +96 -0
- package/extensions/orbit/galaxy-api.test.ts +122 -0
- package/extensions/orbit/galaxy-api.ts +606 -0
- package/extensions/orbit/galaxy-artifact-link-guidance.ts +5 -0
- package/extensions/orbit/galaxy-destructive-gate.ts +113 -0
- package/extensions/orbit/galaxy-enrich.ts +1108 -0
- package/extensions/orbit/galaxy-failure.ts +101 -0
- package/extensions/orbit/galaxy-fixture.ts +126 -0
- package/extensions/orbit/galaxy-history-guard.ts +233 -0
- package/extensions/orbit/galaxy-job-block.ts +347 -0
- package/extensions/orbit/galaxy-job-ops.ts +288 -0
- package/extensions/orbit/galaxy-live-source.ts +929 -0
- package/extensions/orbit/galaxy-markdown-adapter.ts +248 -0
- package/extensions/orbit/galaxy-op-policy.ts +332 -0
- package/extensions/orbit/galaxy-ops-tools.ts +326 -0
- package/extensions/orbit/galaxy-output-store.ts +80 -0
- package/extensions/orbit/galaxy-output.ts +346 -0
- package/extensions/orbit/galaxy-page-binding.ts +222 -0
- package/extensions/orbit/galaxy-page-markdown-guidance.ts +15 -0
- package/extensions/orbit/galaxy-page-ops.ts +159 -0
- package/extensions/orbit/galaxy-page-sync.test.ts +417 -0
- package/extensions/orbit/galaxy-page-sync.ts +318 -0
- package/extensions/orbit/galaxy-pages-api.ts +203 -0
- package/extensions/orbit/galaxy-pages-sync.ts +409 -0
- package/extensions/orbit/galaxy-poll-guard.ts +189 -0
- package/extensions/orbit/galaxy-poller.ts +706 -0
- package/extensions/orbit/galaxy-provenance.ts +623 -0
- package/extensions/orbit/galaxy-reconcile.ts +956 -0
- package/extensions/orbit/galaxy-recovery.ts +176 -0
- package/extensions/orbit/galaxy-repeat-guard.ts +55 -0
- package/extensions/orbit/galaxy-submission-capture.ts +707 -0
- package/extensions/orbit/galaxy-submission.ts +502 -0
- package/extensions/orbit/galaxy-tool-source.ts +78 -0
- package/extensions/orbit/galaxy-tool-wrap.ts +234 -0
- package/extensions/orbit/galaxy-udt-block.ts +127 -0
- package/extensions/orbit/galaxy-upload-tus.ts +334 -0
- package/extensions/orbit/galaxy-upload.ts +300 -0
- package/extensions/orbit/galaxy-version-capture.ts +65 -0
- package/extensions/orbit/git.ts +173 -0
- package/extensions/orbit/harness-block-fields.ts +597 -0
- package/extensions/orbit/index.ts +593 -0
- package/extensions/orbit/init-gate.ts +284 -0
- package/extensions/orbit/instructions-command.ts +136 -0
- package/extensions/orbit/invocation-failure-hint.ts +57 -0
- package/extensions/orbit/iwc-plan-check.ts +94 -0
- package/extensions/orbit/lesson-command.ts +303 -0
- package/extensions/orbit/lesson-hint.ts +245 -0
- package/extensions/orbit/lesson-nudge.ts +106 -0
- package/extensions/orbit/lessons/compose.ts +177 -0
- package/extensions/orbit/lessons/counters.ts +120 -0
- package/extensions/orbit/lessons/enabled.ts +116 -0
- package/extensions/orbit/lessons/matcher.ts +346 -0
- package/extensions/orbit/lessons/paths.ts +286 -0
- package/extensions/orbit/lessons/pi-event-contract.ts +105 -0
- package/extensions/orbit/lessons/propose-replay.ts +103 -0
- package/extensions/orbit/lessons/propose-tool.ts +222 -0
- package/extensions/orbit/lessons/propose.ts +502 -0
- package/extensions/orbit/lessons/replay.ts +89 -0
- package/extensions/orbit/lessons/reproduction-index.ts +83 -0
- package/extensions/orbit/lessons/search-tool.ts +99 -0
- package/extensions/orbit/lessons/search.ts +136 -0
- package/extensions/orbit/lessons/store.ts +415 -0
- package/extensions/orbit/lessons/text.ts +36 -0
- package/extensions/orbit/lessons/types.ts +69 -0
- package/extensions/orbit/lessons/user-dir.ts +24 -0
- package/extensions/orbit/lessons/user-lesson.ts +88 -0
- package/extensions/orbit/lessons/wrapper.ts +61 -0
- package/extensions/orbit/lessons-command.ts +147 -0
- package/extensions/orbit/local-exec.ts +39 -0
- package/extensions/orbit/mcp-output.ts +179 -0
- package/extensions/orbit/mcp-servers.test.ts +24 -0
- package/extensions/orbit/mcp-servers.ts +25 -0
- package/extensions/orbit/model-script.ts +351 -0
- package/extensions/orbit/notebook-anchors.ts +342 -0
- package/extensions/orbit/notebook-writer.ts +863 -0
- package/extensions/orbit/observation-allowlists.ts +1109 -0
- package/extensions/orbit/observation-replay.ts +148 -0
- package/extensions/orbit/observation-triggers.ts +563 -0
- package/extensions/orbit/observation-ui.ts +175 -0
- package/extensions/orbit/observations-command.ts +421 -0
- package/extensions/orbit/observations-config.ts +200 -0
- package/extensions/orbit/observations.ts +1381 -0
- package/extensions/orbit/profiles.ts +270 -0
- package/extensions/orbit/progress-updates.ts +95 -0
- package/extensions/orbit/proposal-commands.ts +882 -0
- package/extensions/orbit/provenance-fs-file.ts +59 -0
- package/extensions/orbit/provenance-fs.ts +32 -0
- package/extensions/orbit/provenance-memory-fs.ts +59 -0
- package/extensions/orbit/record-store-file.ts +177 -0
- package/extensions/orbit/record-store-page.ts +77 -0
- package/extensions/orbit/record-store-seam.ts +47 -0
- package/extensions/orbit/record-store.ts +149 -0
- package/extensions/orbit/registry-carrier.ts +107 -0
- package/extensions/orbit/registry-eligibility.ts +95 -0
- package/extensions/orbit/registry-evaluation.ts +403 -0
- package/extensions/orbit/registry-evaluator.ts +519 -0
- package/extensions/orbit/registry-import.ts +91 -0
- package/extensions/orbit/registry-lock.ts +221 -0
- package/extensions/orbit/registry-memory-fs.ts +42 -0
- package/extensions/orbit/registry-page-carrier.ts +103 -0
- package/extensions/orbit/registry-proposal.ts +1348 -0
- package/extensions/orbit/registry-runtime.ts +234 -0
- package/extensions/orbit/registry-schema.ts +735 -0
- package/extensions/orbit/registry-submitter.ts +59 -0
- package/extensions/orbit/registry-templates.ts +346 -0
- package/extensions/orbit/registry.ts +476 -0
- package/extensions/orbit/sandbox/index.ts +120 -0
- package/extensions/orbit/sandbox/sandbox-bash.ts +93 -0
- package/extensions/orbit/sandbox/sandbox-config.ts +87 -0
- package/extensions/orbit/sandbox/sandbox-init-message.ts +28 -0
- package/extensions/orbit/secret-redaction.ts +247 -0
- package/extensions/orbit/session-index/cwd.ts +18 -0
- package/extensions/orbit/session-index/db.ts +56 -0
- package/extensions/orbit/session-index/indexer.ts +154 -0
- package/extensions/orbit/session-index/is-enabled.ts +17 -0
- package/extensions/orbit/session-index/parse.ts +254 -0
- package/extensions/orbit/session-index/query.ts +209 -0
- package/extensions/orbit/session-index/schema.ts +72 -0
- package/extensions/orbit/session-index/tools.ts +152 -0
- package/extensions/orbit/session-lifecycle.ts +321 -0
- package/extensions/orbit/skill-triggers.ts +159 -0
- package/extensions/orbit/skills-command.ts +48 -0
- package/extensions/orbit/skills-discovery.ts +435 -0
- package/extensions/orbit/skills.ts +84 -0
- package/extensions/orbit/sra-import-gate.ts +77 -0
- package/extensions/orbit/state.ts +265 -0
- package/extensions/orbit/submission-replay.ts +147 -0
- package/extensions/orbit/sync-command.ts +157 -0
- package/extensions/orbit/teams/critic-parser.ts +93 -0
- package/extensions/orbit/teams/dispatcher.ts +210 -0
- package/extensions/orbit/teams/is-enabled.ts +22 -0
- package/extensions/orbit/teams/tool.ts +187 -0
- package/extensions/orbit/teams/types.ts +57 -0
- package/extensions/orbit/teams/validate.ts +42 -0
- package/extensions/orbit/tester-id-command.ts +133 -0
- package/extensions/orbit/tools-sync.ts +279 -0
- package/extensions/orbit/tools.ts +1300 -0
- package/extensions/orbit/types.ts +41 -0
- package/extensions/orbit/ui-bridge.ts +55 -0
- package/extensions/orbit/ulid.ts +60 -0
- package/extensions/orbit/user-instructions.ts +388 -0
- package/extensions/orbit/vendor/skills/_catalog.json +68 -0
- package/extensions/orbit/vendor/skills/_manifest.json +1106 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/SKILL.md +112 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_provenance.json +218 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_required_tools.json +33 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/add.json +50 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-extract.json +51 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-next-step.json +42 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/draft-validate.json +140 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/cli/list.json +32 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/galaxy-tool-job-failure-reference.md +137 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-tool-summary.schema.json +175 -0
- package/extensions/orbit/vendor/skills/advance-galaxy-draft-step/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/SKILL.md +82 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_provenance.json +133 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/cli/draft-validate.json +140 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/galaxy-workflow-draft-format.md +135 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/apply-galaxy-workflow-changeset/references/schemas/galaxy-workflow-draft.schema.json +2727 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/SKILL.md +84 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_provenance.json +166 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/_verify.json +29 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/changeset-to-galaxy-test-plan/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/SKILL.md +127 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_provenance.json +198 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/cli/convert.json +123 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/galaxy-data-flow-draft-contract.md +129 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/compare-against-iwc-exemplar/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/SKILL.md +73 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_provenance.json +160 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.md +43 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-collection-semantics.yml +1250 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-tool-job-failure-reference.md +137 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/nextflow-operators-to-galaxy-collection-recipes.md +98 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/debug-galaxy-workflow-output/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/SKILL.md +174 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_provenance.json +130 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_required_tools.json +18 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-revisions.json +48 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-search.json +95 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/cli/tool-versions.json +39 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/notes/component-tool-shed-search.md +230 -0
- package/extensions/orbit/vendor/skills/discover-shed-tool/references/schemas/galaxy-tool-discovery.schema.json +231 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/SKILL.md +93 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_provenance.json +201 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/planemo.md +44 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/cli/validate-tests.json +40 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-shortcuts-anti-patterns.md +357 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/iwc-test-data-conventions.md +308 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/galaxy-workflow-test-plan.schema.json +552 -0
- package/extensions/orbit/vendor/skills/implement-galaxy-workflow-test/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/SKILL.md +81 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_provenance.json +93 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/notes/open-requirements-ledger.md +173 -0
- package/extensions/orbit/vendor/skills/interview-to-galaxy-workflow-changeset/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/SKILL.md +81 -0
- package/extensions/orbit/vendor/skills/pipeline-update-interview-to-galaxy/_assembly.json +23 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/SKILL.md +79 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_provenance.json +125 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/planemo.md +44 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/cli/validate-tests.json +40 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-asserts-idioms.md +246 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/notes/planemo-workflow-test-architecture.md +151 -0
- package/extensions/orbit/vendor/skills/run-workflow-test/references/schemas/tests-format.schema.json +7328 -0
- package/extensions/orbit/vendor/skills/skills/LICENSE +21 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/README.md +39 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/SKILL.md +892 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/api-patterns.md +927 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/apply-rules.md +1482 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/test-patterns.md +996 -0
- package/extensions/orbit/vendor/skills/skills/collection-manipulation/references/tools.md +609 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-data-libraries/SKILL.md +170 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/README.md +162 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/SKILL.md +99 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/README.md +119 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/tool-checking.md +419 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/examples/workflow-testing.md +617 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/galaxy-integration.md +614 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/SKILL.md +144 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/average_col3.ipynb +68 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/extract_sample_metadata.ipynb +190 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/variant_annotation.ipynb +816 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/jupyterlite/examples/vcp_variant_map.ipynb +443 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/README.md +165 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-integration/scripts/galaxy_tool_checker.py +521 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/SKILL.md +128 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/gotchas.md +135 -0
- package/extensions/orbit/vendor/skills/skills/galaxy-mcp-reference/history-access.md +132 -0
- package/extensions/orbit/vendor/skills/skills/reproduciblify/SKILL.md +146 -0
- package/extensions/orbit/vendor/skills/skills/reproduciblify/references/directives.yml +496 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/SKILL.md +245 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/01-minimal-echo.yml +27 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/02-single-data-in-out.yml +27 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/03-multiple-data-js.yml +28 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/04-select-integer-boolean.yml +41 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/05-resource-requirements.yml +25 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/06-biocontainer-tool.yml +38 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/07-inline-python-script.yml +56 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/examples/08-configfile-script.yml +74 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/common-mistakes.md +76 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/schema-reference.md +155 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/references/templating.md +196 -0
- package/extensions/orbit/vendor/skills/skills/udt-authoring/scripts/validate.py +109 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/README.md +71 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/SKILL.md +190 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/histology-staining.md +145 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/examples/tissue-microarray-analysis.md +176 -0
- package/extensions/orbit/vendor/skills/skills/workflow-reports/references/directives.md +415 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/SKILL.md +98 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_provenance.json +93 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_required_tools.json +28 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/_verify.json +17 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/convert.json +123 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/foundry.md +25 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/cli/validate.json +142 -0
- package/extensions/orbit/vendor/skills/summarize-galaxy-workflow/references/schemas/summary-galaxy-workflow.schema.json +687 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/SKILL.md +74 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_provenance.json +71 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_required_tools.json +16 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/_verify.json +4 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/cli/validate.json +142 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-invocation-failure-reference.md +138 -0
- package/extensions/orbit/vendor/skills/validate-galaxy-workflow/references/notes/galaxy-workflow-testability-design.md +136 -0
- package/extensions/orbit/vendor-skills.ts +283 -0
- package/extensions/orbit/workspace-state-dir.ts +46 -0
- package/extensions/orbit-handoff/index.ts +73 -0
- package/extensions/orbit-handoff/orbit-launcher.ts +142 -0
- package/extensions/whats-new/index.ts +98 -0
- package/lessons/LICENSE +17 -0
- package/lessons/README.md +117 -0
- package/lessons/SCHEMA.md +187 -0
- package/lessons/build-snapshot.mjs +311 -0
- package/lessons/data/downloaded-file-is-not-what-its-extension-says.md +61 -0
- package/lessons/galaxy-api/403-history-is-a-hard-stop.md +57 -0
- package/lessons/galaxy-api/collection-into-single-dataset-input.md +61 -0
- package/lessons/galaxy-api/connectedvalue-in-command-line.md +62 -0
- package/lessons/galaxy-api/hid-is-not-an-id.md +59 -0
- package/lessons/galaxy-api/invoke-workflow-inputs-not-params.md +60 -0
- package/lessons/galaxy-api/repeat-param-pipe-keys.md +63 -0
- package/lessons/galaxy-api/run-tool-returns-on-submit.md +61 -0
- package/lessons/galaxy-tools/reference-index-not-on-server.md +62 -0
- package/lessons/log.md +42 -0
- package/lessons/reproduction/input-population-mismatch.md +59 -0
- package/lessons/reproduction/methods-text-vs-executed-parameters.md +62 -0
- package/lessons/snapshot.json +1004 -0
- package/lessons/stats/de-contrast-direction-and-sample-labels.md +63 -0
- package/lessons/stats/na-coerced-to-zero-in-filters.md +59 -0
- package/lessons/validate.mjs +1219 -0
- package/package.json +103 -5
- package/shared/agent-prompt.d.ts +8 -0
- package/shared/agent-prompt.js +15 -0
- package/shared/approval-prompt.d.ts +4 -0
- package/shared/approval-prompt.js +61 -0
- package/shared/brain-env.d.ts +14 -0
- package/shared/brain-env.js +108 -0
- package/shared/brain-exit.d.ts +20 -0
- package/shared/brain-exit.js +149 -0
- package/shared/capability-profile.d.ts +16 -0
- package/shared/capability-profile.js +75 -0
- package/shared/config-source.d.ts +13 -0
- package/shared/config-source.js +17 -0
- package/shared/confusables.d.ts +3 -0
- package/shared/confusables.js +93 -0
- package/shared/custom-provider.d.ts +45 -0
- package/shared/custom-provider.js +169 -0
- package/shared/dashboard-contract.d.ts +123 -0
- package/shared/dashboard-contract.js +560 -0
- package/shared/dashboard-layout-store.d.ts +44 -0
- package/shared/dashboard-layout-store.js +281 -0
- package/shared/feedback-contract.d.ts +61 -0
- package/shared/feedback-contract.js +146 -0
- package/shared/galaxy-artifact-links.d.ts +30 -0
- package/shared/galaxy-artifact-links.js +166 -0
- package/shared/galaxy-credentials.d.ts +26 -0
- package/shared/galaxy-credentials.js +71 -0
- package/shared/galaxy-destructive.d.ts +21 -0
- package/shared/galaxy-destructive.js +269 -0
- package/shared/galaxy-guidance.d.ts +2 -0
- package/shared/galaxy-guidance.js +53 -0
- package/shared/galaxy-live-contract.d.ts +92 -0
- package/shared/galaxy-live-contract.js +180 -0
- package/shared/galaxy-page-cells.d.ts +2 -0
- package/shared/galaxy-page-cells.js +22 -0
- package/shared/galaxy-tool-family.d.ts +5 -0
- package/shared/galaxy-tool-family.js +27 -0
- package/shared/galaxy-url.d.ts +1 -0
- package/shared/galaxy-url.js +48 -0
- package/shared/gtn.d.ts +31 -0
- package/shared/gtn.js +253 -0
- package/shared/handled-prompt.d.ts +3 -0
- package/shared/handled-prompt.js +26 -0
- package/shared/known-provider.d.ts +11 -0
- package/shared/known-provider.js +89 -0
- package/shared/lesson-hint-marker.d.ts +7 -0
- package/shared/lesson-hint-marker.js +32 -0
- package/shared/lesson-rules.d.ts +150 -0
- package/shared/lesson-rules.js +203 -0
- package/shared/malformed-object-ids.d.ts +1 -0
- package/shared/malformed-object-ids.js +37 -0
- package/shared/markdown-sections.d.ts +10 -0
- package/shared/markdown-sections.js +118 -0
- package/shared/notebook-fences.d.ts +12 -0
- package/shared/notebook-fences.js +53 -0
- package/shared/observation-contract.d.ts +91 -0
- package/shared/observation-contract.js +544 -0
- package/shared/orbit-config.d.ts +226 -0
- package/shared/orbit-config.js +189 -0
- package/shared/orbit-env.d.ts +13 -0
- package/shared/orbit-env.js +124 -0
- package/shared/orbit-shell-contract.d.ts +74 -0
- package/shared/orbit-shell-contract.js +30 -0
- package/shared/page-content-hash.d.ts +1 -0
- package/shared/page-content-hash.js +13 -0
- package/shared/pi-default-model.d.ts +7 -0
- package/shared/pi-default-model.js +41 -0
- package/shared/prompt-blocks.d.ts +87 -0
- package/shared/prompt-blocks.js +898 -0
- package/shared/provider-auth-caps.d.ts +22 -0
- package/shared/provider-auth-caps.js +57 -0
- package/shared/random.d.ts +2 -0
- package/shared/random.js +15 -0
- package/shared/record-excerpt.d.ts +4 -0
- package/shared/record-excerpt.js +16 -0
- package/shared/redirect-guard.d.ts +36 -0
- package/shared/redirect-guard.js +235 -0
- package/shared/skills-pin.d.ts +8 -0
- package/shared/skills-pin.js +9 -0
- package/shared/skills-router.d.ts +17 -0
- package/shared/skills-router.js +63 -0
- package/shared/sra-import.d.ts +34 -0
- package/shared/sra-import.js +206 -0
- package/shared/state-dir.d.ts +21 -0
- package/shared/state-dir.js +240 -0
- package/shared/team-dispatch-contract.d.ts +28 -0
- package/shared/team-dispatch-contract.js +1 -0
- package/shared/truncate-middle.d.ts +11 -0
- package/shared/truncate-middle.js +68 -0
- package/shared/version-compare.d.ts +10 -0
- package/shared/version-compare.js +74 -0
- package/shared/whats-new.d.ts +31 -0
- package/shared/whats-new.js +83 -0
- package/shared/wsl.d.ts +10 -0
- package/shared/wsl.js +24 -0
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"id": "cell-0",
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"source": [
|
|
8
|
+
"# V/C/P Gene Variant Geographic Map\n",
|
|
9
|
+
"\n",
|
|
10
|
+
"This notebook visualizes the mean allele frequencies of V/C/P gene variants across geographic locations.\n",
|
|
11
|
+
"\n",
|
|
12
|
+
"**V/C/P Gene**: The measles P gene encodes three proteins via overlapping reading frames:\n",
|
|
13
|
+
"- **Phosphoprotein (P)**: Essential for viral RNA synthesis\n",
|
|
14
|
+
"- **V protein**: Interferon antagonist\n",
|
|
15
|
+
"- **C protein**: Interferes with host innate immunity\n",
|
|
16
|
+
"\n",
|
|
17
|
+
"We create three maps:\n",
|
|
18
|
+
"1. US states\n",
|
|
19
|
+
"2. Canadian provinces\n",
|
|
20
|
+
"3. Romania (Bucharest)"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"cell_type": "code",
|
|
25
|
+
"execution_count": null,
|
|
26
|
+
"id": "cell-1",
|
|
27
|
+
"metadata": {},
|
|
28
|
+
"outputs": [],
|
|
29
|
+
"source": [
|
|
30
|
+
"import gxy\n",
|
|
31
|
+
"import pandas as pd\n",
|
|
32
|
+
"import altair as alt\n",
|
|
33
|
+
"from vega_datasets import data as vega_data\n",
|
|
34
|
+
"\n",
|
|
35
|
+
"# Suppress warnings\n",
|
|
36
|
+
"import warnings\n",
|
|
37
|
+
"warnings.filterwarnings('ignore', message='.*narwhals.*')\n",
|
|
38
|
+
"warnings.filterwarnings('ignore')\n",
|
|
39
|
+
"\n",
|
|
40
|
+
"print(\"Libraries loaded\")"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"cell_type": "code",
|
|
45
|
+
"execution_count": null,
|
|
46
|
+
"id": "cell-2",
|
|
47
|
+
"metadata": {},
|
|
48
|
+
"outputs": [],
|
|
49
|
+
"source": [
|
|
50
|
+
"# Dataset IDs - change these to match your history\n",
|
|
51
|
+
"VARIANTS_PER_SAMPLE = 13433 # Per-sample variants with AF\n",
|
|
52
|
+
"METADATA_CLEAN = 13681 # Sample metadata (sample_id, location, date)\n",
|
|
53
|
+
"ANNOTATED_VARIANTS = 13682 # Aggregated variants with gene annotation"
|
|
54
|
+
]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"cell_type": "code",
|
|
58
|
+
"execution_count": null,
|
|
59
|
+
"id": "cell-3",
|
|
60
|
+
"metadata": {},
|
|
61
|
+
"outputs": [],
|
|
62
|
+
"source": [
|
|
63
|
+
"# Download all datasets\n",
|
|
64
|
+
"paths = await gxy.get([VARIANTS_PER_SAMPLE, METADATA_CLEAN, ANNOTATED_VARIANTS])\n",
|
|
65
|
+
"print(f\"Downloaded {len(paths)} files\")\n",
|
|
66
|
+
"for p in paths:\n",
|
|
67
|
+
" print(f\" {p}\")"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"cell_type": "code",
|
|
72
|
+
"execution_count": null,
|
|
73
|
+
"id": "cell-4",
|
|
74
|
+
"metadata": {},
|
|
75
|
+
"outputs": [],
|
|
76
|
+
"source": [
|
|
77
|
+
"# Load per-sample variants (no header)\n",
|
|
78
|
+
"per_sample_cols = ['Sample', 'CHROM', 'POS', 'REF', 'ALT', 'QUAL', 'DP', 'AF', 'DP4', 'POSREFALT']\n",
|
|
79
|
+
"per_sample = pd.read_csv(paths[0], sep='\\t', names=per_sample_cols, skiprows=1)\n",
|
|
80
|
+
"print(f\"Per-sample variants: {len(per_sample)} rows\")\n",
|
|
81
|
+
"\n",
|
|
82
|
+
"# Load metadata (has header)\n",
|
|
83
|
+
"metadata = pd.read_csv(paths[1], sep='\\t')\n",
|
|
84
|
+
"print(f\"Sample metadata: {len(metadata)} samples\")\n",
|
|
85
|
+
"\n",
|
|
86
|
+
"# Load annotated variants (has header)\n",
|
|
87
|
+
"annotated = pd.read_csv(paths[2], sep='\\t')\n",
|
|
88
|
+
"print(f\"Annotated variants: {len(annotated)} variants\")"
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"cell_type": "code",
|
|
93
|
+
"execution_count": null,
|
|
94
|
+
"id": "cell-5",
|
|
95
|
+
"metadata": {},
|
|
96
|
+
"outputs": [],
|
|
97
|
+
"source": [
|
|
98
|
+
"# Filter to V/C/P gene variants only\n",
|
|
99
|
+
"vcp_variants = annotated[annotated['gene'] == 'P/V/C'].copy()\n",
|
|
100
|
+
"print(f\"V/C/P gene variants: {len(vcp_variants)}\")\n",
|
|
101
|
+
"print(f\"\\nBy product:\")\n",
|
|
102
|
+
"print(vcp_variants['product'].value_counts().to_string())"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
"cell_type": "code",
|
|
107
|
+
"execution_count": null,
|
|
108
|
+
"id": "cell-6",
|
|
109
|
+
"metadata": {},
|
|
110
|
+
"outputs": [],
|
|
111
|
+
"source": [
|
|
112
|
+
"# Get list of V/C/P variant IDs\n",
|
|
113
|
+
"vcp_var_ids = set(vcp_variants['var_id'].tolist())\n",
|
|
114
|
+
"print(f\"V/C/P variant IDs: {len(vcp_var_ids)}\")\n",
|
|
115
|
+
"\n",
|
|
116
|
+
"# Filter per-sample variants to only V/C/P\n",
|
|
117
|
+
"per_sample_vcp = per_sample[per_sample['POSREFALT'].isin(vcp_var_ids)].copy()\n",
|
|
118
|
+
"print(f\"Per-sample V/C/P variants: {len(per_sample_vcp)} rows\")"
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"cell_type": "code",
|
|
123
|
+
"execution_count": null,
|
|
124
|
+
"id": "cell-7",
|
|
125
|
+
"metadata": {},
|
|
126
|
+
"outputs": [],
|
|
127
|
+
"source": [
|
|
128
|
+
"# Join with metadata to get location\n",
|
|
129
|
+
"merged = per_sample_vcp.merge(\n",
|
|
130
|
+
" metadata,\n",
|
|
131
|
+
" left_on='Sample',\n",
|
|
132
|
+
" right_on='sample_id',\n",
|
|
133
|
+
" how='inner'\n",
|
|
134
|
+
")\n",
|
|
135
|
+
"print(f\"Merged rows: {len(merged)}\")\n",
|
|
136
|
+
"print(f\"Unique samples: {merged['Sample'].nunique()}\")\n",
|
|
137
|
+
"print(f\"Unique locations: {merged['location'].nunique()}\")"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
"cell_type": "code",
|
|
142
|
+
"execution_count": null,
|
|
143
|
+
"id": "cell-8",
|
|
144
|
+
"metadata": {},
|
|
145
|
+
"outputs": [],
|
|
146
|
+
"source": [
|
|
147
|
+
"# Aggregate by location - calculate mean AF\n",
|
|
148
|
+
"location_stats = merged.groupby('location').agg(\n",
|
|
149
|
+
" mean_af=('AF', 'mean'),\n",
|
|
150
|
+
" sample_count=('Sample', 'nunique'),\n",
|
|
151
|
+
" variant_count=('POSREFALT', 'count')\n",
|
|
152
|
+
").reset_index()\n",
|
|
153
|
+
"\n",
|
|
154
|
+
"print(\"=== Mean AF by Location ===\")\n",
|
|
155
|
+
"print(location_stats.sort_values('mean_af', ascending=False).to_string(index=False))"
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"cell_type": "code",
|
|
160
|
+
"execution_count": null,
|
|
161
|
+
"id": "cell-9",
|
|
162
|
+
"metadata": {},
|
|
163
|
+
"outputs": [],
|
|
164
|
+
"source": [
|
|
165
|
+
"# Parse location into country and state/province\n",
|
|
166
|
+
"def parse_location(loc):\n",
|
|
167
|
+
" if ':' in loc:\n",
|
|
168
|
+
" parts = loc.split(':', 1)\n",
|
|
169
|
+
" return parts[0], parts[1]\n",
|
|
170
|
+
" return loc, loc\n",
|
|
171
|
+
"\n",
|
|
172
|
+
"location_stats[['country', 'region']] = location_stats['location'].apply(\n",
|
|
173
|
+
" lambda x: pd.Series(parse_location(x))\n",
|
|
174
|
+
")\n",
|
|
175
|
+
"\n",
|
|
176
|
+
"# Separate by country\n",
|
|
177
|
+
"us_data = location_stats[location_stats['country'] == 'USA'].copy()\n",
|
|
178
|
+
"canada_data = location_stats[location_stats['country'] == 'Canada'].copy()\n",
|
|
179
|
+
"romania_data = location_stats[location_stats['country'].str.contains('Romania', na=False)].copy()\n",
|
|
180
|
+
"\n",
|
|
181
|
+
"print(f\"US locations: {len(us_data)}\")\n",
|
|
182
|
+
"print(f\"Canada locations: {len(canada_data)}\")\n",
|
|
183
|
+
"print(f\"Romania locations: {len(romania_data)}\")"
|
|
184
|
+
]
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"cell_type": "code",
|
|
188
|
+
"execution_count": null,
|
|
189
|
+
"id": "cell-10",
|
|
190
|
+
"metadata": {},
|
|
191
|
+
"outputs": [],
|
|
192
|
+
"source": [
|
|
193
|
+
"# === US State Map ===\n",
|
|
194
|
+
"\n",
|
|
195
|
+
"# Load US states topojson\n",
|
|
196
|
+
"states = alt.topo_feature(vega_data.us_10m.url, 'states')\n",
|
|
197
|
+
"\n",
|
|
198
|
+
"# State name to ID mapping (FIPS codes)\n",
|
|
199
|
+
"state_ids = {\n",
|
|
200
|
+
" 'Alabama': 1, 'Alaska': 2, 'Arizona': 4, 'Arkansas': 5, 'California': 6,\n",
|
|
201
|
+
" 'Colorado': 8, 'Connecticut': 9, 'Delaware': 10, 'Florida': 12, 'Georgia': 13,\n",
|
|
202
|
+
" 'Hawaii': 15, 'Idaho': 16, 'Illinois': 17, 'Indiana': 18, 'Iowa': 19,\n",
|
|
203
|
+
" 'Kansas': 20, 'Kentucky': 21, 'Louisiana': 22, 'Maine': 23, 'Maryland': 24,\n",
|
|
204
|
+
" 'Massachusetts': 25, 'Michigan': 26, 'Minnesota': 27, 'Mississippi': 28,\n",
|
|
205
|
+
" 'Missouri': 29, 'Montana': 30, 'Nebraska': 31, 'Nevada': 32, 'New Hampshire': 33,\n",
|
|
206
|
+
" 'New Jersey': 34, 'New Mexico': 35, 'New York': 36, 'North Carolina': 37,\n",
|
|
207
|
+
" 'North Dakota': 38, 'Ohio': 39, 'Oklahoma': 40, 'Oregon': 41, 'Pennsylvania': 42,\n",
|
|
208
|
+
" 'Rhode Island': 44, 'South Carolina': 45, 'South Dakota': 46, 'Tennessee': 47,\n",
|
|
209
|
+
" 'Texas': 48, 'Utah': 49, 'Vermont': 50, 'Virginia': 51, 'Washington': 53,\n",
|
|
210
|
+
" 'West Virginia': 54, 'Wisconsin': 55, 'Wyoming': 56\n",
|
|
211
|
+
"}\n",
|
|
212
|
+
"\n",
|
|
213
|
+
"# Add FIPS ID to data\n",
|
|
214
|
+
"us_data['id'] = us_data['region'].map(state_ids)\n",
|
|
215
|
+
"us_data = us_data.dropna(subset=['id'])\n",
|
|
216
|
+
"us_data['id'] = us_data['id'].astype(int)\n",
|
|
217
|
+
"\n",
|
|
218
|
+
"print(\"US data with state IDs:\")\n",
|
|
219
|
+
"print(us_data[['region', 'id', 'mean_af', 'sample_count']].to_string(index=False))"
|
|
220
|
+
]
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
"cell_type": "code",
|
|
224
|
+
"execution_count": null,
|
|
225
|
+
"id": "cell-11",
|
|
226
|
+
"metadata": {},
|
|
227
|
+
"outputs": [],
|
|
228
|
+
"source": [
|
|
229
|
+
"# Create US map\n",
|
|
230
|
+
"us_background = alt.Chart(states).mark_geoshape(\n",
|
|
231
|
+
" fill='lightgray',\n",
|
|
232
|
+
" stroke='white'\n",
|
|
233
|
+
").project(\n",
|
|
234
|
+
" type='albersUsa'\n",
|
|
235
|
+
").properties(\n",
|
|
236
|
+
" width=600,\n",
|
|
237
|
+
" height=400\n",
|
|
238
|
+
")\n",
|
|
239
|
+
"\n",
|
|
240
|
+
"us_choropleth = alt.Chart(states).mark_geoshape(\n",
|
|
241
|
+
" stroke='white'\n",
|
|
242
|
+
").encode(\n",
|
|
243
|
+
" color=alt.Color(\n",
|
|
244
|
+
" 'mean_af:Q',\n",
|
|
245
|
+
" scale=alt.Scale(scheme='blues'),\n",
|
|
246
|
+
" legend=alt.Legend(title='Mean AF')\n",
|
|
247
|
+
" ),\n",
|
|
248
|
+
" tooltip=[\n",
|
|
249
|
+
" alt.Tooltip('region:N', title='State'),\n",
|
|
250
|
+
" alt.Tooltip('mean_af:Q', title='Mean AF', format='.4f'),\n",
|
|
251
|
+
" alt.Tooltip('sample_count:Q', title='Samples'),\n",
|
|
252
|
+
" alt.Tooltip('variant_count:Q', title='Variant Calls')\n",
|
|
253
|
+
" ]\n",
|
|
254
|
+
").transform_lookup(\n",
|
|
255
|
+
" lookup='id',\n",
|
|
256
|
+
" from_=alt.LookupData(us_data, 'id', ['mean_af', 'region', 'sample_count', 'variant_count'])\n",
|
|
257
|
+
").project(\n",
|
|
258
|
+
" type='albersUsa'\n",
|
|
259
|
+
").properties(\n",
|
|
260
|
+
" width=600,\n",
|
|
261
|
+
" height=400,\n",
|
|
262
|
+
" title='V/C/P Gene Variant Mean AF by US State'\n",
|
|
263
|
+
")\n",
|
|
264
|
+
"\n",
|
|
265
|
+
"us_map = us_background + us_choropleth\n",
|
|
266
|
+
"us_map"
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
"cell_type": "code",
|
|
271
|
+
"execution_count": null,
|
|
272
|
+
"id": "cell-12",
|
|
273
|
+
"metadata": {},
|
|
274
|
+
"outputs": [],
|
|
275
|
+
"source": [
|
|
276
|
+
"# === Canada Province Map ===\n",
|
|
277
|
+
"\n",
|
|
278
|
+
"# Canada provinces topojson URL\n",
|
|
279
|
+
"canada_url = 'https://raw.githubusercontent.com/codeforamerica/click_that_hood/master/public/data/canada.geojson'\n",
|
|
280
|
+
"\n",
|
|
281
|
+
"print(\"Canada data:\")\n",
|
|
282
|
+
"print(canada_data[['region', 'mean_af', 'sample_count']].to_string(index=False))"
|
|
283
|
+
]
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
"cell_type": "code",
|
|
287
|
+
"execution_count": null,
|
|
288
|
+
"id": "cell-13",
|
|
289
|
+
"metadata": {},
|
|
290
|
+
"outputs": [],
|
|
291
|
+
"source": [
|
|
292
|
+
"# Create Canada bar chart (simpler than choropleth for few provinces)\n",
|
|
293
|
+
"canada_chart = alt.Chart(canada_data).mark_bar().encode(\n",
|
|
294
|
+
" x=alt.X('region:N', title='Province', sort='-y'),\n",
|
|
295
|
+
" y=alt.Y('mean_af:Q', title='Mean Allele Frequency'),\n",
|
|
296
|
+
" color=alt.Color(\n",
|
|
297
|
+
" 'mean_af:Q',\n",
|
|
298
|
+
" scale=alt.Scale(scheme='greens'),\n",
|
|
299
|
+
" legend=None\n",
|
|
300
|
+
" ),\n",
|
|
301
|
+
" tooltip=[\n",
|
|
302
|
+
" alt.Tooltip('region:N', title='Province'),\n",
|
|
303
|
+
" alt.Tooltip('mean_af:Q', title='Mean AF', format='.4f'),\n",
|
|
304
|
+
" alt.Tooltip('sample_count:Q', title='Samples'),\n",
|
|
305
|
+
" alt.Tooltip('variant_count:Q', title='Variant Calls')\n",
|
|
306
|
+
" ]\n",
|
|
307
|
+
").properties(\n",
|
|
308
|
+
" width=400,\n",
|
|
309
|
+
" height=300,\n",
|
|
310
|
+
" title='V/C/P Gene Variant Mean AF by Canadian Province'\n",
|
|
311
|
+
")\n",
|
|
312
|
+
"\n",
|
|
313
|
+
"canada_chart"
|
|
314
|
+
]
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"cell_type": "code",
|
|
318
|
+
"execution_count": null,
|
|
319
|
+
"id": "cell-14",
|
|
320
|
+
"metadata": {},
|
|
321
|
+
"outputs": [],
|
|
322
|
+
"source": [
|
|
323
|
+
"# === Romania Visualization ===\n",
|
|
324
|
+
"\n",
|
|
325
|
+
"print(\"Romania data:\")\n",
|
|
326
|
+
"print(romania_data[['location', 'mean_af', 'sample_count', 'variant_count']].to_string(index=False))\n",
|
|
327
|
+
"\n",
|
|
328
|
+
"# Romania has only Bucharest, show as single indicator\n",
|
|
329
|
+
"romania_chart = alt.Chart(romania_data).mark_bar().encode(\n",
|
|
330
|
+
" x=alt.X('location:N', title='Location'),\n",
|
|
331
|
+
" y=alt.Y('mean_af:Q', title='Mean Allele Frequency'),\n",
|
|
332
|
+
" color=alt.value('coral'),\n",
|
|
333
|
+
" tooltip=[\n",
|
|
334
|
+
" alt.Tooltip('location:N', title='Location'),\n",
|
|
335
|
+
" alt.Tooltip('mean_af:Q', title='Mean AF', format='.4f'),\n",
|
|
336
|
+
" alt.Tooltip('sample_count:Q', title='Samples'),\n",
|
|
337
|
+
" alt.Tooltip('variant_count:Q', title='Variant Calls')\n",
|
|
338
|
+
" ]\n",
|
|
339
|
+
").properties(\n",
|
|
340
|
+
" width=200,\n",
|
|
341
|
+
" height=300,\n",
|
|
342
|
+
" title='V/C/P Gene Variant Mean AF - Romania'\n",
|
|
343
|
+
")\n",
|
|
344
|
+
"\n",
|
|
345
|
+
"romania_chart"
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"cell_type": "code",
|
|
350
|
+
"execution_count": null,
|
|
351
|
+
"id": "cell-15",
|
|
352
|
+
"metadata": {},
|
|
353
|
+
"outputs": [],
|
|
354
|
+
"source": [
|
|
355
|
+
"# === Combined Summary ===\n",
|
|
356
|
+
"\n",
|
|
357
|
+
"# Combined comparison bar chart\n",
|
|
358
|
+
"all_regions = pd.concat([us_data, canada_data, romania_data])\n",
|
|
359
|
+
"all_regions['label'] = all_regions['country'] + ': ' + all_regions['region']\n",
|
|
360
|
+
"\n",
|
|
361
|
+
"combined_chart = alt.Chart(all_regions).mark_bar().encode(\n",
|
|
362
|
+
" x=alt.X('label:N', title='Location', sort='-y'),\n",
|
|
363
|
+
" y=alt.Y('mean_af:Q', title='Mean Allele Frequency'),\n",
|
|
364
|
+
" color=alt.Color(\n",
|
|
365
|
+
" 'country:N',\n",
|
|
366
|
+
" scale=alt.Scale(domain=['USA', 'Canada', 'Romania'], range=['steelblue', 'seagreen', 'coral']),\n",
|
|
367
|
+
" legend=alt.Legend(title='Country')\n",
|
|
368
|
+
" ),\n",
|
|
369
|
+
" tooltip=[\n",
|
|
370
|
+
" alt.Tooltip('label:N', title='Location'),\n",
|
|
371
|
+
" alt.Tooltip('mean_af:Q', title='Mean AF', format='.4f'),\n",
|
|
372
|
+
" alt.Tooltip('sample_count:Q', title='Samples'),\n",
|
|
373
|
+
" alt.Tooltip('variant_count:Q', title='Variant Calls')\n",
|
|
374
|
+
" ]\n",
|
|
375
|
+
").properties(\n",
|
|
376
|
+
" width=700,\n",
|
|
377
|
+
" height=400,\n",
|
|
378
|
+
" title='V/C/P Gene Variant Mean AF by Region (All Locations)'\n",
|
|
379
|
+
")\n",
|
|
380
|
+
"\n",
|
|
381
|
+
"combined_chart"
|
|
382
|
+
]
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"cell_type": "code",
|
|
386
|
+
"execution_count": null,
|
|
387
|
+
"id": "cell-16",
|
|
388
|
+
"metadata": {},
|
|
389
|
+
"outputs": [],
|
|
390
|
+
"source": [
|
|
391
|
+
"# === Summary Statistics ===\n",
|
|
392
|
+
"\n",
|
|
393
|
+
"print(\"=\"*60)\n",
|
|
394
|
+
"print(\"V/C/P GENE VARIANT ANALYSIS SUMMARY\")\n",
|
|
395
|
+
"print(\"=\"*60)\n",
|
|
396
|
+
"\n",
|
|
397
|
+
"print(f\"\\nTotal V/C/P variants analyzed: {len(vcp_variants)}\")\n",
|
|
398
|
+
"print(f\"Total per-sample variant calls: {len(per_sample_vcp)}\")\n",
|
|
399
|
+
"print(f\"Unique samples: {merged['Sample'].nunique()}\")\n",
|
|
400
|
+
"print(f\"Unique locations: {len(location_stats)}\")\n",
|
|
401
|
+
"\n",
|
|
402
|
+
"print(f\"\\n--- By Country ---\")\n",
|
|
403
|
+
"for country in ['USA', 'Canada', 'Romania']:\n",
|
|
404
|
+
" subset = all_regions[all_regions['country'].str.contains(country, na=False)]\n",
|
|
405
|
+
" if len(subset) > 0:\n",
|
|
406
|
+
" print(f\"\\n{country}:\")\n",
|
|
407
|
+
" print(f\" Regions: {len(subset)}\")\n",
|
|
408
|
+
" print(f\" Total samples: {subset['sample_count'].sum()}\")\n",
|
|
409
|
+
" print(f\" Mean AF range: {subset['mean_af'].min():.4f} - {subset['mean_af'].max():.4f}\")\n",
|
|
410
|
+
"\n",
|
|
411
|
+
"print(f\"\\n--- Overall ---\")\n",
|
|
412
|
+
"print(f\"Overall mean AF: {merged['AF'].mean():.4f}\")\n",
|
|
413
|
+
"print(f\"AF std dev: {merged['AF'].std():.4f}\")"
|
|
414
|
+
]
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"cell_type": "code",
|
|
418
|
+
"execution_count": null,
|
|
419
|
+
"id": "cell-17",
|
|
420
|
+
"metadata": {},
|
|
421
|
+
"outputs": [],
|
|
422
|
+
"source": [
|
|
423
|
+
"# Save summary to Galaxy\n",
|
|
424
|
+
"location_stats.to_csv('vcp_variant_by_location.tsv', sep='\\t', index=False)\n",
|
|
425
|
+
"await gxy.put('vcp_variant_by_location.tsv', output='V/C/P Variants by Location', ext='tabular')\n",
|
|
426
|
+
"print(\"Summary saved to Galaxy history!\")"
|
|
427
|
+
]
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"metadata": {
|
|
431
|
+
"kernelspec": {
|
|
432
|
+
"display_name": "Python 3",
|
|
433
|
+
"language": "python",
|
|
434
|
+
"name": "python3"
|
|
435
|
+
},
|
|
436
|
+
"language_info": {
|
|
437
|
+
"name": "python",
|
|
438
|
+
"version": "3.11"
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
"nbformat": 4,
|
|
442
|
+
"nbformat_minor": 5
|
|
443
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# Scripts for Galaxy Integration
|
|
2
|
+
|
|
3
|
+
Automation scripts to support tool discovery, workflow validation, and workflow testing on Galaxy instances.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Overview: Which Script to Use?
|
|
8
|
+
|
|
9
|
+
| Task | Script | Requires Galaxy API? |
|
|
10
|
+
|------|--------|---------------------|
|
|
11
|
+
| **Check tool on Galaxy instance** | `galaxy_tool_checker.py` | ✅ Yes |
|
|
12
|
+
| **Validate .ga workflow** | `galaxy_tool_checker.py` | ✅ Yes |
|
|
13
|
+
| **Test workflow execution** | `galaxy_tool_checker.py` | ✅ Yes |
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## galaxy_tool_checker.py
|
|
18
|
+
|
|
19
|
+
**Purpose**: Check tool availability, validate workflows, and test workflow execution on live Galaxy instances using BioBlend.
|
|
20
|
+
|
|
21
|
+
**Key Features**:
|
|
22
|
+
- Batch tool availability checking
|
|
23
|
+
- Workflow validation (.ga files)
|
|
24
|
+
- Workflow testing (import and run)
|
|
25
|
+
- JSON output for automation
|
|
26
|
+
- Low token usage compared to MCP
|
|
27
|
+
|
|
28
|
+
**Installation**:
|
|
29
|
+
```bash
|
|
30
|
+
pip install bioblend
|
|
31
|
+
|
|
32
|
+
# Optional: For .env file support
|
|
33
|
+
pip install python-dotenv
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Usage Examples**:
|
|
37
|
+
|
|
38
|
+
### Check Single Tool
|
|
39
|
+
```bash
|
|
40
|
+
python galaxy-integration/scripts/galaxy_tool_checker.py \
|
|
41
|
+
--url https://usegalaxy.org \
|
|
42
|
+
--api-key YOUR_API_KEY \
|
|
43
|
+
--tool hyphy
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Check Multiple Tools
|
|
47
|
+
```bash
|
|
48
|
+
python galaxy-integration/scripts/galaxy_tool_checker.py \
|
|
49
|
+
--url https://usegalaxy.org \
|
|
50
|
+
--api-key YOUR_API_KEY \
|
|
51
|
+
--tool hyphy iqtree seqkit mafft \
|
|
52
|
+
--output report.json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Check Tools from File
|
|
56
|
+
```bash
|
|
57
|
+
# Create tools.txt with one tool name per line
|
|
58
|
+
python galaxy-integration/scripts/galaxy_tool_checker.py \
|
|
59
|
+
--url https://usegalaxy.org \
|
|
60
|
+
--api-key YOUR_API_KEY \
|
|
61
|
+
--tool-list tools.txt
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Validate Workflow
|
|
65
|
+
```bash
|
|
66
|
+
python galaxy-integration/scripts/galaxy_tool_checker.py \
|
|
67
|
+
--url https://usegalaxy.org \
|
|
68
|
+
--api-key YOUR_API_KEY \
|
|
69
|
+
--workflow my_workflow.ga \
|
|
70
|
+
--verbose
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Test Workflow (Import and Run)
|
|
74
|
+
```bash
|
|
75
|
+
python galaxy-integration/scripts/galaxy_tool_checker.py \
|
|
76
|
+
--url https://usegalaxy.org \
|
|
77
|
+
--api-key YOUR_API_KEY \
|
|
78
|
+
--workflow my_workflow.ga \
|
|
79
|
+
--test \
|
|
80
|
+
--history "Test Run" \
|
|
81
|
+
--wait
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Exit Codes**:
|
|
85
|
+
- `0`: Success (all tools found / workflow valid)
|
|
86
|
+
- `1`: Failure (tools missing / workflow invalid)
|
|
87
|
+
|
|
88
|
+
**See Also**:
|
|
89
|
+
- `../galaxy-integration.md` - Complete integration guide
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## When to Use Which Script
|
|
94
|
+
|
|
95
|
+
| Scenario | Use | Why |
|
|
96
|
+
|----------|-----|-----|
|
|
97
|
+
| **Check if tool exists on YOUR Galaxy instance** | `galaxy_tool_checker.py` | Connects to actual Galaxy |
|
|
98
|
+
| **Check multiple tools at once** | `galaxy_tool_checker.py --tool-list` | Batch checking |
|
|
99
|
+
| **Validate .ga workflow structure** | `galaxy_tool_checker.py --workflow` | Checks all tools exist |
|
|
100
|
+
| **Test workflow execution on Galaxy** | `galaxy_tool_checker.py --workflow --test` | Actually runs it |
|
|
101
|
+
| **CI/CD automation** | `galaxy_tool_checker.py` | Scriptable with exit codes |
|
|
102
|
+
|
|
103
|
+
**Summary**:
|
|
104
|
+
- `galaxy_tool_checker.py` = Check/validate/test on actual Galaxy instance (needs API key)
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Configuration: Environment Variables and .env Files
|
|
109
|
+
|
|
110
|
+
### Option 1: .env File (Recommended)
|
|
111
|
+
|
|
112
|
+
Create a `.env` file in your working directory (recommended: the **skills repository root**):
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Copy the example
|
|
116
|
+
# From the skills repository root:
|
|
117
|
+
cp .env.example .env
|
|
118
|
+
|
|
119
|
+
# Edit with your credentials
|
|
120
|
+
nano .env
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
`.env` file contents:
|
|
124
|
+
```bash
|
|
125
|
+
GALAXY_URL=https://usegalaxy.org/
|
|
126
|
+
GALAXY_API_KEY=your_api_key_here
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Security**: The `.env` file is gitignored by default. Never commit API keys to git!
|
|
130
|
+
|
|
131
|
+
**Note**: `galaxy_tool_checker.py` looks for a `.env` in the current directory **and parent directories**, so placing `.env` at the skills repo root lets you run the script from `nf-to-galaxy/scripts/` without copying credentials into subdirectories.
|
|
132
|
+
|
|
133
|
+
### Option 2: Environment Variables
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
export GALAXY_URL="https://usegalaxy.org"
|
|
137
|
+
export GALAXY_API_KEY="your_api_key_here"
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Option 3: Command Line Arguments
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
python galaxy_tool_checker.py \
|
|
144
|
+
--url https://usegalaxy.org \
|
|
145
|
+
--api-key YOUR_KEY \
|
|
146
|
+
--tool hyphy
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Getting Your API Key
|
|
150
|
+
|
|
151
|
+
1. Go to your Galaxy instance (e.g., https://usegalaxy.org)
|
|
152
|
+
2. Log in
|
|
153
|
+
3. Navigate to: **User → Preferences → Manage API Key**
|
|
154
|
+
4. Click "Create a new key" if you don't have one
|
|
155
|
+
5. Copy the key to your `.env` file or environment variable
|
|
156
|
+
|
|
157
|
+
**Priority Order**: Command line args → Environment variables → .env file
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## Related Documentation
|
|
162
|
+
|
|
163
|
+
- **`../README.md`** - Galaxy integration overview and setup
|
|
164
|
+
- **`../SKILL.md`** - Agent entrypoint for Galaxy integration
|
|
165
|
+
- **`../galaxy-integration.md`** - Galaxy MCP and BioBlend integration guide
|