Fix anchor keys, pipeline options, and reporting issues - #11
Merged
Conversation
The key was written "anchor'" with a stray quote in the three sections, so they had no anchor and their sidebar entries pointed to nothing. The adapter section was also a copy of the phix one and reused its anchor; it now has its own.
Two of the four pipeline options could not even build the workflow: - --skip-phix-removal used an undefined __data__input variable; the raw data is now trimmed directly - --disable-trimming referenced the cutadapt output, which does not exist in that case; the summary rule now follows what was really executed. The cutadapt section of the configuration file is kept in sync by the CLI. The report was showing and linking the wrong files: - the adapter section displayed the statistics computed after the phix removal and linked fastqc_cutadapt.html, a file that is never created. A fastq_stat_trimmed rule now provides the statistics of the trimmed data and the links point to the fastqc_trimmed report. - the statistics and plots were computed for R1 only. They are now computed for each read, which is what the report module expects. - a failure of the final summary.html was caught and printed, leaving no report behind while the pipeline reported a success. - the pipeline name is used in an URL, so the space was removed. Also removed dead code: the unreachable fastp rules, the kraken entries of the rulegraph mapper, unused imports, and the duplicated statistics block. The missing sys import made an invalid trimmer name raise a NameError. The default configuration file no longer ships a hardcoded input directory. Tests cover the four options with a dry run; they would have caught the two NameErrors.
Not up to standards ⛔
|
There was a problem hiding this comment.
Pull request overview
This PR updates the quality_control pipeline to improve option handling and reporting output consistency, and adds tests to validate key CLI flags.
Changes:
- Refactors FastQ stats generation to support per-read (R1/R2) outputs and reuses shared computation logic.
- Fixes report generation details (anchors, section content, rulegraph mapping) and removes dead/obsolete rulegraph entries.
- Adds dry-run tests covering
--skip-phix-removal,--disable-trimming, and FastQC skip options; bumps version to 1.2.0.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/test_main.py | Adds CLI dry-run tests for key pipeline options and asserts subprocess success. |
| sequana_pipelines/quality_control/quality_control.rules | Refactors FastQ stats outputs, fixes report sections/anchors, adjusts trimming logic, and tightens error handling. |
| sequana_pipelines/quality_control/main.py | Aligns cutadapt.do with trimming enablement to match how trimming rules/reporting are driven. |
| sequana_pipelines/quality_control/config.yaml | Removes a hardcoded local input_directory value from the default config. |
| README.rst | Adds a 1.2.0 changelog entry describing fixes and report improvements. |
| pyproject.toml | Bumps package version to 1.2.0. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
443
to
445
| __summary_pipeline__inputs = manager.getrawdata() | ||
| if manager.config['cutadapt'].do: | ||
| # todo: handle all adapter removal cases | ||
| if manager.config.trimming.do: | ||
| __summary_pipeline__outputs = [ __cutadapt__output ] |
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.
No description provided.