Metadata-Version: 2.4
Name: flockbio_bioscoring
Version: 1.0.0
Summary: Flock Bio shared scoring + calibration infrastructure for transcript-design sub-pipelines.
Author: Flock Bio
License: MIT License
        
        Copyright (c) 2026 Flock Bio
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
        NOTE: The MIT license applies to the LIBRARY CODE in this repository. License
        terms for downloaded / bundled DATASETS are tracked separately in
        `LICENSES.md` per the L20 4-layer audit pattern (article + supplementary +
        deposit + cross-walk). Datasets that fail the audit are HARD BLOCKED via the
        SENTINEL_LICENSE_BLOCKED marker in their DatasetSpec entries.
        
Project-URL: Repository, https://github.com/flock-bio/bioscoring-shared-FB
Project-URL: Documentation, https://github.com/flock-bio/bioscoring-shared-FB/blob/main/docs/INTEGRATION_GUIDE.md
Project-URL: Changelog, https://github.com/flock-bio/bioscoring-shared-FB/blob/main/CHANGELOG.md
Keywords: bioinformatics,mRNA,calibration,MPRA,Flock Bio
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: LICENSES.md
Requires-Dist: numpy<3,>=1.24
Requires-Dist: scipy<2,>=1.10
Provides-Extra: calibration
Requires-Dist: pandas<3,>=2.0; extra == "calibration"
Requires-Dist: openpyxl>=3.1; extra == "calibration"
Provides-Extra: reporting
Requires-Dist: Jinja2<4,>=3.1; extra == "reporting"
Requires-Dist: matplotlib<4,>=3.7; extra == "reporting"
Provides-Extra: dev
Requires-Dist: pytest<9,>=8.0; extra == "dev"
Requires-Dist: pytest-cov>=4.1; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.8; extra == "dev"
Provides-Extra: all
Requires-Dist: flockbio_bioscoring[calibration,dev,reporting]; extra == "all"
Dynamic: license-file

# bioscoring-shared-FB

**Flock Bio shared scoring + calibration infrastructure
library** (`flockbio_bioscoring`). The 5th repo in the Flock
Bio transcript-design suite.

This library packages the common machinery used by the four
sub-pipelines + the orchestrator:

- DatasetSpec dataclass + sentinel framework for offline
  calibration runs
- License-aware download helpers with retries + EBI tier-0
  probe
- Generic FASTA / CSV / GTF parsers
- Bootstrap LODO + null-model + ship gate framework
- NNLS calibration helpers
- HTML / PDF report scaffolding (Jinja2 + matplotlib +
  Chromium)

Per the **Rule of Three** (L21 in `docs/CROSS_PIPELINE_LESSONS.md`;
canonical here since 2026-05-12, moved from codon's `docs/`),
this library is extracted from the **already-shipping** codon
+ 5'UTR + 3'UTR pipelines after they paid for the
infrastructure once each.

## Status

✅ **v0.4.0 shipped** (Sprint 4 Day 8). All three extraction
tiers are complete; the library is feature-complete for the
Sprint 4 scope. Next milestone is **v1.0.0** after the four
consumer pipelines migrate from their inline copies to the
shared lib (see `docs/CONSUMER_MIGRATION_PLAN.md` +
`docs/CONSUMER_MIGRATION_STATUS.md`).

| Tier | Sprint 4 days | Modules | Status |
|---|---|---|---|
| 1 | Days 1-3 | DatasetSpec + sentinels + download + parsers + cache + EuropePMC tier-0 | ✅ shipped (v0.1.0) |
| 2 | Days 4-5 | NNLS + ship gate + upload-success-gate + merge_artifacts + artifact_schema | ✅ shipped (v0.2.0) |
| 3 | Days 6-7 | HTML / PDF report scaffolding (style + figures + chromium_pdf + templates_loader) | ✅ shipped (v0.3.0) |

## Strategic position

| Repo | Role | Status |
|---|---|---|
| `flock-bio/codon_optimization-FB` | Codon optimization | ✅ shipping (v2.8.0) |
| `flock-bio/5utr_optimization-FB` | 5'UTR design | ✅ shipping (v2.8.24) |
| `flock-bio/3utr_optimization-FB` | 3'UTR design | ✅ shipping (v0.2.0) |
| `flock-bio/promoter_design-FB` | Tissue-specific promoter design | 📋 Sprint 8-12 |
| `flock-bio/bioscoring-shared-FB` (THIS REPO) | Shared library | ✅ v0.4.0 shipped (consumer-harmonized); 4-consumer migration in flight → v1.0.0 |
| `flock-bio/transcript_design-FB` | Orchestrator | 🟡 Sprint 13-16 (currently v0.4.1) |

## Installation

```bash
pip install flockbio_bioscoring  # once published
```

For development:

```bash
pip install -e .[dev]
PYTHONPATH=src python3 -m pytest tests/ -q
```

## Documentation

- `CLAUDE.md` — Claude Code guidance for this repo.
- `CHANGELOG.md` — chronological history of behavior changes.
- `docs/INTEGRATION_GUIDE.md` — API surface reference + recipes
  for consuming pipelines to migrate from inline copies to the
  shared library.
- `docs/CONSUMER_MIGRATION_PLAN.md` — master migration plan
  for the 4-consumer migration (binding order, per-consumer
  effort, Step 0-9 recipe).
- `docs/CONSUMER_MIGRATION_STATUS.md` — live status tracker
  for the 4-consumer migration.
- `docs/CALIBRATION_RUNBOOK_TEMPLATE.md` — template for
  consumer-side `CALIBRATION_RUNBOOK.md` (Phase D / OFFLINE
  calibration operator doc; consumers extend with pipeline
  specifics).
- `docs/CROSS_PIPELINE_LESSONS.md` — canonical strategic doc
  for the 6-repo suite (Strategic North Star + Part I L1-L21
  lessons + Part X per-pipeline kickoff guides + Part XI
  binding I/O contracts). Moved here from codon's `docs/`
  on 2026-05-12 per L21.
- `docs/CYPHERBIO_PIPELINE_PLAYBOOK.md` +
  `docs/CYPHERBIO_PLAYBOOK_v2.md` — canonical CypherBio
  packaging conventions (moved here from per-consumer copies
  on 2026-05-12 per L21).

## License

The library code is licensed under the MIT license (see
`LICENSE`). License terms for bundled / downloaded datasets
are tracked separately in `LICENSES.md` per the L20 4-layer
audit pattern (article + supplementary + deposit + cross-walk).
