5 Commits

Author SHA1 Message Date
a228a56984 fix: deduplicate gene_symbol in scoring to prevent non-canonical ID inflation
gene_universe contains 1,539 gene_symbols mapping to multiple Ensembl IDs
(3,033 excess). Non-canonical IDs lack data in some evidence tables, causing
weighted_sum/available_weight to inflate their composite scores.

Fix: after scoring SQL, keep one row per gene_symbol with the most
evidence_count (tiebreak by composite_score DESC). 22,604 → 19,555 genes.

Results: HIGH 82→4, all top 20 now have 5-6 layers with expression data.
Validation PASSED (CDH23 98.3rd percentile, median known gene 83.3%).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 10:02:32 +08:00
e2a3dc2bc8 fix: rescue gnomAD genes with non-Ensembl IDs via gene_symbol fallback
gnomAD v4.1 gene_id column is mixed: ~101K Ensembl IDs + ~111K NCBI numeric.
Now falls back to gene_symbol → gene_universe lookup for non-ENSG entries.

Coverage: 78.5% → 90.3% (17,875 → 20,555 genes with gnomAD scores).
Sufficient evidence (≥4 layers): 19,946 → 20,683 genes.
Validation median percentile: 79.9% → 81.1%.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:49:27 +08:00
fe8e13c1a1 fix: restore gnomAD and expression evidence layers for complete 6-layer scoring
Three bugs prevented gnomAD and expression data from contributing to scores:
1. gnomAD COLUMN_VARIANTS mapped "gene" (HGNC symbol) to gene_id instead of
   gene_symbol, causing JOIN miss with gene_universe (Ensembl IDs)
2. Expression HPA data was fetched but never merged (lf_hpa unused)
3. GTEx versioned Ensembl IDs (ENSG*.5) didn't match gene_universe

Results: gnomAD 78.5% coverage, expression 87.4%, 19946 genes with ≥4 layers.
HIGH tier refined from 44 → 18 candidates. Validation PASSED (CDH23 96.5th pctl).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:25:37 +08:00
b63251a996 fix: resolve JOIN explosion from duplicate gene_ids across evidence tables
- scoring/integration.py: Use CTEs with GROUP BY gene_id to deduplicate
  all evidence tables before LEFT JOIN (gnomAD had 211K rows for 18K
  genes due to per-transcript data; annotation/localization also had dupes)
- literature/transform.py: Deduplicate gene_symbols before PubMed queries
  to avoid querying the same symbol multiple times
- evidence_cmd.py: Fix Polars .alias() error in literature summary display
- Updated report results with full 6-layer scoring (44 HIGH, 7268 MEDIUM)
- Validation PASSED: known Usher genes median percentile 86.9%

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 04:48:13 +08:00
dc36730cb4 docs: update gitignore to track report results, add README cross-links
- Revised .gitignore to ignore raw data/cache but track data/report/
  (candidates TSV/Parquet, plots, reproducibility metadata)
- Added zh↔en cross-links between README.md and README.en.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 05:57:27 +08:00