Skip to content

Log.out and Log.progress.out#82

Merged
Psy-Fer merged 3 commits into
mainfrom
fix/log-out-files
Jun 5, 2026
Merged

Log.out and Log.progress.out#82
Psy-Fer merged 3 commits into
mainfrom
fix/log-out-files

Conversation

@Psy-Fer
Copy link
Copy Markdown
Collaborator

@Psy-Fer Psy-Fer commented Jun 1, 2026

feat: write Log.out and Log.progress.out

Closes #55.

Summary

rustar-aligner was writing only Log.final.out. STAR writes two additional log files that
pipeline tools (nf-core/rnaseq, MultiQC, custom QC dashboards) consume for provenance,
progress monitoring, and run validation. Both files are now written with real content —
not stubs or debug dumps.

Files written

Log.out — mirrors STAR's verbose run log:

  • Version header (STAR version=, compilation time)
  • Full command line as invoked
  • Three parameter sections in STAR's format:
    • ##### Initial USER parameters from Command Line
    • ###### All USER parameters from Command Line (with ~RE-DEFINED markers)
    • ##### Final user re-defined parameters + reconstructed effective command line
  • Chromosome table (index name length start — real values from the loaded genome)
  • Phase timestamps: "Started/Finished loading the genome" and "..... finished mapping"
  • ALL DONE!

Log.progress.out — mirrors STAR's periodic alignment progress log:

  • STAR's exact two-line column header
  • One final summary line with real counts: elapsed time, speed (M reads/hr), total reads,
    average read length, unique mapped, average mapped length, multi-mapper rate, multi count,
    mismatch-filtered, too-short, and other unmapped
  • ALL DONE!

Implementation

New module src/io/log.rs with two public functions:

  • write_log_out(path, params, genome, time_start, time_genome_loaded, time_finish)
  • write_log_progress_out(path, stats, time_start, time_finish)

cli_params() helper parses params.command_line (already captured for the @PG BAM
header by PR #40) into (name, value) pairs for the parameter sections.

lib.rs changes:

  • Added time_genome_loaded timestamp immediately after GenomeIndex::load
  • Calls both writers after Log.final.out at the end of align_reads

Test plan

  • cargo test — 434 tests passing, 0 failures
  • cargo clippy --all-targets — 0 warnings
  • cargo fmt --check — clean
  • SE benchmark: 8604/8926 (96.4%) — unchanged
  • PE benchmark: 8390/8390 both-mapped — unchanged
  • Manual smoke-test: all three Log*.out files present in output directory; Log.out
    contains real command line, chromosome table, and ALL DONE!; Log.progress.out
    contains STAR header, a stats line with real read counts, and ALL DONE!

@Psy-Fer Psy-Fer enabled auto-merge (squash) June 5, 2026 11:34
@Psy-Fer Psy-Fer merged commit d5dea5c into main Jun 5, 2026
10 checks passed
@Psy-Fer Psy-Fer deleted the fix/log-out-files branch June 5, 2026 11:46
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.

Write Log.out and Log.progress.out with real STAR-equivalent content

1 participant