# LGASieve project status — 2026-07-31

## Decision

Exon-level BRCA1/2 deletion and duplication detection has been implemented
successfully in specifically designed and locally validated NGS workflows.
That feasibility is assay-, laboratory-, and pipeline-specific.

LGASieve is now a workable **research software scaffold for assay
development**. It is not ready for patient reporting.

- **PROCEED:** retrospective, assay-specific software development with complete
  count data and orthogonal truth.
- **HOLD:** prospective clinical validation, patient reporting, autonomous
  interpretation, or a claim of clinical sensitivity/specificity.
- **REFLEX:** every research flag requires confirmation by an independently
  designed dosage method.
- **DO NOT CALL NEGATIVE:** absence of a research flag does not establish
  absence of a BRCA large genomic alteration.

The public, biologist-facing website is the primary readable report:

**https://lgasieve-scientific-review.free-washington.chatgpt.site/**

Publication checks passed:

- production deployment succeeded;
- a direct unauthenticated request returned HTTP 200;
- an independent external fetch node returned HTTP 200 and found the headline
  and critical 47.5% stress result;
- `/og.png` returned HTTP 200 as `image/png`;
- the production page rendered in a browser with its key sections and no
  production console errors.

The earlier
`analysis/LGASieve_clinical_screen_report_v2_2026-07-31.html` and its favorable
98–100% headline simulation cards are superseded. They remain only as audit
history.

## What the project is about

LGASieve attempts to find exon-level deletions and duplications in BRCA1 and
BRCA2 from targeted sequencing. Two related development paths are preserved:

1. a BRCA-only matched-reference conditional-count model for the truncated
   supplied export; and
2. a broad-panel, control-anchored model intended for a complete assay-wide
   count matrix.

The first path can study the information limit of the available data. The
second is the route that could support a future assay-specific validation.

## Major defects found and corrected

### 1. A candidate could influence its own baseline

The old BRCA-only likelihood path allowed the candidate window to influence
reference matching and nuisance estimation. In an injected-event experiment,
the old reference set changed in 98.76% of deletion tests and 96.57% of
duplication tests.

Correction:

- exclude the exact candidate window before selecting references or fitting
  neutral fraction/overdispersion;
- bind the scored window to that excluded fit;
- use one ordered, target-ID-qualified hypothesis family.

This correction does not remove PCR duplicates. Candidate exclusion prevents a
candidate from changing its baseline; duplicate removal determines how many
independent molecules support the measurement. Both are required.

### 2. The broad-panel calibration cohort trained on itself

The former broad model used calibration rows to estimate their own residual
centre, target dispersion, callability, covariance, and threshold. A future
case was therefore not exchangeable with the calibration samples.

Correction:

- all nuisance quantities are learned from `fit_counts` only;
- the untouched calibration cohort only scores the frozen model;
- one maximum across DEL, DUP, and every reportable window sets the empirical
  family threshold.

### 3. The empirical alpha check was mathematically wrong

The former implementation split alpha across window widths but accepted a
cohort too small to resolve the resulting tail probability.

Correction:

- use one joint search family;
- require at least `ceil(1 / alpha) - 1` calibration libraries;
- fail model fitting if the requested family error rate cannot be attained.

### 4. Uncallable gaps could be bridged

The former model could describe a continuous event across an excluded target.

Correction:

- build windows only inside uninterrupted callable, reportable runs;
- uncallable or non-reportable gaps split the event family.

### 5. Model files and cohorts lacked a strict identity contract

Correction:

- schema upgraded to `lgasieve.anchored-clinical-depth-screen.v2`;
- version-1 artifacts are refused and must be refitted;
- fit/calibration sample-ID overlap and identical count rows are rejected;
- strict dimensions, numeric types, thresholds, masks, windows, and provenance
  hashes are checked when loading;
- model writes are atomic.

### 6. Output language overstated what the model knew

Correction:

- `REFLEX_POSITIVE`: research candidate requiring independent confirmation;
- `NO_REFLEX_FLAG`: no referral flag from the frozen research model, not a
  clinical negative;
- `NO_CANDIDATE_PARTIAL_COVERAGE`: no flag with incomplete target coverage;
- `NO_CALL_QC`: sample-level QC failure.

The claims boundary is embedded in every result.

### 7. The old simulation was an inverse problem

The old “locked validation” changed random seeds but reused the same assay,
latent structure, event universe, and exact copy-ratio generator. It also
clipped truth to callable targets and emphasized completed cases.

