feat(cli): parameter files, genome version check, and a shell-run readFilesCommand - #239
Open
BenjaminDEMAILLE wants to merge 2 commits into
Open
feat(cli): parameter files, genome version check, and a shell-run readFilesCommand#239BenjaminDEMAILLE wants to merge 2 commits into
BenjaminDEMAILLE wants to merge 2 commits into
Conversation
…acceptance Closes six of the twenty-five STAR 2.7.11b names still listed in NOT_YET_ACCEPTED, chosen as the ones no open theme PR already owns. - --parametersFiles: STAR-format parameter files (name value..., # and // comments). Files are expanded before clap sees the arguments, and a flag the user also passes on the command line is dropped from the file side, so the command line wins even for multi-value parameters where clap would append. An unknown name, an empty value, an unreadable file, or a nested parametersFiles is fatal and names the file and line, as in STAR. - --versionGenome: genomeParameters.txt is checked before the index is read. Versions compare by component, so 2.7.10a sorts after 2.7.4a rather than before it as a string comparison would have it. - --sysShell, and --readFilesCommand now runs through a shell. Spawning the whole command string as one program name meant "gunzip -c", the example in STAR's own documentation, failed as a missing program. Where no POSIX shell is guaranteed the command is split into words instead. - --outFilterMismatchNoverReadLmax: mismatch-to-read-length ratio, SE and PE. - --alignTranscriptsPerReadNmax: caps alignments per read before the filters. - --alignSoftClipAtReferenceEnds: No prohibits clipping past a chromosome end. Machine-checked STAR parameter coverage: 184/203, with the floor asserted by a new test that measures the figure from clap rather than restating it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The aligner-core PR implements outFilterMismatchNoverReadLmax, alignTranscriptsPerReadNmax and alignSoftClipAtReferenceEnds as part of its own theme, and it is the older and larger change, so this PR yields them rather than racing it. What remains here is the parameter-file loader, the genome version check, and the shell-run readFilesCommand fix. Machine-checked coverage for this branch alone: 181/203.
BenjaminDEMAILLE
force-pushed
the
feat/cli-surface-parameters
branch
from
August 26, 2026 22:01
9d7773e to
60e92e0
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.
What this closes
Six of the STAR 2.7.11b names in
NOT_YET_ACCEPTED, picked as the ones no open theme PR already owns (so this does not collide with #146, #147, #148, #149, #109, #116, #161, #165). Each is implemented, not merely accepted:--parametersFilesname value...,#and//comments). Expanded before clap sees the arguments; a flag the user also passes on the command line is dropped from the file side, so the command line wins even for multi-value parameters, where clap would otherwise append. Unknown name, empty value, unreadable file, or a nestedparametersFilesis fatal and names the file and line.--versionGenomegenomeParameters.txtis checked before the index is read. Versions compare component-wise, so2.7.10asorts after2.7.4a, which a string comparison (STAR's own) gets backwards. A missing version line is accepted with a warning.--sysShell--readFilesCommand.--readFilesCommand(fix)gunzip -c— the example in STAR's own documentation — failed as a missing program. Where no POSIX shell is guaranteed, the command is split into words instead. Paths are quoted.--outFilterMismatchNoverReadLmax--alignTranscriptsPerReadNmax--alignSoftClipAtReferenceEndsNorejects alignments whose soft clip would hang past a chromosome end. Validated toYes/No.Measured, not asserted
star_parameter_coverage_meets_the_floorcounts the accepted names from clap and prints the figure: 184/203, 19 still missing. The floor is a test, so a regression that drops a parameter fails here rather than in a pipeline.Testing
15 new tests: 8 for the parameter-file loader, 4 for the version check (including the lexical-ordering trap), 5 for the shell-run read command, and 3 end-to-end in
tests/cli_surface.rsthat align real reads and check the SAM. Each end-to-end test carries a control arm (permissive vs strict, uncapped vs capped,YesvsNo) so a filter that rejects everything cannot pass as a filter that works.Whole suite,
cargo clippy --all-targets -- -D warnings, andcargo fmt --checkare green on a cold cache. A warm cargo cache does not replay diagnostics, which is how the clippy 1.98 breakage fixed in #236 went unnoticed locally.One thing deliberately not fixed here
outFilterMismatchNoverLmaxis applied to the read length in this codebase, where STAR applies it to the mapped length: issue #238. Changing that denominator moves the yeast benchmark and wants its own before/after measurement, so it is not bundled in. Until it is fixed, the two ratio parameters share a denominator.What still remains of the port
Measured from the live lists at the time of writing, not from memory: 32 open issues, 28 open non-dependabot PRs, 19 STAR parameters still unaccepted.
The ten themes of #143 (P1 aligner-core faithfulness, P2 STARlong, P3 seed-batch perf, P4 solo barcode chemistry, P5 Transcript3p / CellReads.stats, P6 CLI parity, P7 SuperTranscriptome / RAM-aware SA, P8 chimeric multimapping, P9 parallel output, P10 CellRanger4 clipping) each have a PR open or, for P3, no work started. The remaining 19 parameters map onto those themes:
chim*to P8,clip5pAdapter*to P10,genomeType/genomeTransformOutput/genomeSuffixLengthMax/sjdbInsertSaveto P7,solo*to P4,alignEndsProtrude/alignInsertionFlush/seedSplitMin/seedNoneLociPerWindowto P1,winReadCoverageBasesMinto P2. Finishing the port is therefore gated on landing those PRs, not on new greenfield work.🤖 Generated with Claude Code