Skip to content

Support and test single reads#16

Merged
nickp60 merged 5 commits intonickp60:devfrom
vinisalazar:PE-SE-tests
Mar 6, 2026
Merged

Support and test single reads#16
nickp60 merged 5 commits intonickp60:devfrom
vinisalazar:PE-SE-tests

Conversation

@vinisalazar
Copy link

@vinisalazar vinisalazar commented Mar 6, 2026

Support and test SE reads (#12)

Summary of changes:

  • concatall.nf: normalized both branches of CONCAT_ALL to always emit [meta, [file]] (the cat branch was emitting a bare path instead of a list).
  • profiling.nf: added error handling if tools like humann receive more than one file; added input validation and documentation for the PE-aware tool path.
  • subworkflows/local/tests/concatall.nf.test: 5 nf-tests covering SE/PE single-run and multi-run scenarios, all asserting the output is always [meta, [file]] with exactly one file.

CAT_FASTQ emits a bare path while the skip branch emits a list; normalize
both to a list so downstream consumers don't need to handle both forms.
Tools that cannot handle paired-end input (humann_v3, humann_v4,
fmhfunprofiler) now raise an explicit error if they receive more than one
file, which would indicate CONCAT_ALL failed to produce a single
concatenated FASTQ.
Add a validation step in prepareInputs for PE-aware tools that checks the
number of read files matches meta.single_end (1 for SE, 2 for PE), so
mismatches are caught early with a clear error message.

Also document the expected channel structure so future tools added to this
branch know they must use meta.single_end to switch CLI argument style.
Tests cover all four input scenarios (SE single-run, PE single-run,
SE multi-run, PE multi-run) and verify that every code path produces
a consistent [meta, [reads]] output structure with exactly one file,
matching the normalization fix applied to the skip branch.
Also verifies that multiple samples stay independent.
…sertions

nf-test exposes channel path elements as Strings, not java.nio.Path/File
objects, so .name raises MissingPropertyException. Use .endsWith() directly.
@vinisalazar vinisalazar changed the title Support and test single reads (#12) Support and test single reads Mar 6, 2026
Copy link
Owner

@nickp60 nickp60 left a comment

Choose a reason for hiding this comment

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

This is great, thanks! Thanks for implementing all possible cases for the tests

@nickp60 nickp60 merged commit 91215a3 into nickp60:dev Mar 6, 2026
1 of 5 checks passed
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.

2 participants