Give each analysis type its own reading, and stop guessing which they are - #282
Merged
Merged
Conversation
… are Spec 011 Phase 6. The type enum is read from the API rather than inferred: SPECIES_COMPARISON, OVERREPRESENTATION, EXPRESSION, GSA_REGULATION, GSA_STATISTICS, GSVA. Three are summarised and the three GSA ones declined. Reading it closed a gap in Phase 2. `is_gsa` recognised ReactomeGSA by its `gsaMethod` field alone, so a result carrying GSA_REGULATION, GSA_STATISTICS or GSVA *without* that field would have been summarised confidently -- which is exactly the outcome D8 exists to prevent. Both signals are checked now, because neither is known to be sufficient alone and checking both is free. Each summarised type gets an instruction saying what it supports and what it does not, since a summary that ignores the type is likelier to say something wrong than nothing: - expression carries per-pathway values across columns and must describe behaviour across them -- and must not guess what the columns are, because their labels are user-supplied text and are never sent - species comparison must say findings are inferred by orthology rather than observed - over-representation must not use direction language at all, because that result cannot support up, down, increased or activated `exp` joins the allow-list for the expression reading. It is aggregated per pathway rather than the reader's raw measurements, and the column labels that would make it identifying stay excluded -- numbers without labels, which is the point. Tested on the served path, because the branch lives in the endpoint: each type is given its own reading and not another's. Verified by sabotage, with the sabotage asserted to have applied. Co-Authored-By: Claude Opus 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.
Spec 011 Phase 6.
The type enum, read rather than guessed
SPECIES_COMPARISON,OVERREPRESENTATION,EXPRESSION,GSA_REGULATION,GSA_STATISTICS,GSVA. Three are summarised; the three GSA ones are declined.Reading it closed a gap in Phase 2.
is_gsarecognised ReactomeGSA by itsgsaMethodfield alone — so a result carryingGSA_REGULATION,GSA_STATISTICSorGSVAwithout that field would have been summarised confidently. That is exactly the outcome D8 exists to prevent, and it was sitting in code I wrote and reviewed two phases ago.Both signals are checked now. Neither is known to be sufficient alone, and checking both is free.
Each type says what it supports
A summary that ignores the type is likelier to say something wrong than nothing:
expjoins the allow-list for the expression reading — aggregated per pathway rather than the reader's raw measurements, with the column labels that would make it identifying still excluded. Numbers without labels, which is the point.Testing
On the served path, because the branch lives in the endpoint: each type gets its own reading and not another's. Verified by sabotage, with the sabotage asserted to have applied first.
All checks gated with
set -e.🤖 Generated with Claude Code