Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions .claude/skills/add-omics-runtime-pack/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
---
name: add-omics-runtime-pack
description: Audit or refresh a curated pack of eight high-signal omics runtime skills in a BioClaw installation. Use when the user wants stronger built-in guidance for common omics analyses inside agent containers without changing BioClaw source code. Ensures the eight runtime skill folders exist under `container/skills/` with the expected flat file layout.
disable-model-invocation: true
---

# Add Omics Runtime Pack

This skill verifies that eight strong runtime skills are present under `container/skills/` for common BioClaw analysis tasks.

## What This Adds

- `container/skills/scrna-preprocessing-clustering/`
- `container/skills/cell-annotation/`
- `container/skills/chip-seq/`
- `container/skills/atac-seq/`
- `container/skills/differential-expression/`
- `container/skills/proteomics/`
- `container/skills/metagenomics/`
- `container/skills/structural-biology/`

Each runtime skill must contain only root-level files:

- `SKILL.md`
- `technical_reference.md`
- `commands_and_thresholds.md`

## What This Must Not Change

- Do not modify `src/`, `container/agent-runner/`, `Dockerfile`, or any application code.
- Do not modify `src/container-runner.ts`.
- Do not add Python packages, R packages, or other dependencies.
- Do not add nested `references/` directories under `container/skills/<skill>/`.

The contribution is delivered as runtime skill content plus this installer skill, without any source-code changes.

## Why The Runtime Skills Must Stay Flat

BioClaw syncs `container/skills/<skill>/` into `/home/node/.claude/skills/<skill>/` inside the container, but the sync only copies the first directory level.

That means:

- `container/skills/<skill>/SKILL.md` will sync
- `container/skills/<skill>/technical_reference.md` will sync
- `container/skills/<skill>/commands_and_thresholds.md` will sync
- `container/skills/<skill>/references/...` will **not** sync

So every installed runtime skill must be flat.

## Runtime Skill Source Of Truth

The runtime-ready versions now live directly in:

```text
container/skills/
```

Treat those directories as the source of truth. Do not recreate alternate copies under `.claude/skills/`.

## Implementation Steps

Run all steps directly. Only pause if one of the target runtime skill directories already exists and appears user-modified.

### 1. Verify Current State

Check:

```bash
pwd
ls -la container/skills
for skill in \
scrna-preprocessing-clustering \
cell-annotation \
chip-seq \
atac-seq \
differential-expression \
proteomics \
metagenomics \
structural-biology
do
test -e "container/skills/$skill" && echo "$skill already exists" || echo "$skill missing"
done
```

If any target directory already exists, inspect it before changing anything.

### 2. Create Or Update The Eight Runtime Skill Directories

For each skill listed below, ensure `container/skills/<skill>/` exists and contains exactly the three required root-level files.

| Runtime skill | Required files |
|---|---|
| `scrna-preprocessing-clustering` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `cell-annotation` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `chip-seq` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `atac-seq` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `differential-expression` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `proteomics` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `metagenomics` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |
| `structural-biology` | `SKILL.md`, `technical_reference.md`, `commands_and_thresholds.md` |

Do not invent alternate content unless the committed runtime files clearly conflict with the current repository state.

### 3. Preserve The Runtime-Ready Shape

For every installed runtime skill:

- keep only the three root-level files above
- do not create `README.md`
- do not create nested `references/`
- keep the relative links in `SKILL.md` pointing to `technical_reference.md` and `commands_and_thresholds.md`

### 4. Validate The Installed Pack

Run these checks:

```bash
find container/skills -maxdepth 2 -type f | sort
find container/skills -maxdepth 3 -type d -name references
```

The second command should produce no output for the eight installed skills.

Also confirm that no duplicate copy of the runtime pack remains under `.claude/skills/add-omics-runtime-pack/`.

Also confirm no external-path residue remains:

```bash
grep -RniE "/Users/|omics-skills-repo-template|bioSkills-main|OpenClaw-Medical-Skills-main|claude-scientific-skills-main" \
container/skills/scrna-preprocessing-clustering \
container/skills/cell-annotation \
container/skills/chip-seq \
container/skills/atac-seq \
container/skills/differential-expression \
container/skills/proteomics \
container/skills/metagenomics \
container/skills/structural-biology
```

That search should return no matches.

### 5. Report The Result

Summarize:

- which runtime skill directories were created
- whether all eight contain exactly the three required files
- whether any pre-existing directories needed conflict resolution
- that no source files were modified
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@

