Repository navigation
Add cross-species candidates and evidence cards: aree build-cross-species-cards (WP6) - #68
Merged
Merged
Conversation
…cies-cards (WP6) Tiers orthogroup-level results behind five named gates (replication, direction, significance, phenotype relevance, quality) into cross_species_convergence / emerging / discordant / unsupported, with a transparent weighted score and a between-species I-squared penalty. Cards show every species side by side. Single-species cards now name their orthogroup. Fixes the dashboard pool summary reading orthogroup results as gene-level pools. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ity per species On the first real oyster-clam pool (5,681 single-copy orthogroups), 2,880 of 2,886 sign disagreements involved a non-significant species, and the union of quality flags across species failed the quality gate for every row. Discordant now requires species each significant at gene level with opposite signs; other sign disagreements are unsupported. Quality is the weakest species' own gene-level quality. Docs record the first real cross-species results. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WP6 of
docs/mussel_clam_integration_plan.md: cross-species candidates and evidence cards that show every species side by side. The dashboard gate is the remaining WP6 item.What it adds
aree build-cross-species-cards [--phenotype] [--feature-type] [--max-adjusted-p] [--all-cards] [--include-multi-copy]runs the orthogroup-level meta-analysis (#58), then tiers and scores every row. Hard gates come first and the score second, as for single-species candidates.cross_species_convergencecross_species_emerginggates_failed)cross_species_discordantcross_species_unsupportedThe score is a transparent weighted sum that adds to 100, with a between-species I² penalty of up to 15 points. The weakest species' study count carries the most weight.
Outputs go to
reports/evidence_cards/cross_species/:candidates.tsvwith every row and its components,index.json, and a card per row with a significant pooled or per-species signal. A card shows, for each species, the gene, original IDs, studies, tissue, life stage, stressor, n, effect with 95% CI and gene-level adjusted p. It then shows the pooled estimate, the between-species heterogeneity, the orthogroup run (or "demo crosswalk, illustrative"), the failed gates, design-confounding warnings, limitations and a next step.Also in this PR:
*_orthogroup_meta_analysis.tsvas a gene-level pool, which lacksk_studies, so the dashboard build would crash after any orthogroup run. A regression test covers it.Results
603 cards are rendered. Every emerging row fails three gates. Replication fails because there is one clam study. Phenotype relevance fails because the clam comparison is exposure-only. Quality fails because each species' own flags exceed the limit, just as they do for its single-species candidates. PERUZZA2023_HEATWAVE (#64) is the second clam study, which can bring the clam to k = 2.
Two rules changed after seeing real data
directionstill listed ingates_failed.Checks
ruff check src tests: clean.pytest: 606 passed, 2 skipped, on the branch merged with current main.tests/test_cross_species_candidates.pycover each tier, the named gates, per-species quality, the noise-versus-reversal rule, score reproducibility and the heterogeneity penalty, the card contents, the demo CLI end to end, orthogroup names on single-species cards, and the dashboard regression.Docs updated:
interpreting_candidate_scores.md(new "Cross-species candidates" section),interpreting_meta_analysis.md,mussel_clam_integration_plan.md(WP6 status),implementation_status.md, andREADME.md(command table).🤖 Generated with Claude Code