Skip to content

Conversation

@suhrig
Copy link
Contributor

@suhrig suhrig commented Dec 1, 2025

This PR adds plastid with three submodules:

  • metagene_generate
  • psite
  • make_wiggle

These functions are required to compute p-sites from Ribo-seq data.

I have also added test data here: nf-core/test-datasets#1809

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 module conventions in the contribution docs
  • If necessary, include test data in your PR.
  • Remove all TODO statements.
  • Emit the versions.yml file.
  • Follow the naming conventions.
  • Follow the parameters requirements.
  • Follow the input/output options guidelines.
  • Add a resource label
  • Use BioConda and BioContainers if possible to fulfil software requirements.
  • Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky:
    • For modules:
      • nf-core modules test <MODULE> --profile docker
      • nf-core modules test <MODULE> --profile singularity
      • nf-core modules test <MODULE> --profile conda

@suhrig suhrig marked this pull request as draft December 3, 2025 16:55
@suhrig suhrig marked this pull request as ready for review December 3, 2025 20:33
Copy link
Member

@pinin4fjords pinin4fjords left a comment

Choose a reason for hiding this comment

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

Left some comments. In general:

  • Only use channel inputs for the absolute tool-won't-run-without-them value arguments. Others should come via ext.args.
  • Use metas for all file inputs.
  • Don't manipulate the outputs of tools. Modules shouldn't be opinionated about that stuff.
  • Versions outputs are being transitioned to topics as we speak. You could avoid getting caught in the crossfire by doing that now.

@suhrig
Copy link
Contributor Author

suhrig commented Dec 5, 2025

Thanks for the comprehensive feedback! I will address the points and change the code accordingly.

@suhrig
Copy link
Contributor Author

suhrig commented Dec 9, 2025

Thanks again for your feedback. All issues should be resolved now. Let me know if you would like any further changes.

pinin4fjords and others added 5 commits December 10, 2025 10:35
- Add mapping_rule val input (enum: fiveprime, threeprime, center, fiveprime_variable)
- Move output_format to ext.args (optional arg per nf-core standards)
- Add validation: error if p_offsets missing with fiveprime_variable
- Remove hardcoded --fiveprime_variable
- Update meta.yml with mapping_rule input and enum
- Update tests with mapping_rule input

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
plastid/make_wiggle: nf-core standards compliance
- Consolidate multiple snapshot assertions into single snapshots per test
- Remove snapshots of empty stub files (just check existence)
- Exclude non-reproducible PNG from psite snapshots (matplotlib drift)
- Format metagene_generate command across multiple lines

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@pinin4fjords
Copy link
Member

pinin4fjords commented Dec 10, 2025

Hi @suhrig, I've opened another PR to your branch with suggestions to fix a CI reproducibility issue: suhrig#2

The psite PNG has non-reproducible md5sums due to matplotlib rendering differences across conda builds, so I've excluded it from the snapshot (just checking existence instead).

Also tidied up the test assertions while I was at it - consolidated snapshots and removed snapshots of empty stub files.

plastid: consolidate test snapshots and fix reproducibility
@pinin4fjords
Copy link
Member

@suhrig sorry, maybe I added some things to the snapshotting that shouldn't be there, let me fix it up

pinin4fjords and others added 2 commits December 10, 2025 13:18
Wig files have non-reproducible md5sums across environments.
Content is already validated via getText().contains('track').

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
metagene_profiles.txt and p_offsets.txt have non-reproducible md5sums.
Content is already validated via getText().contains() checks.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@suhrig suhrig added this pull request to the merge queue Dec 10, 2025
Merged via the queue into nf-core:master with commit 8d66ebd Dec 10, 2025
40 checks passed
@suhrig suhrig deleted the plastid branch December 10, 2025 18:31
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