Move stage definition to workflow - #98
Open
Aratz wants to merge 3 commits into
Open
Conversation
Aratz
marked this pull request as ready for review
August 24, 2026 09:13
maxkarlsson
approved these changes
Aug 24, 2026
maxkarlsson
left a comment
Collaborator
There was a problem hiding this comment.
Looks very good to me 🎉
Some minor comments, just to remove a bloat test file.
Really appreciate your work on this 🙏
| sample_levels <- es_data$sample_aliases | ||
|
|
||
| plot_data <- | ||
| extract_sample_qc_metrics( |
Collaborator
There was a problem hiding this comment.
A note for the future: This extraction function should be updated to fit the new data ingestion better. But that is something we should do in a future PR
| @@ -0,0 +1,3 @@ | |||
| amplicon_stages <- function() { | |||
Collaborator
There was a problem hiding this comment.
I don't understand why this file is needed 😮 I think we can do without it.
Collaborator
There was a problem hiding this comment.
We should be able to use get_es_workflow_stages("amplicon_demux") instead
| #' @return A nested named list of functions. | ||
| #' | ||
| #' @noRd | ||
| .amplicon_demux_extractors <- function() { |
Collaborator
There was a problem hiding this comment.
It is good that you moved these functions to their own file 👍
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR lets each workflow define its own stages. This is then used downstream to determine which files to expect and populate the es_data.
Description
Describe the change.
Fixes: PNA-3323
Type of change
How Has This Been Tested?
Unit tests were run
PR checklist:
Note
Medium Risk
Breaking public API:
register_es_data_workflow(),find_stage(),get_file_paths(), andextract_sample_qc_metrics()now require a stages argument, so extension packages and existing callers will fail until they pass a vocabulary.Overview
Breaking: pipeline stages are no longer package globals. Each workflow must register a
stagesfactory (all,pool,pxl_preference), stored ones_data$stagesand retrieved withget_es_workflow_stages().find_stage(),get_file_paths(), andextract_sample_qc_metrics()now take a requiredstagesargument (no default), so discovery cannot inherit another workflow’s vocabulary. PXL preference and pool-level QC routing come from that list; the collapse-shard QC filter only runs ifcollapseis inall.The built-in
amplicon_demuxfactories (extractors, report, stages) move toworkflow_amplicon_demux.R. Registration validates the vocabulary (subsets ofall, unique names, emptypoolallowed). Downstream callers and tests passes_data$stagesorget_es_workflow_stages("amplicon_demux").Reviewed by Cursor Bugbot for commit 21755e1. Bugbot is set up for automated code reviews on this repo. Configure here.