Repository navigation
Spec 006 T103a: the analysis sizes from the graph - #930
Merged
Merged
Conversation
analysis-sizes.ts computes each pathway's totalEntity and totalEntityAndInteractors as analysis-core does, from the graph, once per species while the service runs: the tree from each top-level pathway through hasEvent, the identifiers its reactions reach by EntitiesBuilder's relationships, the interaction partners of InteractorsBuilder's targets, counted per ResourceFactory resource, subpathways included. Against Java's live eventsHierarchy for all 16 species with a hierarchy: totalEntity matches every pathway. totalEntityAndInteractors matches but for 84 pathways (76 human, 1 to 6 higher; 8 yeast, 1 higher), where analysis-core merges a partner into another interactor whose alias it is (reactome/analysis-core#13). Those are recorded with both values, and analysis-sizes-check.ts fails on any other difference or one of them gone (seen failing with one removed). Unit tests over stand-in rows, each seen failing under a mutation of the code. Research D25 corrected: the human differences reach six, not two, and yeast has eight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The check required no answer from Java: a species answering an error was skipped, its records unchecked, and a pathway only node has was never reported. It now takes the species from the graph's top-level pathways, fails on any that does not answer (seen failing with Java answering 404s), and compares both sides' pathways. - Entities and targets are read for the tree's pathways whatever their own species, as analysis-core attaches a pathway's counts wherever it sits. None differs today; all 16 species still as recorded. - The record notes that a rebuilt data file may move a Java value, since which interactor analysis-core's merge keeps depends on build order. - A test for a target in a resource that does not count (seen failing with the skip removed); the module comment's figures corrected. 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.
Ticks T103a of
specs/006-content-service-to-node/tasks.md(research D25). No endpoint yet: T103b serves/data/eventsHierarchyfrom this.What it adds:
tools/content-node/analysis-sizes.tscomputes each pathway'stotalEntityandtotalEntityAndInteractorsfrom the graph, as analysis-core builds them for the AnalysisService's data file, once per species while the service runs. The rules it follows:hasEvent;tools/content-node/analysis-sizes-check.tscompares it with Java's liveeventsHierarchy?pathwaysOnly=truefor every species with a top-level pathway. It fails on any difference outsidefixtures/analysis-size-differences.json, on a recorded difference gone, on a pathway only one side has, or on a species Java does not answer.Measured against Java, release 98, all 16 species:
totalEntitymatches every pathway.totalEntityAndInteractorsmatches except 84 pathways: 76 human, 1 to 6 higher in node, and 8 yeast, 1 higher.Checks:
🤖 Generated with Claude Code