Skip to content

Integrity tests: Review normal test, add omega test and include documentation. #389

Merged
migrau merged 2 commits intodevfrom
dev-test-public-data
Nov 14, 2025
Merged

Integrity tests: Review normal test, add omega test and include documentation. #389
migrau merged 2 commits intodevfrom
dev-test-public-data

Conversation

@migrau
Copy link
Copy Markdown
Member

@migrau migrau commented Nov 13, 2025

[generatd by copilot]

This pull request adds support for using a precomputed depths table in the DEEPCSA pipeline, allowing users to skip depth calculation from BAM files and provide their own table for downstream analysis. It also introduces a minimal test suite using nf-test to validate pipeline runs and outputs. The most important changes are grouped below.

Custom Depths Table Feature

  • Added use_custom_depths and custom_depths_table parameters to nextflow.config, enabling users to specify a precomputed depths table for the pipeline instead of computing depths from BAM files.
  • Updated the depth analysis subworkflow (subworkflows/local/depthanalysis/main.nf) to conditionally use the provided depths table when use_custom_depths is true, bypassing the depth computation process.
  • Documented the new feature in docs/usage.md, including instructions, requirements, and notes on preparing the input table.
  • Extended the pipeline schema (nextflow_schema.json) to describe the new parameters and their expected usage, improving configuration clarity and validation.

Testing Infrastructure

  • Added a minimal reproducible test suite using nf-test: includes two test cases (minimal run and omega analysis), snapshot validation, and documentation for running and updating tests. (tests/README.md, tests/deepcsa.nf.test, tests/deepcsa.nf.test.snap, [1] [2] [3] [4]
  • Provided a small test input dataset in tests/test_data/input.csv for use in automated testing.

These changes improve pipeline flexibility and reproducibility, making it easier for users to re-use depth calculations and for developers to validate pipeline outputs with automated tests.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds two significant features to the DEEPCSA pipeline: support for using precomputed depths tables (bypassing BAM depth calculation) and a minimal nf-test suite for automated testing. The changes improve pipeline flexibility by allowing users to reuse depth calculations and establish a foundation for reproducible testing.

  • Added use_custom_depths and custom_depths_table parameters to enable skipping depth computation
  • Introduced nf-test-based test infrastructure with two test cases (minimal and omega analysis)
  • Updated documentation to explain the custom depths feature and test suite usage

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
nextflow.config Added two new parameters for custom depths table feature
nextflow_schema.json Extended schema with custom depths table options and validation rules
subworkflows/local/depthanalysis/main.nf Implemented conditional logic to use custom depths or compute from BAMs
docs/usage.md Documented the custom depths table feature with usage instructions
tests/deepcsa.nf.test Defined two nf-test cases with assertions for pipeline validation
tests/deepcsa.nf.test.snap Snapshot file for deterministic output validation
tests/README.md Comprehensive documentation for running and maintaining tests
tests/nextflow.config Test-specific configuration with pipeline parameters
tests/test_data/input.csv Test input dataset with sample metadata
nf-test.config nf-test framework configuration
assets/useful_scripts/downsample_depths.ipynb Helper notebook for preparing custom depths tables
Comments suppressed due to low confidence (1)

tests/deepcsa.nf.test:59

  • The line count assertion lines.size() == 59 is fragile and will break if the test data changes. Consider checking lines.size() > 1 (has header + data) or use a more flexible approach that validates the structure rather than an exact count.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/usage.md
Comment thread tests/test_data/input.csv
Comment thread tests/nextflow.config
Comment thread docs/usage.md
Comment thread docs/usage.md
Comment thread subworkflows/local/depthanalysis/main.nf
Comment thread nextflow_schema.json
@migrau
Copy link
Copy Markdown
Member Author

migrau commented Nov 13, 2025

Most of copilot comments are related to the Custom Depths Table Feature part, so feel free to review them @FerriolCalvet.
I mistakenly did a commit amend, so that's why it is merging the previous commit with my current one.
Anyway, it is going to be merge to dev now.

@migrau migrau marked this pull request as ready for review November 13, 2025 19:44
Copy link
Copy Markdown
Member

@FerriolCalvet FerriolCalvet left a comment

Choose a reason for hiding this comment

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

looks good!

@migrau migrau merged commit 1b53ad4 into dev Nov 14, 2025
@FerriolCalvet FerriolCalvet deleted the dev-test-public-data branch November 17, 2025 10:06
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