{"id":"genomic-intelligence","name":"genomic-intelligence","summary":"ゲノミック・インテリジェンスのホストされたトランスフォーマーDNA言語モデルを用いて、DNA配列から直接調節特性、遺伝子構造、発現を予測します。","body":"# Genomic Intelligence — DNA Sequence Models\n\nGenomic Intelligence (GI) serves transformer DNA language models over six\nsequence-analysis tasks on managed GPUs. Give it a **gene symbol**, a **genomic\nregion**, or a **DNA/FASTA sequence**; it returns structured predictions —\npromoter regions, splice sites, enhancer activity, chromatin state, expression\n(log TPM), and de-novo gene annotation. Nothing runs locally: no model weights,\nno GPU, no heavy Python stack. It is a thin client over a hosted, versioned\ninference API.\n\n**Official docs:** [docs.genomicintelligence.ai](https://docs.genomicintelligence.ai) ·\nREST contract at [api.genomicintelligence.ai/v1/openapi.json](https://api.genomicintelligence.ai/v1/openapi.json) ·\nhosted MCP server at `https://mcp.genomicintelligence.ai/mcp`\n\n## When to use this skill\n\nUse GI when the user has DNA and wants a model prediction:\n\n- **Find promoters** in a genomic region (`promoter`)\n- **Predict splice** donor/acceptor sites (`splice`)\n- **Score enhancer activity** — developmental & housekeeping (`enhancer`)\n- **Annotate chromatin state** across hundreds of tracks (`chromatin`)\n- **Predict expression** as log(TPM+1) from a sequence + cell-type context (`expression`)\n- **Annotate genes/transcripts** de novo, no reference needed (`annotation`)\n- **Find the genes in a region and predict each one's expression** (composite)\n\nNot for local alignment, variant calling, or file I/O — use a local tool\n(BioPython, bcftools) for those. GI is for **model inference from sequence**.\n\n> For research and development use, **not clinical or diagnostic decisions**.\n\n## Two ways to call GI\n\n### Hosted MCP server (best for AI agents — keyless)\n\nGI hosts an MCP server at `https://mcp.genomicintelligence.ai/mcp` (Streamable\nHTTP). When your agent host supports MCP, prefer it: it works **keyless** against\na capped public demo quota (zero setup), and an optional `gi_` bearer key raises\nthe quota. It exposes acquisition tools that return a **sequence handle**\n(`sequence_ref`) and `predict_*` tools that take that handle — so large sequences\nnever bloat the context. See [MCP workflow](#mcp-workflow-handle-based) below and\n`references/mcp.md`.\n\n### REST API (universal)\n\nPlain HTTP with `requests` against `https://api.genomicintelligence.ai/v1`. The\nREST path **requires** a `GI_API_KEY` (a `gi_` bearer). Use it on any host, in\nscripts, or when you need the raw envelope. See [Core REST workflow](#core-rest-workflow).\n\n## Access and authentication\n\n1. The **hosted MCP demo is keyless** — try it with nothing set.\n2. The **REST `/v1` API needs a key**, sent as `Authorization: Bearer <key>`.\n   Request one at [contact@genomicintelligence.ai](mailto:contact@genomicintelligence.ai).\n3. **Never hardcode the key.** Read it from the `GI_API_KEY` environment variable\n   (or a `.env` via `python-dotenv`). Never commit keys.\n\n```bash\nexport GI_API_KEY=\"gi_yourkeyhere\"     # optional for MCP; required for REST\nexport GI_BASE_URL=\"https://api.genomicintelligence.ai\"   # override for staging\n```\n\nKeys are scoped to a partner tier with concurrency and per-minute caps. A `429`\nmeans you hit a cap — back off and retry, or ask GI to raise your tier.\n\n## The six tasks\n\nAll REST tasks share one shape: `POST /v1/tasks/{task}/predict` with body\n`{sequence, sequence_name, model?, options?}`, returning a `{data, meta}`\nenvelope. What differs per task:\n\n| Task | Mode | Length bound | Notes |\n|---|---|---|---|\n| `promoter` | sync | 1–500,000 bp | sliding-window promoter regions |\n| `splice` | sync | 1–500,000 bp | donor/acceptor sites (long-context BigBird) |\n| `enhancer` | sync | 1–500,000 bp | dev + housekeeping scores (DeepSTARR, *Drosophila*) |\n| `chromatin` | sync | 1–500,000 bp | hundreds of tracks (DeepSEA) |\n| `expression` | sync | **exactly 9,198 bp** | log(TPM+1); needs a cell-type `description` |\n| `annotation` | **async** | 1–500,000 bp | de-novo transcripts; submit + poll |\n\n**Omit `model` and the API uses the task's default** — that is the recommended\ncall. Default model IDs are intentionally **not** documented here: defaults\nchange and retired IDs fail hard, so never hardcode one. To pin a model, or to\npick a non-human one (Drosophila, yeast, and Arabidopsis models exist for several\ntasks), discover IDs at call time with `GET /v1/tasks/{task}/models` (REST) or\n`list_models` (MCP) — and **never invent one**. Full per-task output shapes are\nin `references/tasks.md`.\n\nTwo hard rules the model enforces:\n\n- **`expression` needs exactly 9,198 bp**, a window **centred on the TSS**\n  (4,599 upstream + TSS + 4,598 downstream). Any other length is rejected. Use the acquisition helpers below to\n  build it — do not truncate by hand.\n- **`expression` needs a `description`** — a cell-type / assay string (e.g.\n  `\"K562 cells\"`), passed as `options.description`.\n\n## Sequence acquisition\n\nYou rarely start from a raw 9,198 bp string. Acquire sequence first:\n\n- **From a gene symbol** → MCP `fetch_ensembl_sequence(gene=...)`; **from\n  coordinates** → `fetch_region(region=...)`. Both fetch public Ensembl reference\n  sequence (no key). REST users can query Ensembl REST directly. (`find_genes` is\n  the annotation task, not an acquisition tool.)\n- **For `expression`** → use the TSS-centred fetch so the window is exactly\n  9,198 bp. MCP: `fetch_gene_for_expression` (handles the centring). Do not\n  build the window by hand.\n- **From a local FASTA** → MCP `store_inline_sequence`, or read the file yourself\n  for REST. (`load_local_fasta` exists only in local deployments, not on the\n  hosted server.)\n- **A demo sequence** → MCP `load_demo_sequence(name=...)` returns a ready handle\n  (great for a keyless smoke test); `name` is required.\n\nSee `references/sequence-acquisition.md` for the exact Ensembl calls and the\nexpression-window math.\n\n## Core REST workflow\n\nSync tasks (promoter, splice, enhancer, chromatin, expression) are one call:\n\n```python\nimport os, requests\n\nBASE = os.environ.get(\"GI_BASE_URL\", \"https://api.genomicintelligence.ai\")\nHEADERS = {\"Authorization\": f\"Bearer {os.environ['GI_API_KEY']}\"}\n\ndef predict(task, sequence, sequence_name, model=None, options=None):\n    body = {\"sequence\": sequence, \"sequence_name\": sequence_name}\n    if model:   body[\"model\"] = model\n    if options: body[\"options\"] = options\n    r = requests.post(f\"{BASE}/v1/tasks/{task}/predict\", headers=HEADERS, json=body)\n    r.raise_for_status()          # 400 invalid; 401 no/bad key; 413 too long; 429 rate limit\n    return r.json()               # {\"data\": {...}, \"meta\": {...}}\n\n# Promoter:\nout = predict(\"promoter\", seq, \"TP53_region\")\nprint(out[\"data\"][\"summary\"])\n\n# Expression — exactly 9,198 bp + a cell-type description:\nout = predict(\"expression\", tss_window_9198bp, \"HBB\",\n              options={\"description\": \"K562 cells\"})\nprint(out[\"data\"][\"prediction\"][\"expression_log_tpm\"])\n```\n\n### Async: annotation\n\n`annotation` is submit-then-poll. Send `Prefer: respond-async`, get a `job_id`,\npoll until terminal:\n\n```python\nimport time\n\nr = requests.post(f\"{BASE}/v1/tasks/annotation/predict\",\n                  headers={**HEADERS, \"Prefer\": \"respond-async\"},\n                  json={\"sequence\": seq, \"sequence_name\": \"TP53\"})\nr.raise_for_status()              # 202 Accepted\njob_id = r.json()[\"data\"][\"job_id\"]\n\nwhile True:\n    j = requests.get(f\"{BASE}/v1/tasks/jobs/{job_id}\", headers=HEADERS)\n    if j.status_code == 200:      # terminal: body is the final {data, meta}\n        break\n    j.raise_for_status()          # 202 = still running (2xx, won't raise)\n    time.sleep(5)                 # ~20 s typical for ~20 kb\ntranscripts = j.json()[\"data\"][\"transcripts\"]\n```\n\n## MCP workflow (handle-based)\n\nOn an MCP host, acquire a handle, then predict against it — sequences stay out of\nthe context:\n\n```\n# 1. Acquire a sequence handle (each returns a sequence_ref):\nload_demo_sequence(name=\"promoter_tp53\")  # keyless smoke test; `name` is REQUIRED\nfetch_ensembl_sequence(gene=\"TP53\")       # gene symbol or Ensembl ID -> handle\nfetch_region(region=\"chr11:5,225,000-5,235,000\")   # coordinates -> handle\nfetch_gene_for_expression(gene=\"HBB\")     # TSS-centred 9,198 bp handle for expression\n\n# 2. Predict against the handle:\npredict_promoter(sequence_ref=<ref>)\npredict_expression(sequence_ref=<ref>, description=\"K562 cells\")\npredict_splice(sequence_ref=<ref>)        # + predict_enhancer / predict_chromatin\n\n# 3. Annotation on MCP is `find_genes` (there is no predict_annotation).\n#    It takes a handle, not a region, and runs async internally:\nfind_genes(sequence_ref=<ref>)            # wait=True (default) returns the result\nfind_genes(sequence_ref=<ref>, wait=False)  # -> job_id; poll get_job(job_id)\n\n# Discover models with list_models(task); reference context lives in the\n# gi://models, gi://docs/tasks, and gi://account MCP resources.\n```\n\n## Composite: find genes, then predict expression\n\nTo answer \"what genes are in this region and how are they expressed?\", use the\ncomposite:\n\n- **MCP:** `find_genes_and_predict_expression(sequence_ref=..., description=...)`\n  — takes a **handle, not a region** (acquire one with `fetch_region` first);\n  `description` is required. Finds genes in the sequence and returns an\n  expression prediction for each.\n- **REST:** call gene discovery, then loop `expression` per gene (build each\n  TSS-centred 9,198 bp window via the acquisition helpers).\n\n## Errors\n\n| Code | Meaning | Action |\n|---|---|---|\n| 400 | Invalid request / bad sequence | Check the body; expression must be exactly 9,198 bp and carry `description` |\n| 401 | Missing/invalid key (REST) | Set `GI_API_KEY`; or use the keyless MCP demo |\n| 413 | Sequence too long | Stay within the task's length bound (≤500,000 bp) |\n| 429 | Rate / concurrency cap | Back off and retry; ask GI to raise your tier |\n| 422 | Validation failed (`validation_failed`) | The most common failure: expression not exactly 9,198 bp, or a sequence below the model's minimum length |\n| 5xx | Server error | Retry; if persistent, contact support |\n\n## Reference files\n\n- `references/tasks.md` — per-task output shapes, model registries, the async\n  annotation contract.\n- `references/api-and-auth.md` — REST endpoints, the `{data, meta}` envelope,\n  auth, base-URL override, tiers.\n- `references/mcp.md` — the hosted MCP tool list, the handle-based flow, and the\n  `gi://` resources.\n- `references/sequence-acquisition.md` — Ensembl fetch calls and the\n  expression-window (9,198 bp, TSS-centred) math.","author":"@K-Dense-AI","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/genomic-intelligence","license":"MIT","category":"document","lang":"en","tokens":2722,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"references/api-and-auth.md","size":1790,"sha256":"98e15c2dc6f59ebafee6323fb4731b8c2c789d9bd24e8feff49e9f23a21e7ec1"},{"path":"references/mcp.md","size":3924,"sha256":"0b916aeeb9f455921f030a3580b3fc74c0e3f237a3399341a282cd8f6fdb34d9"},{"path":"references/sequence-acquisition.md","size":2315,"sha256":"69e7cceafed32c72293739bc58eafb578e2ef707149080bff11cfcf63375a823"},{"path":"references/tasks.md","size":3661,"sha256":"b831b3586fd9c80a2f67fcb6acc06f2124309edf789f24e8b3e8cd4fdcf3f597"}],"requires":{"mcp":[],"tools":[]},"safety":{"flags":[],"scannedAt":"2026-08-22","hasScripts":false,"networkEndpoints":["api.genomicintelligence.ai","docs.genomicintelligence.ai","mcp.genomicintelligence.ai"]}}