Skip to content

feat(cli): parameter files, --sysShell, and a shell-run readFilesCommand - #239

Open
BenjaminDEMAILLE wants to merge 4 commits into
mainfrom
feat/cli-surface-parameters
Open

BenjaminDEMAILLE wants to merge 4 commits into
mainfrom
feat/cli-surface-parameters

Conversation

@BenjaminDEMAILLE

@BenjaminDEMAILLE BenjaminDEMAILLE commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

What this closes

Two of the STAR 2.7.11b names in NOT_YET_ACCEPTED, plus a --readFilesCommand bug. Each is implemented, not merely accepted:

Parameter Behaviour
--parametersFiles STAR-format parameter files (name 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 nested parametersFiles is fatal and names the file and line.
--sysShell Selects the shell for --readFilesCommand. - is /bin/sh on Unix.
--readFilesCommand (fix) Now runs through that shell, as STAR does (sysShell -c "<command> <file>"). On main it still spawns the whole string as one program name, so gunzip -c (the example in STAR's own documentation) fails as a missing program. Where no POSIX shell is guaranteed, the command is split into words instead. Paths are quoted. It applies to every file of a comma-separated --readFilesIn list.

Changes since the first version

Testing

Tests for the parameter-file loader, the shell-run read command (multi-word command, chosen shell, path with spaces, no-shell word splitting, platform default) and a new one that checks the command follows the reader onto the second file of a list. star_parameter_coverage_meets_the_floor measures the accepted STAR names from clap.

cargo fmt --check, cargo clippy --all-targets -- -D warnings and cargo test --all-targets (728 lib tests and all integration tests) pass.

🤖 Generated with Claude Code

…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>
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title feat(cli): six more STAR parameters, each with behaviour rather than acceptance feat(cli): parameter files, genome version check, and a shell-run readFilesCommand Aug 26, 2026
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.
Conflict in tests/parameter_surface.rs only: main now accepts seedSplitMin, so it leaves the not-yet-accepted list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Drop --versionGenome: A3 (#328) ports STAR's strict genome version check,
which supersedes this PR's lenient one. ReadCommand now goes through the
several-files-per-mate readers from D (#333), so --readFilesCommand and
--sysShell apply to every file of a comma-separated list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@BenjaminDEMAILLE BenjaminDEMAILLE changed the title feat(cli): parameter files, genome version check, and a shell-run readFilesCommand feat(cli): parameter files, --sysShell, and a shell-run readFilesCommand Oct 13, 2026

This branch has not been deployed

No deployments
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.

1 participant