Repository navigation
Fix raw-column sort direction and the gene_tpm help example; add --version (5.114.0) - #619
Merged
Merged
Conversation
Contributor
Author
ReviewNice set of CLI/ranking fixes:
|
iskandr
force-pushed
the
fix/easy-cli-issues-nov18
branch
from
November 21, 2026 23:22
44ef13c to
0ceef58
Compare
The leading name in an expression spec is a column prefix, so the
documented gene_tpm:quant.sf:Name:TPM produced gene_tpm_tpm while the
--filter-by hints use gene_tpm. Show gene:quant.sf:Name:TPM, state the
{name}_{column} rule, and test that every help example composes with
the documented filter. Closes #571.
Claude-Session: https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP
…auto --sort-by percentile_rank is a bare column reference, which auto sorted descending (worst binder first) although the help promises percentile ranks sort ascending. Columns in the public LOWER_IS_BETTER_COLUMNS set now sort ascending like the DSL keys reading the same numbers. Closes #572. Claude-Session: https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP
Part of #574. Claude-Session: https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP
Review of the first pass: the lower-is-better set listed two of six peptide scopes, so self_mimic_percentile_rank and friends still sorted descending while self_mimic.affinity.rank sorted ascending. Derive the rank columns from the scope keywords, test each member and the bare-column/scoped-field pairs together, export the set from the top level, and say plainly that bare affinity / wt_affinity are DSL keys and that the expression-name prefix rule has two exceptions. Claude-Session: https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP
The result-sort door pinned the old descending order for a bare percentile_rank column, which is the behaviour #572 reports as a bug. Claude-Session: https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP
iskandr
force-pushed
the
fix/easy-cli-issues-nov18
branch
from
November 22, 2026 00:36
0ceef58 to
8ec38ad
Compare
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.
Closes #612
Closes #571
Closes #572
Part of #574 (only the
--versionbullet; that issue stays open).One PR because every change needs the same version bump and changelog entry; each issue is its own commit.
What changed
plans/mhctools-631-identity.md(and with it theplans/directory). It was the work order for Validate canonical allele identities and downstream cache keys (5.111.0) #578, already released as 5.111.0; nothing links to it.--gene-expressionhelp example wasgene_tpm:quant.sf:Name:TPM. The leading name is a column prefix, so that producedgene_tpm_tpm, while the--filter-byhints usegene_tpm. The help,docs/expression.mdand theparse_expression_specdocstring now showgene:quant.sf:Name:TPMand state the{name}_{column}rule. Column naming is unchanged. The other half of the issue (validating--filter-by/--sort-bycolumns before predicting) is not done here; the same late-failure shape is tracked in the last bullet of CLI discoverability: no --version, --print-columns needs a full input, mhcflurry class II error leaks internal allele #574.--sort-by percentile_rankparses to a bare column reference, which--sort-direction autosorted descending (worst binder first) although the help says percentile ranks sort ascending. A bare reference to a lower-is-better output column (percentile_rank,affinity,wt_percentile_rank,wt_affinity,self_nearest_percentile_rank) now sorts ascending, like the DSL keys that read the same numbers. The set is public astopiary.ranking.LOWER_IS_BETTER_COLUMNS.valueis deliberately left out: it is an IC50 on affinity rows and a higher-is-better score on others. Explicitasc/descare unaffected.apply_sort(..., sort_direction="auto")andTopiaryResult.sort_bywithColumn("percentile_rank")change the same way, since they share the one inference function.topiary --versionprintstopiary <version>and exits 0.Verification
--gene-expressionexample in the help text is loaded againsttests/data/salmon_quant.sf, joined, and filtered withgene_tpm >= 20;--sort-by percentile_rankandcolumn(affinity)underautorank the strong binder first and agree withaffinity.rank; an unrelated column (gene_tpm) still sorts descending; explicitdescstill wins;main(["--version"])exits 0 with the installed version.ruff check topiary/ tests/was run (passes). The full./lint.sh(mypy) and./test.shcould not be run locally: the development machine's disk filled up while installing the dependency set, so the test environment is incomplete. This PR relies on CI for mypy and the test suite.https://claude.ai/code/session_01JHJhwjJyLksFkmysWFgmhP