Built on the [NanoClaw](https://github.com/qwibitai/nanoclaw) architecture with bioinformatics tools and skills from the [STELLA](https://github.com/zaixizhang/STELLA) project, powered by the [Claude Agent SDK](https://docs.anthropic.com/en/docs/agents-sdk).


New BioClaw-compatible skills are first contributed to <a href="https://github.com/zongtingwei/Bioclaw_Skills_Hub">Bioclaw_Skills_Hub</a>, where they can be iterated and tested before being promoted into the main BioClaw repository. If you want to contribute new skills, please submit them there first. Skills that prove useful and stable in practice may later be integrated into BioClaw itself. To get newly promoted skills and updates from BioClaw, pull the latest version of this repository with <code>git pull</code>.

</div>

## Join WeChat Group
Expand Down
4 changes: 4 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
[![Paper](https://img.shields.io/badge/bioRxiv-STELLA-b31b1b.svg)](https://www.biorxiv.org/content/10.1101/2025.07.01.662467v2)
[![arXiv](https://img.shields.io/badge/arXiv-2507.02004-b31b1b.svg)](https://arxiv.org/abs/2507.02004)

<p align="center">
新的 BioClaw 兼容 skills 会先提交到 <a href="https://github.com/zongtingwei/Bioclaw_Skills_Hub">Bioclaw_Skills_Hub</a> 仓库,在那里先完成迭代和测试,再视效果同步到主 BioClaw 仓库中。如果你想贡献新的 skills,请优先提交到该仓库。经过验证、效果稳定的 skills,后续会逐步整合进 BioClaw。若想获取这些后续合入的 skills 和更新内容,请在本仓库中执行 <code>git pull</code>。
</p>

</div>

---
Expand Down
164 changes: 164 additions & 0 deletions container/skills/atac-seq/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
---
name: atac-seq
description: ATAC-seq processing with assay QC, MACS3 peak calling, consensus peak matrices, differential accessibility, and motif or footprint follow-up.
tool_type: mixed
primary_tool: MACS3
---

# ATAC Seq

## Version Compatibility

Reference examples assume:

- `macs3` 3.0+
- `samtools` 1.18+
- `deepTools` 3.5+

Verify the runtime first:

- CLI: `macs3 --version`, `samtools --version`, `bamCoverage --version`

## Overview

Use this skill when the user needs:

- bulk ATAC-seq QC
- peak calling
- accessibility counting
- differential accessibility
- motif deviation or footprint follow-up

## When To Use This Skill

- the task is bulk ATAC-seq rather than ChIP-seq
- TSS enrichment, fragment periodicity, or FRiP need review
- the output should include peaks, counts, and downstream accessibility summaries

## Quick Route

- paired-end bulk ATAC: use `BAMPE`
- call peaks without control using ATAC-specific settings
- if TSS enrichment is poor, stop and flag data quality before interpretation

## Progressive Disclosure

- Read [technical_reference.md](technical_reference.md) for QC gates and assay-specific caveats.
- Read [commands_and_thresholds.md](commands_and_thresholds.md) for peak-calling commands, thresholds, and output conventions.

## Prerequisites

| Check | Guidance |
|---|---:|
| uniquely mapped reads | `>= 20M` preferred for strong bulk ATAC |
| TSS enrichment | `> 7` acceptable, `> 10` strong |
| FRiP | `> 0.2` often strong for good bulk ATAC |

## Expected Inputs

- paired-end ATAC BAM or FASTQ
- reference genome
- sample groups for comparisons

## Expected Outputs

- `results/peaks/sample_peaks.narrowPeak`
- `results/matrix/consensus_peak_counts.tsv`
- `results/diff_accessibility.tsv`
- `figures/tss_enrichment.pdf`
- `figures/fragment_size_distribution.pdf`

## Starter Pattern

```bash
macs3 callpeak \
-t atac.bam \
-f BAMPE \
-g hs \
-n sample \
--nomodel \
--shift -100 \
--extsize 200 \
-q 0.01 \
--outdir results/peaks
```

## Key Parameters

| Parameter | Typical value | Notes |
|---|---|---|
| `-f` | `BAMPE` | paired-end ATAC should use fragment-aware mode |
| `--nomodel` | on | standard for ATAC |
| `--shift` | `-100` | common Tn5 offset convention |
| `--extsize` | `200` | common first-pass extension |
| `-q` | `0.01` | starting FDR threshold |

## Workflow

### 1. Validate assay QC

Review:

- TSS enrichment
- fragment size periodicity
- duplication
- mapped read depth

### 2. Call peaks with ATAC-specific settings

Use fragment-aware paired-end mode and Tn5-aware shifting or equivalent settings.

### 3. Build a consensus peak matrix

Merge peaks across samples, count fragments into consensus intervals, then produce a peak-by-sample matrix.

### 4. Test differential accessibility

Use replicate-aware statistics and report both effect size and adjusted significance.

### 5. Run motif or footprint follow-up

Only after peak quality and read depth support it.

## Output Artifacts

```text
results/
├── peaks/
│ ├── sample_peaks.narrowPeak
│ └── sample_summits.bed
├── matrix/
│ └── consensus_peak_counts.tsv
└── diff_accessibility.tsv
qc/
├── tss_enrichment.tsv
└── fragment_metrics.tsv
figures/
├── tss_enrichment.pdf
└── fragment_size_distribution.pdf
```

## Quality Review

- TSS enrichment below `7` should trigger caution.
- Strong nucleosome periodicity supports a good bulk ATAC library.
- FRiP below `0.1` is usually weak and needs scrutiny.
- Footprinting should not be trusted on low-depth or poor-quality libraries.

## Anti-Patterns

- using generic ChIP peak-calling defaults for ATAC
- running footprinting on weak libraries
- skipping TSS enrichment review
- merging peaks from mixed reference builds

## Related Skills

- ChIP Seq
- Gene Regulatory Networks
- Multiome And scATAC

## Optional Supplements

- `deeptools`
- `pysam`
35 changes: 35 additions & 0 deletions container/skills/atac-seq/commands_and_thresholds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# ATAC Seq Commands And Thresholds

## Peak Calling

```bash
macs3 callpeak \
-t atac.bam \
-f BAMPE \
-g hs \
-n sample \
--nomodel \
--shift -100 \
--extsize 200 \
-q 0.01 \
--outdir results/peaks
```

## Suggested QC Gates

- uniquely mapped reads: `>= 20M`
- TSS enrichment: `> 7`
- strong TSS enrichment: `> 10`
- FRiP: `> 0.2`

## Output Convention

```text
results/
├── peaks/sample_peaks.narrowPeak
├── matrix/consensus_peak_counts.tsv
└── diff_accessibility.tsv
qc/
├── tss_enrichment.tsv
└── fragment_metrics.tsv
```
Loading
Loading