1.8 KiB
Executable File
1.8 KiB
Executable File
Task 2 — Reference-bundle ID evidence schema
Goal
Expose numeric NCBI GeneID as explicit reference-bundle evidence without changing the existing LOC-style gene_id meaning.
Allowed files
- Modify
apps/web/pipeline_backend.pyonly around_fasta_header_index()and_build_reference_bundle_id_map(). - Modify
tests/unit/test_pipeline_backend_execution_env.pyfor focused regression coverage. - Update
.superpowers/sdd/task-2-report.mdwith RED/GREEN evidence.
Do not change PPI querying, ortholog logic, frontend behavior, canonical IDs, or other stages in this task.
Required behavior
- Parse numeric GeneID from FASTA header metadata matching
[db_xref=GeneID:<digits>]. - Add
ncbi_gene_idto_fasta_header_index()records. - Add
ncbi_gene_idto the generatedpep_cds_idmap.tsvschema. - Preserve existing
gene_id=LOC...behavior and all existing column semantics. - Add manifest
id_validationcounts only if useful and directly covered by tests. - Missing numeric GeneID should be represented deterministically without breaking legacy bundles.
TDD evidence
- Add a test where CDS header contains both
gene=LOC110806180anddb_xref=GeneID:110806180. - Assert TSV retains
gene_id == LOC110806180and addsncbi_gene_id == 110806180. - Run the focused test before production edits and record the expected RED.
- Implement the smallest schema/parsing change.
- Run:
/home/xia-lab/miniconda3/envs/test4py311/bin/python -m pytest tests/unit/test_pipeline_backend_execution_env.py -k 'reference_bundle or ppi' -q - Run syntax compilation for the changed production file.
Review checkpoint
The workspace has no functional Git repository. Baseline copies are stored under /tmp/ppi-id-resolution-task2-baseline/; reviewers compare those copies with current files and inspect the full focused diff.