8000 Snapshot for `-profile test_single_end` by dialvarezs · Pull Request #908 · nf-core/mag · GitHub
[go: up one dir, main page]

Skip to content

Snapshot for -profile test_single_end - #908

Merged
dialvarezs merged 32 commits into
nf-core:devfrom
dialvarezs:snapshot_single_end
Apr 22, 2026
Merged

dialvarezs merged 32 commits into
nf-core:devfrom
dialvarezs:snapshot_single_end

Conversation

@dialvarezs
Copy link
Copy Markdown
Member

Closes #902.

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!
  • If you've added a new tool - have you followed the pipeline conventions in the contribution docs
  • If necessary, also make a PR on the nf-core/mag branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core pipelines lint).
  • Ensure the test suite passes (nextflow run . -profile test,docker --outdir <OUTDIR>).
  • Check for unexpected warnings in debug mode (nextflow run . -profile debug,test,docker --outdir <OUTDIR>).
  • Usage Documentation in docs/usage.md is updated.
  • Output Documentation in docs/output.md is updated.
  • CHANGELOG.md is updated.
  • README.md is updated (including new tool citations and authors/contributors).

@dialvarezs dialvarezs changed the title Snapshot for -profile test_single_end Snapshot for -profile test_single_end Oct 31, 2025
@dialvarezs dialvarezs linked an issue Oct 31, 2025 that may be closed by this pull request
@dialvarezs
dialvarezs marked this pull request as ready for review November 15, 2025 03:34
@nf-core-bot

This comment was marked as resolved.

@jfy133 jfy133 left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Overall LGTM,

As a general thing, I suggest wrapping all asserts in snapshot even if it's just a boolean (you can also store these in a string even for more human readability, see nf-core/createtaxdb as an example -inspired by @maxulysse )

If that particular check fails and is not in a snapshot, it can be really annoying to debug.

I have 3 minor things that may have been missed, but otherwise this is looking very comprehensive, great work @dialvarezs !

Comment thread tests/.nftignore
@@ -1,6 +1,12 @@
.DS_Store
Ancient_DNA/pydamage/analyze/*/*.csv
Ancient_DNA/variant_calling/*/*.vcf.gz
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No string check for these? Or you could use https://github.com/seppinho/nft-vcf

Comment thread tests/.nftignore Outdated
.DS_Store
Ancient_DNA/pydamage/analyze/*/*.csv
Ancient_DNA/variant_calling/*/*.vcf.gz
Annotation/Prokka/**/*.{log,err,gbk,sqn}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No addition checks for gbk/sqn? These are common downstream files, so might be good to validate somehow

Comment thread tests/.nftignore
QC_shortreads/fastqc/*_fastqc.{html,zip}
QC_shortreads/remove_phix/*.log
Taxonomy/CAT/**/*.log
VirusIdentification/geNomad/**/*_aggregated_classification.tsv
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can be removed, as you do actually check this explicitly in genomad_results

@dialvarezs
dialvarezs commented Apr 16, 2026 •
Copy link
Copy Markdown
Member Author

I came back to finish this finally! @jfy133

I addressed your comments:

  • Booleans are included in snapshots with messages to indicate what are they testing, and also applied the same idea to summary-rows and log-checks
  • VCFs are not stable because they include the date or datetime in the header, so no snapshots for them. But I added if they are not empty using nft-vcf.
  • Added GBK and SQN checks. I intented to leave GBK and SQN in the snapshot, but they also have the date encoded, so they're not stable.
  • *_aggregated_classification.tsv is not stable either, but we can keep the non-empty check.

@jfy133 jfy133 left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

One suggestion but not a blocker

"Prokka GBK files contain LOCUS: ${prokka_gbk.collect { file -> path("${file}").text.contains('LOCUS') }.every()}",
"Prokka SQN files non-empty: ${prokka_sqn.collect { file -> path("${file}").size() > 0 }.every()}",
// Summary row count checks
"Bin summary non-empty: ${bin_summary.csv(sep: '\t').rowCount > 0}",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Could this not still be the case even if there are no hits, because you still have the header? Maybe minimum >1?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same for all CSV files

@dialvarezs dialvarezs Apr 22, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

nft-csv plugin doesn't count the header.

Comment thread CHANGELOG.md

### `Deprecated`

- [#908](https://github.com/nf-core/mag/pull/908) - Removed local `quast_bins_summary` in favor of `csvtk/concat` (by @dialvarezs)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Note If we follow semantic versioning this requires v6 btw, as a user can not longer use a config that points to thw QUAST_BIN_SUMMARY module

@dialvarezs dialvarezs Apr 22, 2026 •
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In theory yes, but I consider this one a soft one, because it's a replacement and normally users won't change the config for this (it's only a CSV concat after all).
Not like when we removed raw read taxonomic profiling, that one definitively deserved a major bump.

In dev there is also the removal of MAG_DEPTHS_PLOT, that's definitively a more serious breaking change.

But... i we adhere to strict semantic versioning, we'll end up with mag v10 on 2027 😂

@dialvarezs
dialvarezs merged commit c2cce5d into nf-core:dev Apr 22, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generate snapshot for test_single_end

3 participants

0