dsh-bioinf
文件与数据 活跃维护

dsh-bioinf

gsh150801/dsh-bioinf

作为面向大模型推理框架的生物信息学专用插件,可无缝调用框架核心推理能力,覆盖序列比对、功能注释等生信分析场景,内置标准化分析模板与参数预设,降低生信工具使用门槛,开箱即用。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
25 KB
仓库大小
21 天前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:gsh150801/dsh-bioinf
git clone https://github.com/gsh150801/dsh-bioinf.git
git clone git@github.com:gsh150801/dsh-bioinf.git
README.md main

dsh-bioinf

Bioinformatics skill router plugin for DeepSeek Harness.

Solves one core problem: a curated library of 986 bio-skills cannot be published as a flat
per-session catalog (~230 KB / 60–80k tokens of prompt per session). This plugin replaces the
catalog with search-based routing:

Component What it does
skill_search tool BM25-style scoring (idf-weighted fields: name ×6, category ×2, whenToUse ×1.5, description ×1) with CJK bigram support — Chinese and English queries both work. Returns top-k matches with exact names + categories. <10 ms per query over the full library.
skill_categories tool Category tree (15 top-level categories, counts, sub-categories) for domain browsing.
bioinf-library skill provider Registers all 986 skills into ctx.skills so the native skill tool loads bodies on demand (normalized kebab-case names; strips HTML provenance comments; guaranteed descriptions).
dsh-bioinf-anysearch (sibling row) Registers an [anysearch] WebSearchProvider into ctx.web — powers the native web_search tool. Separate row because headless profiles mount no web seam.
remote_exec tool (opt-in) SSH execution on a configured GPU/train server: nvidia-smi, nohup training, log polling, prediction. Registered only when remote.host/remote.user are set.
Guidance prompt section Routing rules ("never guess a skill name") + three scenario playbooks: (A) literature deep-review with falsifiable hypotheses, (B) bio-data retrieval/analysis, (C) remote training/prediction.

Usage

Pair with @deepseek-ai/dsh-tool-skill config catalog: off (see ~/.dsh/profiles/bioinf/cordis.patch.yml).

- insert:
    - id: bioinf
      name: 'file:///D:/projs/bioinf_agent/deepseek-harness/packages/examples/dsh-bioinf/lib/index.js'
      config:
        skillsIndexFile: 'D:/projs/bioinf_agent/skills_meta/_dsh_index.json'
    - id: bioinf-anysearch
      name: 'file:///D:/projs/bioinf_agent/deepseek-harness/packages/examples/dsh-bioinf/lib/anysearch-plugin.js'
      config:
        apiKey: '...'
- id: tool-skill
  name: '@deepseek-ai/dsh-tool-skill'
  config:
    catalog: off

Index format

skillsIndexFile points at a JSON array (build script: D:/projs/bioinf_agent/tools_scan/build_index.py,
inventory: validate_skills.py):

[{"name":"scanpy","dir":"scanpy","cat1":"细胞组学与组学整合场景","cat2":"单细胞与转录组分析",
  "cat3":"scanpy","description":"...","whenToUse":"...","requirements":["pip install scanpy"],
  "hasScripts":false,"nScripts":0,"bodyChars":1234,"path":"D:/.../scanpy/SKILL.md"}]

Development

pnpm run build:lib:host   # rebuilds lib/ (tsc project graph + tsdown)
pnpm exec vitest run packages/examples/dsh-bioinf/tests/

Unit suites (36 tests, no harness boot): bioinf.spec.ts (index/tokenizer/body
extraction/anysearch), scenarios.spec.ts (scenario A literature→hypothesis routing +
skill-load chain; scenario B data-source routes + category tree + ssh argv),
perf.spec.ts (measurement-based guardrails: per-step model-visible payload,
cold/cached index load).

The package follows repo conventions: tsconfig.json in the tsc -b graph (referenced from the
root tsconfig.host.json) and a local tsdown.config.ts with entries index, anysearch-plugin,
search, anysearch.