Correction:

- preserve full truth without clipping;
- report trigger, 80% reciprocal overlap, exact endpoints, and exact target
  sets separately;
- report intention-to-test and completed denominators separately;
- call negative-sample outcomes referral/no-referral rates, not specificity;
- add a genuinely changed assay with aligned target IDs but altered target
  efficiency, latent loadings, and instability;
- label the independent dosage stream as workflow-logic simulation only.

## Real supplied-data rerun: old versus corrected

Input:

- 150 public 1000 Genomes exome evidence bundles;
- a 50-target BRCA1/2 count matrix;
- 46 globally usable targets;
- no stable off-gene normalization domain;
- no MLPA/aCGH-confirmed positives or verified negatives.

The constrained BRCA1↔BRCA2 fallback was rerun after the v2 correction.

| Outcome on 150 evidence bundles | Previous model | Corrected v2 |
| --- | ---: | ---: |
| Unadjudicated research flags | 6 | 5 |
| Sample QC no-calls | 3 | 21 |
| Partial-coverage/no-candidate | 141 | 124 |

Only two previous flags were retained (`NA18645`, `NA20530`). Four disappeared,
and three new flags appeared.

Corrected v2 research flags:

- `HG01870`: BRCA2 duplication-like, exons 23–24
- `HG02601`: BRCA1 deletion-like, exon 6; BRCA2 duplication-like,
  exons 17–18
- `NA18645`: BRCA2 deletion-like, exons 16–17
- `NA19759`: BRCA2 deletion-like, exon 2
- `NA20530`: BRCA1 duplication-like, exons 15–22

These are unadjudicated referral hypotheses, not diagnoses. The correction-
induced turnover is evidence against autonomous interpretation.

On 2,400 deterministic conditional spike-ins placed on the 37 development
backgrounds, corrected completed-case recovery was 59.66% overall, 35.18% for
single-exon events, 80.63% for deletions, and 37.70% for duplications. There
were 211 positive no-calls. Three of 33 completed presumed-negative libraries
were referred. These are internal development measurements, not clinical
sensitivity or specificity.

Artifact:

- `analysis/cross_gene_reflex_reanalysis_v2.json`
- `analysis/cross_gene_reflex_model_v2_brca1.json`
- `analysis/cross_gene_reflex_model_v2_brca2.json`

## Candidate-exclusion experiment on the real backgrounds

With the same 37 host libraries, 259 windows, seeds, and endpoints:

| Paired development endpoint | Event-contaminated nuisance fit | Candidate-excluded |
| --- | ---: | ---: |
| Exact-window recovery | 41.84% | 44.78% |
| Deletion recovery | 55.16% | 68.06% |
| Duplication recovery | 28.53% | 21.51% |
| Presumed-negative libraries without a flag | 33/37 | 35/37 |

Candidate exclusion is retained because it removes a structural bias. It is
not presented as a universal sensitivity improvement: deletion recovery rose,
duplication recovery fell, and the available export still lacks the
information needed for a clinically useful operating point.

Other one-change tests:

- one joint DEL+DUP search at alpha 0.05: 38.54% exact-window recovery;
- calibration-only reference-count selection chose `k=10`, with no improvement
  over the development result;
- direct log2 scoring recovered only 0.82% of single-exon duplications at alpha
  0.05;
- same-superpopulation matching reduced recovery to 19.16%.

The failed branches are preserved as evidence and were not promoted.

## Corrected synthetic software verification

The full v2 simulation uses 500 synthetic controls plus 50 BRCA bins, 1,300
fit normals, 3,000 untouched calibration normals, and a selected 12-component,
alpha 0.01 model. These are simulator settings, not assay acceptance criteria.

### Review first: transport and stress

- **Changed assay:** all 2,400 event samples and all 1,200 no-event samples
  failed sample QC. Completion and ITT recovery were 0%. This is safe refusal
  and demonstrates that the model is not transportable; the changed assay must
  be refit and recalibrated.
- **Within-assay low-depth/site/mosaic stress:** 1,325/2,400 events completed
  (55.21%); ITT 80%-reciprocal-overlap recovery was 47.50%; exact-endpoint ITT
  recovery was 45.92%; the referral rate among 806 completed synthetic
  no-event samples was 3.97%.

### Same-generator software check

