qPCR mtDNA Copy Number
One-line: mitochondrial DNA copy number from ND1/ND5 qPCR — auto-paired with B2M/POLG nuclear references, statistics and a 300-dpi plot included.
Get this skill · 获取本技能
Option A — one-click agent prompt (recommended). Copy this into your AI agent IDE:
Please set up the "qpcr-mtdna" skill from the Claw2Bio library for me:
1. Fetch only the folder "experiment-data/qpcr-mtdna" from the GitHub repo
https://github.com/nihuanhe/claw2bio (use sparse checkout; do not clone the whole repo).
2. Read its SKILL.md and register the skill.
3. Run the bundled example in examples/ to verify my environment, and show me the output figure.Option B — standalone zip (~0.1 MB, served from this site): https://claw2bio.site/downloads/qpcr-mtdna.zip
Option C — full example dataset: already included in the Option B package above.
What it does
Reads a raw Ct table containing ND1 Ct, ND5 Ct, B2M Ct, POLG Ct rows, computes
Mean copy number = (2^(B2M-ND1) + 2^(POLG-ND5)) / 2runs statistics (2 groups: t-test; ≥3 groups: Tukey HSD) and draws a 300-dpi bar plot:

Quick start (30 seconds)
cd experiment-data/qpcr-mtdna
pip install pandas numpy scipy matplotlib
python scripts/run_mtdna.py examples/input/mtDNA-input.csv examples/output --name Figure18B --overwriteExpected: Figure18B.csv (with ΔCt / 2^ΔCt / Mean copy number columns) and Figure18B.png. The bundled example gives P = 0.986 (ns).
Input format
Target,Sample,Rep1,Rep2,Rep3
ND1 Ct,Ctrl,15.10,14.19,14.66
ND1 Ct,Treat,14.27,14.08,14.72
ND5 Ct,Ctrl,14.25,14.64,14.47
ND5 Ct,Treat,14.88,14.93,14.87
B2M Ct,Ctrl,22.99,22.40,22.53
B2M Ct,Treat,22.62,22.73,22.27
POLG Ct,Ctrl,22.14,22.53,22.43
POLG Ct,Treat,22.80,22.00,22.48All four Target rows (ND1 Ct, ND5 Ct, B2M Ct, POLG Ct) are required.
Output files
| File | Content |
|---|---|
<name>.csv | Raw Ct + Delta Ct + 2^Delta Ct + Mean copy number |
<name>.png | 300-dpi bar plot with statistics |
Parameters
| Flag | Default | Description |
|---|---|---|
--name | — | Output file prefix |
--y-label | — | Y-axis label |
--dpi | 300 | PNG resolution |
--overwrite | off | Allow overwriting existing outputs |
Batch mode over a whole experiment folder: python scripts/batch_mtdna.py <root_dir> --overwrite.
Troubleshooting
- Missing target rows → the input must contain exactly
ND1 Ct,ND5 Ct,B2M Ct,POLG Ct(watch the trailing "Ct"). - "Output file exists" → add
--overwrite. - Why must the agent run the bundled scripts instead of writing its own? The scripts in
scripts/are the tested path — they have been run on the example data, and their edge cases are documented. Code generated on the fly by an agent is the most common source of silently wrong results. If a case is not covered, change the CLI arguments first; if that is not enough, copy a script to a scratch directory and make a minimal, reported edit; only write new code when nothing covers the task, and fold it back intoscripts/afterwards.
Links
- Source & SKILL.md on GitHub
- Related skills: qPCR mRNA · Grouped bar plot