Skip to content

hostile/clean: name outputs and report sample after the prefix - #14416

Merged
dialvarezs merged 4 commits into
nf-core:masterfrom
dialvarezs:hostile-clean-prefix-names
Dec 5, 2026
Merged

dialvarezs merged 4 commits into
nf-core:masterfrom
dialvarezs:hostile-clean-prefix-names

Conversation

@dialvarezs

Copy link
Copy Markdown
Member

Hostile names its cleaned reads after the input file stem (<stem>.clean_1.fastq.gz) and reports that input name in the JSON (fastq1_in_name), which MultiQC uses as the sample name. So ext.prefix only applied to the JSON, and both the output names and the MultiQC sample name depended on upstream file names: two samples whose input files share a basename got the same output names (overwriting each other when published to one directory) and were merged into one MultiQC row. The stub also used names (<prefix>.clean_1.fastq.gz) that the real script never produced.

This PR links the reads under the prefix (in separate directories, so both mates keep the same stem) before running Hostile. Outputs are now <prefix>.clean.fastq.gz (single-end) or <prefix>.clean_{1,2}.fastq.gz (paired-end), and the report's input name is <prefix>.fastq.gz. The stub now matches. Channel structure is unchanged; only file names differ.

The mate-order test previously checked the input names in the report; it now checks that each output has the content of the matching mate.

Found while integrating Hostile in nf-core/mag (nf-core/mag#1146).

PR checklist

  • This comment contains a description of changes (with reason).
  • If you've fixed a bug or added code that should be tested, add tests!
  • Remove all TODO statements.
  • For modules:
    • nf-core modules test hostile/clean --profile singularity

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/s label Dec 5, 2026
dialvarezs and others added 2 commits December 5, 2026 12:59
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@FelixKrueger FelixKrueger left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

subworkflows/nf-core/fastq_shortreads_preprocess_qc/tests/main.nf.test.snap still has the old names in reads for its two non-stub hostile tests (CI didn't run that subworkflow), so it needs a snapshot update too.

@dialvarezs

Copy link
Copy Markdown
Member Author

subworkflows/nf-core/fastq_shortreads_preprocess_qc/tests/main.nf.test.snap still has the old names in reads for its two non-stub hostile tests (CI didn't run that subworkflow), so it needs a snapshot update too.

Done!

@dialvarezs
dialvarezs added this pull request to the merge queue Dec 5, 2026
Merged via the queue into nf-core:master with commit 8046951 Dec 5, 2026
66 checks passed
@dialvarezs
dialvarezs deleted the hostile-clean-prefix-names branch December 5, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants