这是什么
记录转录组、基因组等生物信息分析任务的完整执行过程。一条轨迹从英文任务说明开始,逐步保存调用的工具、执行的命令或编辑操作、输出摘要和执行者的阶段说明,直到最终结果,可以回放复现。
每条轨迹带一组元数据:任务类型、领域、执行状态、所用工具链、语言和耗时。失败的步骤不删除,测试报错、修改代码、重新运行直到通过的全过程都留在轨迹里。最终结果写明观察到的数值、所用依据、测试情况和保存了哪些文件。
输入取自公开的参考序列与注释文件。任务要求本身带有检验:正反两类测试、在单独副本上人为改动的对照,以及原始输入是否保持不变的校验。
长什么样
样本是一条执行成功的轨迹:对酿酒酵母 S288C 第 1 号染色体的参考序列与注释做编码序列翻译一致性审计。轨迹里能看到 97 行编码序列归入 94 个父节点的判断;第 7 步测试报错,修复代码后 15 项测试通过;第 10 步又有一项失败,修正测试用例后 16 项全部通过。最终结果表列出两条提取路线 94/94 一致,内部终止密码子为 0,耗时约 1508 秒。
看数据
JSON
{
"task_type": "bioinfo_analysis",
"domain": "biogene",
"execution_status": "success",
"toolchain": "biopython,pyfaidx,gffutils",
"language": "en",
"duration_seconds": 1507.564,
"task": "Spliced CDS translation consistency audit
Audit CDS extraction and translation from the supplied Saccharomyces cerevisiae S288C chromosome I reference and GFF3 annotations. Group CDS parts by their actual parent relations, order parts by transcription strand, account for GFF3 phase and explicitly flagged partial or exceptional features, and translate using the appropriate nuclear genetic code stated in the annotation or a clearly justified default. Independently compare a gffutils/pyfaidx extraction route with a separate GFF-row/Biopython route. Report agreement, non-multiple-of-three lengths, internal stops, absent start/stop codons, and partial/exceptional cases separately; do not change annotations to force agreement or claim every partial feature is defective. Include positive and negative tests for strand order, phase boundaries and an intentionally changed base in a separate test copy. Save the program, per-CDS audit table, tests, and a summary report. The task is reference-annotation validation, not sequence design.
",
"steps": [
{
"step": 1,
"tool": "run_commands",
"command": "",
"output_excerpt": "3.12.13 (main, Jun 23 2026, 15:44:24) [Clang 22.1.3 ]
{'biopython': '1.88', 'gffutils': '0.14', 'pyfaidx': '0.9.0.4'}"
},
{
"step": 2,
"tool": "run_commands",
"command": "from collections import Counter,defaultdict
from urllib.parse import unquote
from pathlib import Path
import hashlib,json
p=Path('input/yeast_chrI_NC_001133.9.gff3')
counts=Counter(); keys=defaultdict(Counter); groups=defaultdict(list); phases=Counter(); flags=[]
for n,line in enumerate(p.read_text().splitlines(),1):
if not line or line.startswith('#'): continue
c=line.split('\\t'); a={k:[unquote(x) for x in v.split(',')] for k,v in (x.split('=',1) for x in c[8].split(';'))}
counts[c[2]]+=1
for k in a: keys[c[2]][k]+=1
if c[2]=='CDS':
phases[c[7]]+=1
for parent in a.get('Parent',['ORPHAN']): groups[parent].append((n,c[3:8],a.get('ID'),a.get('locus_tag')))
if set(a)&{'exception','transl_except','transl_table','pseudo','pseudogene','ribosomal_slippage'} or (c[2]=='CDS' and 'partial' in a): flags.append((n,c[2],c[3:8],{k:v for k,v in a.items() if k not in ['Note','experiment','Dbxref','product']}))
print('counts',dict(counts));print('CDS attribute keys',dict(keys['CDS']));print('phases',dict(phases));print('CDS parents',len(groups));print('multipart',json.dumps({k:v for k,v in groups.items() if len(v)>1},indent=2));print('flags',json.dumps(flags,indent=2))
print('partial by feature type',{k:v['partial'] for k,v in keys.items()});print('hashes',{f.name:hashlib.sha256(f.read_bytes()).hexdigest() for f in Path('input').iterdir() if f.is_file()})
PY",
"output_excerpt": "counts {'region': 1, 'telomere': 2, 'origin_of_replication': 11, 'gene': 100, 'mRNA': 95, 'exon': 106, 'CDS': 97, 'long_terminal_repeat': 9, 'regulatory_region': 1, 'ncRNA': 1, 'tRNA': 4, 'snoRNA': 1, 'centromere': 4, 'mobile_genetic_element': 1, 'pseudogene': 1}
phases {'0': 95, '1': 1, '2': 1}
CDS parents 94"
},
{
"step": 3,
"tool": "agent_note",
"text": "The annotation has 97 CDS rows under 94 direct parents, including three multipart CDSs. All 94 coding transcripts and their genes are flagged partial, but none of the CDS rows are; I’ll report that distinction without treating parent-level partiality as a CDS defect.
No `transl_table` is stated. I’ll use standard nuclear code 1 for S. cerevisiae chromosome I, not the yeast mitochondrial code. For spliced CDSs, internal phase values will be checked at exon boundaries—not used to delete bases that complete a codon across the splice.
"
},
{
"step": 4,
"tool": "editor",
"action": "create audit_cds.py",
"content_head": "#!/usr/bin/env python3
\"\"\"Parent-aware, two-route CDS validation; never repairs the input annotation.
Route A: gffutils relations, pyfaidx oriented slices, explicit codon lookup.
Route B: independent GFF3 rows/Parent graph, SeqIO/Seq slices and translation.
Shared code is limited to metadata policy, comparison, and reporting.
\"\"\"",
"output_excerpt": "File created successfully"
},
{
"step": 5,
"tool": "run_commands",
"command": "import audit_cds as a
x=a.route_gffutils(a.DEFAULT_FASTA,a.DEFAULT_GFF,a.ROOT/'results/work')
y=a.route_biopython(a.DEFAULT_FASTA,a.DEFAULT_GFF)
r=a.audit_rows(x,y)
print(a.summarize(r,a.DEFAULT_GFF)['metrics'])
print('disagreements',[(v['parent_id'], {k:v[k] for k in v if k.endswith('agree') or k.endswith('agrees')}) for v in r if not v['all_routes_agree']])
PY",
"output_excerpt": "{'cds_groups': 94, 'cds_rows': 97, 'multipart_groups': 3, 'plus_strand': 49, 'minus_strand': 45, 'all_routes_agree': 94, 'spliced_nt_agrees': 94, 'translation_agrees': 94, 'raw_non_multiple_of_three': 0, 'coding_non_multiple_of_three': 0, 'groups_with_internal_stops': 0, 'internal_stops': 0, 'absent_start': 0, 'absent_stop': 0, 'canonical_ATG': 94, 'phase_boundary_mismatches': 0, 'checked_internal_boundaries': 3, 'nonzero_initial_phase': 0, 'direct_CDS_partial': 0, 'ancestor_partial': 94, 'partial_context': 94, 'exceptional_CDS': 0, 'overlapping_groups': 0, 'ambiguous_base_groups': 0, 'groups_with_sequence_findings': 0}
disagreements []"
},
{
"step": 6,
"tool": "agent_note",
"text": "The first full comparison agrees for all 94 CDS groups at both nucleotide and amino-acid levels. All have ATG starts and in-frame terminal stops; none has an internal stop, a length remainder, or an inconsistent splice-boundary phase.
I’m now testing those results against wrong strand order, incorrect phase trimming, and a one-base change in a separate reference copy. The changed-base test will also check that agreement between routes does not hide a newly introduced sequence finding.
"
},
{
"step": 7,
"tool": "run_commands",
"command": "chmod +x run.sh; ./run.sh",
"output_excerpt": "[Command exited with code 1]
ERROR: test_negative_invalid_structure (test_audit.AuditTests.test_negative_invalid_structure) (case=3)
AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'?
Ran 15 tests in 0.307s
FAILED (errors=1)"
},
{
"step": 8,
"tool": "editor",
"action": "edit audit_cds.py: route_gffutils",
"new_text": "def route_gffutils(fasta, gff, work):
\"\"\"Use database direct-parent relations, not name or protein-ID heuristics.\"\"\"
work = Path(work)
work.mkdir(parents=True, exist_ok=True)
def validate_feature(feature):
# Reject invalid coordinates before gffutils computes SQLite genomic bins.
if feature.start is None or feature.end is None or not 1 <= feature.start <= feature.end:
raise ValueError(f\"Invalid GFF coordinates on {feature.id}\")
return feature
db = gffutils.create_db(str(gff), dbfn=str(work / \"annotation.sqlite\"),
force=True, keep_order=True, merge_strategy=\"create_unique\",
transform=validate_feature,
disable_infer_genes=True, disable_infer_transcripts=True)"
},
{
"step": 9,
"tool": "run_commands",
"command": "./run.sh",
"output_excerpt": "Ran 15 tests in 0.278s
OK
Tests: passed; inputs unchanged: True"
},
{
"step": 10,
"tool": "run_commands",
"command": "./run.sh",
"output_excerpt": "[Command exited with code 1]
FAIL: test_ambiguous_bases_are_reported_not_hidden (test_audit.AuditTests.test_ambiguous_bases_are_reported_not_hidden)
AssertionError: 'MBZXA*' != 'MBZJA*'
Ran 16 tests in 0.259s
FAILED (failures=1)"
},
{
"step": 11,
"tool": "editor",
"action": "edit tests/test_audit.py",
"old_text": "self.fixture(sequence=\"ATGRAYSAAMTNGCNTAA\", first_length=4)",
"new_text": "self.fixture(sequence=\"ATGRAYSAAMTHGCNTAA\", first_length=4)"
},
{
"step": 12,
"tool": "run_commands",
"command": "./run.sh",
"output_excerpt": "Ran 16 tests in 0.296s
OK
Tests: passed; inputs unchanged: True"
}
],
"final_result": "Completed the audit and saved all requested outputs.
### Observed results
| Check | Result |
|---|---:|
| CDS rows / parent groups | 97 / 94 |
| Multipart CDS groups | 3 |
| Nucleotide and translation agreement | **94/94** |
| Non-multiple-of-three CDS lengths | 0 |
| Internal stops | 0 |
| Absent start / terminal stop codons | 0 / 0 |
| Inconsistent splice-boundary phases | 0 |
Used **standard nuclear genetic code 1**, justified because this is S. cerevisiae nuclear chromosome I and no `transl_table` is specified.
All 94 coding genes/transcripts carry partial flags, but their CDS rows do not. These flags are reported separately—not interpreted as evidence that the CDSs are defective. The explicitly pseudogenic **YAR061W** has no CDS and is listed separately.
### Tests and integrity
- **16 tests passed**, including 26 parameterized subtests covering strand order, phase boundaries, partial features, and negative controls.
- A one-base change in a **separate reference copy** created an internal stop at EFB1 codon 10; the audit detected it.
- Original inputs remain byte-identical to their supplied checksums.
- A second complete run produced byte-identical principal outputs.
### Saved files
- [Summary report](report.md) and [structured report](report.json)
- [Per-CDS audit table](results/cds_audit.tsv)
- [Audit program](audit_cds.py)
- [Tests](tests/test_audit.py) and [test results](results/tests.json)
- [Rerun script](run.sh)
- [README and output conventions](README.md)
Recompute from this workspace with:
```sh
./run.sh
```
The reports document limitations: route agreement validates extraction/translation consistency, not biological function or agreement with an external protein reference."
}步骤表
| 步骤 | 工具 | 命令或操作 | 结果摘要 |
|---|---|---|---|
| 3 | agent_note | (说明) | The annotation has 97 CDS rows under 94 direct parents, including three multipart CDSs. All 94 coding transcripts and their genes are flagged partial, but none of the CDS rows are; I’ll report that distinction without treating parent-level partiality as a CDS defect. No `transl_table` is stated. I’ll use standard nuclear code 1 for S. cerevisiae chromosome I, not the yeast mitochondrial code. For spliced CDSs, internal phase values will be checked at exon boundaries—not used to delete bases that complete a codon across the splice. |
| 4 | editor | create audit_cds.py | File created successfully |
| 6 | agent_note | (说明) | The first full comparison agrees for all 94 CDS groups at both nucleotide and amino-acid levels. All have ATG starts and in-frame terminal stops; none has an internal stop, a length remainder, or an inconsistent splice-boundary phase. I’m now testing those results against wrong strand order, incorrect phase trimming, and a one-base change in a separate reference copy. The changed-base test will also check that agreement between routes does not hide a newly introduced sequence finding. |
| 7 | run_commands | chmod +x run.sh; ./run.sh | [Command exited with code 1] ERROR: test_negative_invalid_structure (test_audit.AuditTests.test_negative_invalid_structure) (case=3) AttributeError: 'str' object has no attribute 'decode'. Did you mean: 'encode'? Ran 15 tests in 0.307s FAILED (errors=1) |
| 8 | editor | edit audit_cds.py: route_gffutils | def route_gffutils(fasta, gff, work): |
| 9 | run_commands | ./run.sh | Ran 15 tests in 0.278s OK Tests: passed; inputs unchanged: True |
| 10 | run_commands | ./run.sh | [Command exited with code 1] FAIL: test_ambiguous_bases_are_reported_not_hidden (test_audit.AuditTests.test_ambiguous_bases_are_reported_not_hidden) AssertionError: 'MBZXA*' != 'MBZJA*' Ran 16 tests in 0.259s FAILED (failures=1) |
| 11 | editor | edit tests/test_audit.py | self.fixture(sequence="ATGRAYSAAMTNGCNTAA", first_length=4) → self.fixture(sequence="ATGRAYSAAMTHGCNTAA", first_length=4) |
| 12 | run_commands | ./run.sh | Ran 16 tests in 0.296s OK Tests: passed; inputs unchanged: True |
修复代码
python
def route_gffutils(fasta, gff, work):
"""Use database direct-parent relations, not name or protein-ID heuristics."""
work = Path(work)
work.mkdir(parents=True, exist_ok=True)
def validate_feature(feature):
# Reject invalid coordinates before gffutils computes SQLite genomic bins.
if feature.start is None or feature.end is None or not 1 <= feature.start <= feature.end:
raise ValueError(f"Invalid GFF coordinates on {feature.id}")
return feature
db = gffutils.create_db(str(gff), dbfn=str(work / "annotation.sqlite"),
force=True, keep_order=True, merge_strategy="create_unique",
transform=validate_feature,
disable_infer_genes=True, disable_infer_transcripts=True)酵母公开参考基因组注释审计轨迹
内容与字段
- 领域
- 医疗真实世界
- 类别
- F 评测与智能体环境
- 形态
- 数据集
- 样本获取
- 可提供
页内展示的是样本预览;完整样本按“样本获取”一栏的方式提供。
组学类型
当前 2 个
- 转录组
- 基因组
持续增加
- 01
说明
工作 目标 提供任务或研究问题、所需资料、使用阶段与预期交付格式。
- 02
核对
样本 与 条件 确认来源、使用范围、内容覆盖、版本与缺失,区分已有材料和需加工的部分。
- 03
约定
试制 与 接收 按项目确认批次、质量检查、验收方式与交付安排。
相关伙伴与机构