- 3,299/4,000 events completed (82.48%);
- any referral trigger: 96.73% ITT;
- 80%-reciprocal-overlap: 83.00% ITT and 98.88% among completed events;
- exact endpoints and exact target set: 81.55% ITT;
- no-referral rate: 97.40% ITT and 97.38% among completed no-event samples.

The 98.88% conditional result is not clinical sensitivity. It is a
same-generator software-verification result after excluding incomplete events.

Artifacts:

- `analysis/clinical_panel_simulation_final.json`
- `analysis/anchored_clinical_depth_model_final.json`

## What “adequate coverage” means

There is no universal read-depth cutoff.

Coverage is adequate only when:

1. the input represents enough independent fragments or UMI families;
2. the target is stable, uniquely mappable, and sufficiently recovered;
3. the case is compatible with its assay-, chemistry-, and batch-matched
   reference;
4. observed variance separates CN1, CN2, and CN3 at the declared error rate;
5. failed exons and samples become explicit no-calls.

Nominal depth is not independent molecular depth. PCR duplicates, library
complexity, molecular recovery, UMI handling, and target efficiency must be
measured empirically.

## What published assays demonstrate

Published implementations support feasibility, not transferability:

- [DECoN](https://pmc.ncbi.nlm.nih.gov/articles/PMC5409526/) detected 16/16
  known BRCA CNVs, including eight single-exon events; 23/24 later clinical
  flags were MLPA-confirmed. Screen-negative clinical specimens were not all
  orthogonally tested.
- [Counsyl BRCA1/2](https://pubmed.ncbi.nlm.nih.gov/27375968/) demonstrated a
  purpose-built BRCA-only assay with invariant-set normalization in a
  114-sample validation.
- [Quest 34-gene panel](https://pubmed.ncbi.nlm.nih.gov/32090079/) used a large
  assay-specific baseline and reflex aCGH for every NGS CNV flag.
- [SeqNext six-gene workflow](https://doi.org/10.1016/j.jmoldx.2017.07.003)
  evaluated 48 MLPA-positive families representing 18 BRCA CNV types and 120
  MLPA-negative patients.

These studies do not validate LGASieve’s PCA/OAS matched-filter/conformal
algorithm, component count, control threshold, or decision cutoff.

## Remaining work before real assay development

1. Reacquire complete assay-wide counts or BAM/CRAM/FASTQ, capture BED, genome
   build, transcript, and batch/kit/lot/run metadata.
2. Add explicit invariant-control/ignore/reportable target roles.
3. Add sample-specific failed-target masks and an end-to-end locked
   unique-fragment or UMI count extractor.
4. Assemble orthogonally characterized BRCA1/2 deletions and duplications,
   including single-, multi-exon, terminal, promoter, and whole-gene classes.
5. Freeze code, manifest, masks, thresholds, and analysis plan before an
   independent validation.
6. Retain every no-call in intention-to-test denominators and adjudicate every
   referral with an independent method.
7. Compare the locked caller with DECoN/ExomeDepth, GATK-gCNV,
   panelcn.MOPS, and a transparent dosage baseline on identical folds.

## Software and verification

Main corrected modules:

- `lgasieve/countmodel.py`
- `lgasieve/countscreen.py`
- `lgasieve/clinical_depth.py`
- `lgasieve/clinical_depth_cli.py`

Main regression tests:

- `tests/test_countmodel.py`
- `tests/test_countscreen.py`
- `tests/test_clinical_depth.py`
- `tests/test_clinical_panel_simulation.py`

Focused verification completed:

- 32 count-model/count-screen/clinical-depth tests passed;
- 18 clinical-depth/simulation tests passed;
- corrected full synthetic verification completed deterministically;
- both corrected cross-gene v2 model files reload through the strict parser.

Full-repository verification:

- **162 tests passed, 3 skipped, and 7 subtests passed in 45.97 seconds.**
- The three skips require real sequencing libraries that are not present in
  the reconstructed source.
- The only warning was a harmless CPU-core-count fallback from `joblib`.

## Source preservation and artifact roles

- Dropbox source:
  `https://www.dropbox.com/home/Yang%20Shao/Personal/Codexhome/Bioinformatics/lgasieve`
- `SOURCE_MANIFEST.json` records the reconstructed source archives and hashes.
- No source BAM, CRAM, FASTQ, BAI, BED, VCF, sequencing manifest, or orthogonal
  BRCA dosage truth was recovered from the archives.
- Markdown files are the durable project notebook for reviewers.
- JSON files are machine-readable model, provenance, and result artifacts.
- The public website is the human-readable scientific report for a biologist.
