TESTS: testing with small bladder set#438
Conversation
- When running with custom depths
There was a problem hiding this comment.
Pull request overview
This PR updates the nf-test harness and documentation for running deepCSA tests on an IRB SLURM cluster, and introduces a new FILTERDEPTHS module to apply the same minimum-mean-depth filtering logic to precomputed depth tables.
Changes:
- Expanded/refactored nf-test suite (new assertions, new failure-mode test) and updated snapshot metadata.
- Added
FILTERDEPTHSmodule and wired it intoDEPTH_ANALYSISwhen using precomputed depths with a minimum depth threshold. - Updated test configs/docs to reflect cluster execution, scratch dirs, and plugin usage.
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/test_data/input.csv | Replaced prior cluster-specific samplesheet with a small placeholder samplesheet. |
| tests/nextflow.config | Configured SLURM + Singularity for tests and set test params (incl. MAF + precomputed depths). |
| tests/deepcsa.nf.test | Refactored/expanded nf-test cases and assertions. |
| tests/deepcsa.nf.test.snap | Updated snapshot hashes and recorded tool versions/timestamps. |
| tests/README.md | Expanded documentation for running/adapting tests on clusters. |
| nf-test.config | Updated nf-test root config (workDir, ignored paths, plugin loading). |
| modules/local/filterdepths/main.nf | Added new module to filter depth tables by minimum mean depth. |
| subworkflows/local/depthanalysis/main.nf | Integrated FILTERDEPTHS for the precomputed-depths path. |
| conf/modules.config | Registered FILTERDEPTHS configuration and wired ext.minimum_depth. |
| conf/test.config | Increased test resource limits. |
| bin/utils_filter.py | Fixed filter-column detection logic when selecting FILTER.* columns. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
UPDATEThis is a comment so we know what was done here when coming back from holidays:
As the data is in DeepClone, the tests will not work until the repo is public. |
FerriolCalvet
left a comment
There was a problem hiding this comment.
Looks good Marta thanks for the cleaning and improvement in documentation of all the testing machinery.
I see that all the parameters that are the same as the default ones stay only in the main nextflow.config file, I guess this means that as long as we do not change the defaults, the tests should be fine, and that whenever we update the defaults we should update the snapshots right?
Maybe we should indicate this somewhere.
I think this is ready to merge and it would be great to make the DeepClone repo public ASAP so that we can test it directly with the paths referencing the repo.
I am adding @migrau in case he wants to take a look at it, but in any case we will try to merge it this week, and then if needed apply patches later.
Also as discussed offline in the past with both of you, probably some steps would benefit more from having unit tests rather than full pipeline tests since it is to wide and intertwined that it is complicated to know what is being tested in each execution unless you know exactly how everything works.
There was a problem hiding this comment.
did you check if the changes to the files were big? or just minor changes on decimal points and so on?
more out of curiosity than nothing else
There was a problem hiding this comment.
Now that you've commented I've realized that the snapshot should be updated... As I changed the input to only 3 bladder samples I didn't check but it could be interesting..
There was a problem hiding this comment.
I know this would not be for general use, but it would be great to have an example of which are the exact steps that you follow, I guess you may be indicating -outputDir or other flags in the command-line instructions so this way we have it explicitly defined here and there is no doubt on how to handle the tests efficiently.
(maybe a small section at the end would be the cleanest and simplest to not be misleading)
Maybe I am completely off and this should not be here eh!
|
Missing:
|
|
Already checked that tests PASS and snapshot updated. |
This PR is intended to make sure that the nf-tests work to test the pipeline and to ensure the test data used is prepared to be shared with users.
Added
FILTERDEPTHSmodule to allow depth-based filtering on input tables (matching our standard computation logic).Key changes:
1. Test Infrastructure and Documentation Improvements
tests/README.mdto document cluster-based testing, test configuration, output directories, and how to adapt the suite for other environments. Added instructions for new test cases, cleaning outputs, and debugging. [1] [2] [3] [4]nf-test.configto use a scratch work directory, ignore nf-core modules/subworkflows, and load thenft-utilsplugin.2. Expanded and Refactored Test Suite
tests/deepcsa.nf.testto include:3. Resource and Parameter Updates
conf/test.configto better match cluster capabilities (4 CPUs, 20 GB RAM, 15 min).4. New Depth Filtering Module and Workflow Integration
FILTERDEPTHSinmodules/local/filterdepths/main.nfthat filters depth tables based on a configurable minimum mean depth threshold.FILTERDEPTHSmodule into theDEPTH_ANALYSISworkflow insubworkflows/local/depthanalysis/main.nf, so that whenuse_custom_minimum_depthis set, depth tables are filtered accordingly. [1] [2]FILTERDEPTHSprocess in the Nextflow configuration (conf/modules.config) with parameter wiring forminimum_depth.These changes collectively add a new filtering capability, improve pipeline robustness, and ensure the test suite is comprehensive and portable across different SLURM cluster environments.
closes #435