# Example workflows

The application includes four deliberately separate fixture sets:

- **Counts + QC** is the compact deterministic example loaded by the desktop
  application's example button. It contains a 2,000+ guide reference, a small
  FASTQ fixture, and an 800-row count table with controlled two-subpool
  mixtures for graph verification.
- **Cutting** contains reconstructed amplicon FASTQ files and their small
  reference library. It deterministically exercises the cutting table and
  plot.
- **RealData/MageckYusaExcerpt** contains original read records from public ENA
  runs ERR376998 and ERR376999, a matching published Yusa reference subset,
  and an independently calculated expected count table. Its README records
  source URLs, archive checksums, and the reproducible extraction procedure.
- **RealData/CRISPAltRationsAADACL3** contains the public experimental
  SRR13016837 Cas9 amplicon read pair, its AADACL3 guide/reference, and the
  CC BY paper's independently analyzed 5,078-read allele oracle. Its
  `DerivedCutting10Percent` fixture is exactly 90% untouched joined public
  records and 10% duplicated intact variants observed in the same run. It
  provides a realistic passing Cutting workflow without changing the legacy
  algorithm or claiming a new biological result.
- **RealData/AdvancedValidation** reuses the public Yusa sequences and counts
  to validate demultiplexing mismatch levels, every distance-clustering pair,
  and every STARS score/rank. Advanced Alignment runs directly against the
  unmodified `MageckYusaExcerpt` FASTQs and expected count table.

The deterministic fixtures make fast UI demonstrations reliable. The public
fixture checks that Counts and Check Rep return correct values on independently
sourced sequencing data. The examples are copied beside development and
published builds, and tests call the same public services used by the UI.

## Verification matrix

| Operation | Input oracle | What is checked |
| --- | --- | --- |
| FASTQ + Counts | Public ERR376998/ERR376999 reads and Yusa guides | Every guide/sample count equals the independently extracted count table |
| Check Rep | Controlled 800-row, two-subpool count table | Exact totals, mixture boundaries, representation coordinates, and PNG dimensions |
| Cutting | Labeled amplicon reads and `ExpectedCuttingResults.txt` | Guide choice, category totals/fractions, delimiters, and stacked-plot coordinates |
| FASTQ utilities | Known compressed and paired sequences | Decompressed bytes and joined sequence/quality lines are exact |
| Scientific Cutting benchmark | Public SRR13016837 reads and CRISPAltRations Data S1 | Source hashes, 5,846 raw/joined records, 140 exact-guide joined reads, and the published 5,078-read outcome oracle |
| Real-sequence Cutting workflow | 90% untouched SRR13016837 joined records plus observed intact variants at 10% | Fixture hashes, exact record composition, inferred anchors, legacy category totals/fractions, and PNG output |
| Demultiplexing | Public Yusa read bodies with controlled real-guide terminal barcodes | Exact assignments for allowances 0–5, ambiguous ties remain unassigned, and record sequence/quality are preserved |
| Distance clustering | All 64 public Yusa guide sequences | Inner and outer distances for all 2,016 pairs equal an independent word-pair oracle |
| STARS | All 128 public Yusa sample counts, grouped only to exercise the retained within-group math | Every normalized value, difference, rank, score, and score rank equals an independent oracle |
| Advanced Alignment | Unmodified public ERR376998/ERR376999 reads and 64 Yusa guides | All 128 guide/sample counts equal the independently extracted count table |
