Skip to content

Merged genes: document why counts are summed, add check_merged_genes.py - #128

Merged
Clare72 merged 2 commits into
mainfrom
merged-genes-note
Nov 10, 2026
Merged

Clare72 merged 2 commits into
mainfrom
merged-genes-note

Conversation

@Clare72

@Clare72 Clare72 commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Explains in DESIGN.md's gene-id rules why summing the counts of merged genes is safe here: count pipelines assign each read to at most one gene. vfb-EPseq-ontology (VirtualFlyBrain/vfb-EPseq-ontology#2) works from bulk TPM, where overlapping models get identical rows. There, identical rows count once and merges with differing rows are dropped.

Adds scripts/check_merged_genes.py (--project / --all). It reads each project's matrices as build_expression.py does and compares the input genes behind each merged gene cell by cell. It fails on a pair with expression and identical values. It is not in CI, since it needs the matrices in .cache. It is now a build step (DESIGN.md, README) and in the commands of the FlyBase release issue.

All 17 projects pass at FB2026_03. No merged pair has identical values in any cell with expression, and the pairs whose models overlap completely (CG30497 / CG45093, stg1 / CG11566) are zero in every cell.

Tests: tests/test_check_merged_genes.py; test_ci_checks.py updated for the issue text.

🤖 Generated with Claude Code

Clare72 and others added 2 commits November 10, 2026 21:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compares each merged gene's input genes cell by cell, reading the matrices
as build_expression.py does; fails on identical values with expression.
Added to the build steps and the FlyBase release issue's commands.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Clare72 Clare72 changed the title DESIGN: why merged genes are summed (and not in EPseq) Merged genes: document why counts are summed, add check_merged_genes.py Nov 10, 2026
@Clare72
Clare72 merged commit db08f24 into main Nov 10, 2026
1 check passed
@Clare72
Clare72 deleted the merged-genes-note branch November 10, 2026 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant