Add optional STAR alignment with isolated BAM and junction outputs - #16
Merged
Fuki-Kudoh merged 4 commits intoJul 17, 2026
Merged
Conversation
--aligner option with STAR index validation, tests, and CI pytest step
Owner
Author
Human real-data validationValidated manually by Fuki Kudoh. Dataset
Results
InterpretationThis validates real paired-end execution, BAM integrity, splice-junction |
…support, and tests ### Motivation - Add an optional alignment phase using STAR so users can run STAR alongside existing Salmon/kallisto quantification without replacing quant outputs. - Validate STAR index contents and required tools, and record STAR-related fingerprints to ensure correct resume/force-from behavior. - Surface STAR outputs in documentation and README and capture STAR/samtools versions in metadata. - Integrate automated tests and CI changes to exercise the new aligner code paths. ### Description - Added a `--aligner` CLI option (choices `none|star`, default `none`) in `src/wulfrna/cli.py` and updated argument parsing to accept `aligner` and include `align` in `--force-from` choices. - Implemented STAR index validation (`validate_star_index`), STAR fingerprinting (`fingerprint_star_index`), STAR execution (`run_star_align`), STAR output expectations and phase integration in `src/wulfrna/pipeline.py`, plus helper functions `star_sample_outputs` and `selected_phases` and inclusion of `align` in `PHASES` when enabled. - Updated resume/manifest logic to record `aligner` and `star_index_fingerprint` and to force reruns of `align` when aligner or STAR index content changes, and added `align` phase marker behavior and output checks. - Added STAR and samtools version capture in `src/wulfrna/io.py`, created align directories in `ensure_dirs`, updated docs (`README.md`, `docs/spec.md`) to document the `--aligner` option and STAR index layout, and updated `pyproject.toml` and CI workflow to install test extras and run `pytest`. - Added comprehensive tests: `tests/test_cli.py`, `tests/test_reference_validation.py`, and `tests/test_star_integration.py` to cover CLI parsing, reference/index validation and end-to-end STAR integration with fake tools. ### Testing - Installed the package with test extras via `pip install -e .[test]` and compiled package sources with `python -m compileall src/wulfrna` without errors. - Ran the test suite with `pytest -q`, which executed the new tests under `tests/` and completed successfully. - CI workflow was updated to include running `pytest -q` as part of the `smoke` job (installation, compile, pytest, and existing CLI/parser smoke checks are invoked).
Fuki-Kudoh
marked this pull request as ready for review
July 17, 2026 07:44
Fuki-Kudoh
deleted the
codex/implement-cli-parsing-and-validation-for-star-nn85k8
branch
July 17, 2026 07:44
Closed
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.
Supersedes #15 and implements issue #14.
Motivation
Add optional STAR genome alignment while preserving the existing
Salmon/kallisto quantification workflow and output contract.
Implementation
--aligner {none,star}with defaultnone.alignphase using trimmed FASTQs.align/star/<sample>/.abundance/.Outputs
Per sample:
Aligned.sortedByCoord.out.bamAligned.sortedByCoord.out.bam.baiSJ.out.tabReadsPerGene.out.tabLog.final.outHuman real-data validation
Validated on a 500,000-pair subset of GSE157878 BMDM RNA-seq.
samtools quickcheck.confirming resume behavior.