Sqanti reads plots - #619
Merged
Merged
Conversation
…es and UJCs instead of the report
…xon parser for reggex
…PDF and HTML, create summary.json with parameters
…te, config-driven thresholds
Contributor
There was a problem hiding this comment.
Pull request overview
This PR expands the SQANTI-reads feature set and regression coverage by adding extensive unit/integration tests for new QC/plot/report metrics, introducing a centralized YAML-configurable threshold system, and wiring new CLI options (including parallel per-sample jobs and a merged PDF/HTML reporting flow).
Changes:
- Add broad unit + integration test coverage for SQANTI-reads QC metrics, PDF page generation, and HTML report sections.
- Introduce
src/utilities/sqanti_reads_config.pyand a new--configCLI flag to override QC thresholds and other cutoffs. - Add
--jobsparallelization support and refine--refFasta/--skip_hashbehavior insqanti3_reads.py.
Reviewed changes
Copilot reviewed 38 out of 58 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| test/unit/utilities/test_ujc_overlap.py | Unit tests for A6 pairwise UJC overlap metric and PDF/HTML no-op behavior. |
| test/unit/utilities/test_transcript_divergency.py | Unit tests for transcript divergency computation and render guards. |
| test/unit/utilities/test_tandem_sites.py | Unit tests for tandem splice-site detector (F6) compute + rendering. |
| test/unit/utilities/test_support_views.py | Unit tests for orthogonal-support metrics (CAGE/polyA/SR) and pages. |
| test/unit/utilities/test_support_recommendation.py | Unit tests for “optional orthogonal support” messaging in PDF/HTML. |
| test/unit/utilities/test_scorecard_completeness.py | Unit tests for completeness + cohort-relative scorecard logic. |
| test/unit/utilities/test_replicate_concordance.py | Unit tests for replicate concordance (A5) compute + render guards. |
| test/unit/utilities/test_quality_metrics.py | Unit tests for derived quality scalars and cohort pages + scorecard feed. |
| test/unit/utilities/test_qc_pca.py | Unit tests for QC PCA feature selection and edge-case safety. |
| test/unit/utilities/test_jxn_yield.py | Unit tests for junction yield vs depth and scorecard flagging. |
| test/unit/utilities/test_jxn_fuzziness.py | Unit tests for splice-site fuzziness summarization/metrics/rendering. |
| test/unit/utilities/test_fuzziness_concordance.py | Unit tests for splice-site precision concordance and ref_key reconstruction. |
| test/unit/utilities/test_fuzz_depth.py | Unit tests for fuzziness vs junction depth (F4) compute + no-op behavior. |
| test/unit/utilities/test_composition_drift.py | Unit tests for composition drift (A3) compute + rendering + scorecard feed. |
| test/unit/utilities/test_artefact_pages.py | Unit tests for artefact cohort pages and HTML figure generation. |
| test/test_data/sqanti_reads/expected/sqantiReads_putative_underannotation.csv | Expanded expected under-annotation output fixture. |
| test/test_data/sqanti_reads/expected/sqantiReads_length_summary.csv | Expected length summary fixture. |
| test/test_data/sqanti_reads/expected/sqantiReads_gene_classfication.csv | Expected gene classification fixture. |
| test/test_data/sqanti_reads/design.csv | Design fixture (no factor). |
| test/test_data/sqanti_reads/design_with_upper_factor.csv | Design fixture to exercise uppercase factor name. |
| test/test_data/sqanti_reads/design_with_factor.csv | Design fixture (with factor). |
| test/test_data/sqanti_reads/design_single.csv | Design fixture for single-sample cohort behavior. |
| test/test_data/sqanti_reads/baseline/sqantiReads_putative_underannotation.csv | Baseline under-annotation regression oracle. |
| test/test_data/sqanti_reads/baseline/sqantiReads_length_summary.csv | Baseline length summary regression oracle. |
| test/test_data/sqanti_reads/baseline/sqantiReads_gene_classfication.csv | Baseline gene classification regression oracle. |
| test/test_data/genome/genome_test.fasta.fai | Genome index fixture for tests. |
| test/integration/test_sqanti_reads.py | End-to-end regression tests for merged report outputs, titles, HTML sections. |
| test/integration/conftest.py | Integration test runner for sqanti3_reads fast mode. |
| src/utilities/sqanti_reads_config.py | New centralized default config + YAML deep-merge loader. |
| src/reads_argparse.py | CLI updates: optional --refFasta, new --config, improved --skip_hash, new --jobs. |
| SQANTI3.conda_env.yml | Add plotly/pypdf/pymupdf; remove pdf2image; update env deps for tests/reporting. |
| sqanti3_reads.py | Parallel execution helper, conditional refFasta validation, skip_hash pathing, config/jobs plumbing. |
| pixi.toml | Add plotly/pypdf/pymupdf; remove pdf2image from pixi environment. |
| docs/Running-SQANTI‐reads.md | Update docs for new CLI, directory layout, report formats, config and new sections. |
| docs/commit_backlog.md | Add commit-backlog documentation file. |
| .gitignore | Ignore GEMINI.md. |
Comments suppressed due to low confidence (1)
sqanti3_reads.py:308
- The
pastestep that writes{sample}_reads_classification.txtusessubprocess.call(...)and ignores failures. If this command fails (e.g., bash not available, process substitution disabled, disk full), the pipeline will continue with a missing/partial classification file and later steps may error in less obvious ways.
Use check_call (and ideally log the command) so the failure is caught at the source.
cmd_paste = f"""bash -c 'paste <(cat {input_classfile} | tr -d '\r') <(cut -f 5,6 {outputPathPrefix}_temp.txt | tr -d '\r') > {outputPathPrefix}_reads_classification.txt'"""
subprocess.call(cmd_paste, shell = True)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Chaning the way SQANTI3 is called from SQANTI-reads, so in case SQANTI3 fails running, the pipeline stops. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.