Skip to content

Find an interaction partner by its primary identifier, not another protein's alias - #14

Closed
adamjohnwright wants to merge 1 commit into
mainfrom
fix/interactor-alias-merge
Closed

adamjohnwright wants to merge 1 commit into
mainfrom
fix/interactor-alias-merge

Conversation

@adamjohnwright

Copy link
Copy Markdown
Contributor

Fixes #13.

Change

  • InteractorNodes (new, package-private): creates each interactor once per primary identifier per resource, keyed as IdentifiersMap keys it (trimmed, upper-cased). It still records gene names and secondary identifiers in interactorsMap (addAlias), so analyses submitted with them work as before.
  • InteractorsBuilder uses it in place of getOrCreate, which looked partners up in interactorsMap, aliases included. Its n counter moves into InteractorNodes.created().

Effect

  • On the data file: a partner whose identifier is another protein's alias is now its own interactor, so totalEntityAndInteractors counts it. In release 98, 79 of 3,067 human pathways rise by one or two.
  • On analyses: submitting such an identifier now finds both the partner itself and the protein it is an alias of. Before, it found only the latter.
  • Unchanged: primary identifiers find what they found before, and nothing else changes.

Tests

  • InteractorNodesTest has three tests: the alias case (Q6NSH3 / P0DMU9 from release 98), case and whitespace, and resources kept apart.
  • With the old lookup put back, two of them fail.
  • mvn test passes.

Not done

The data file has not been rebuilt with this change. That needs a full build against a release graph, so the release-98 numbers above are counted from the graph, not from a rebuilt file.

🤖 Generated with Claude Code

…alias

InteractorsBuilder.getOrCreate looked a partner up in the container's
IdentifiersMap, which also holds every interactor under its gene names and
secondary identifiers. A partner whose identifier was another protein's
alias was merged into that protein and never created, in an order that
depended on hash iteration (#13).

InteractorNodes now creates each interactor once per primary identifier,
keyed as IdentifiersMap keys it (trimmed, upper-cased), and still records
aliases in the map so analyses can be submitted with them. Tested; the
alias test fails with the old lookup.

Fixes #13

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamjohnwright added a commit to reactome/WebsiteAngular that referenced this pull request Nov 11, 2026
…fference

A gap of one or two entities on 79 human pathways is not visible in the
Reacfoam, and a release-time Java step reading the data file would be a
library build the project is not set up to keep current. The cause is
reported to analysis-core (reactome/analysis-core#13, fix in
reactome/analysis-core#14). T103 is now four tasks, with no release step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
adamjohnwright added a commit to reactome/WebsiteAngular that referenced this pull request Nov 11, 2026
…s) (#929)

* Spec 006 T103: research D25 and the tasks it splits into

Java's /data/eventsHierarchy sizes come from analysis-core's in-memory
hierarchy, loaded from the AnalysisService's data file. From the graph,
totalEntity matches every pathway of five species, but
totalEntityAndInteractors misses 79 of 3,067 human pathways by one or two:
analysis-core merges an interaction partner into another's alias in
hash-map order. So the sizes, and the pathwaysOnly tree, are snapshotted
from the data file at each release with analysis-core itself (T103a), and
node answers from the snapshot (T103b-e). The token overlay comes through
the analysis gateway; Java's own order below a hit node is random.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Spec 006 T103: compute the sizes from the graph; the 79 a recorded difference

A gap of one or two entities on 79 human pathways is not visible in the
Reacfoam, and a release-time Java step reading the data file would be a
library build the project is not set up to keep current. The cause is
reported to analysis-core (reactome/analysis-core#13, fix in
reactome/analysis-core#14). T103 is now four tasks, with no release step.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@adamjohnwright

Copy link
Copy Markdown
Contributor Author

Closed for now: the bug is tracked in #13 and will be fixed with a Reactome release. The branch is kept as a starting point.

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.

Interactors builder merges a partner into another protein when its identifier is that protein's alias

1 participant