Skip to content

Implement QC-only report generation and filtering in reporter - #277

Merged
karlnyr merged 5 commits into
rc5.1.0from
reports-filtering-qc-only
Nov 16, 2026
Merged

karlnyr merged 5 commits into
rc5.1.0from
reports-filtering-qc-only

Conversation

@eliottBo

Copy link
Copy Markdown

Description

This PR needs #271 and #274 to be in place.

If a QC only analysis runs, microsalt will produce only QC, deliverables and JSON files.

Changed

  • cli.py: finish now tells the Reporter it's a QC-only run when --track qc is passed.
  • reporter.py:
    • For a QC-only qc report, Reporter.report also generates the JSON and deliverables. A plain --report qc without --track qc still produces only the QC HTML.
    • JSON: drops blast_pubmlst, quast_assembly and blast_resfinder_resistence; keeps the Picard and samtools metrics.
    • Deliverables: drops the typing HTML, the assembly contigs and the QUAST TSV. It keeps sampleinfo, the QC HTML, JSON, config.log, version.txt, trimmed reads, BAMs, Picard insert-size stats and the slurm log.
  • Tests: the filtered YAML and JSON, the report output with and without QC-only, and the CLI passing the flag through. They're in test_reporter.py and test_cli.py.
  • README.md: a note on what a QC-only finish produces.

Primary function of PR

  • Hot-fix
  • Patch
  • Minor functionality improvement
  • New type of analysis
  • Backward-breaking functionality improvement
  • This change requires internal documents to be updated
  • This change requires another repository to be updated

Testing

  • bash /home/proj/production/servers/resources/hasta.scilifelab.se/install-microsalt-stage.sh BRANCHNAME
  • us
  • conda activate S_microSALT
  • microSALT analyse --input /path/to/fastq/ SAMPLEINFO_FILE

Test results

These are the results of the tests, and necessary conclusions, that prove the stability of the PR.

Sign-offs

  • Approved to run at Clinical-Genomics by @karlnyr or @Clinical-Genomics/micro

@eliottBo eliottBo self-assigned this Nov 13, 2026
@eliottBo
eliottBo requested a review from a team as a code owner November 13, 2026 09:00
@karlnyr
karlnyr changed the base branch from master to rc5.1.0 November 13, 2026 12:59

@karlnyr karlnyr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

neat!

Comment thread microSALT/utils/reporter.py Resolved
Comment thread microSALT/utils/reporter.py Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

QC-only runs with the default report type still generate and email a typing report despite typing being skipped, so the default branch needs a QC-only guard and test coverage.

1 open issue
What changed in this PR

Extends the QC-only workflow from #271 and #274 into reporting, filtering outputs for analyses that were skipped.

Changes:

  • Passes the QC-only flag from finish to Reporter.
  • Adds JSON and deliverables generation for QC-only QC reports, excluding typing and assembly outputs while retaining alignment metrics.
  • Adds regression tests and documents QC-only finish outputs.
File Description
tests/​utils/​test_reporter.py Tests output filtering and QC-only report generation.
tests/​test_cli.py Tests propagation of the QC-only flag to Reporter.
README.md Documents QC-only finish outputs.
microSALT/​utils/​reporter.py Adds QC-only output filtering and report generation.
microSALT/​cli.py Passes --track qc through as the reporter’s QC-only flag.

Review effort: Balanced

Comment thread microSALT/utils/reporter.py Resolved
@karlnyr
karlnyr merged commit 3e45cdc into rc5.1.0 Nov 16, 2026
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.

3 participants