-
Couldn't load subscription status.
- Fork 218
Migrate template to nf-core-utils plugin #3790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
91d662e to
e908f0a
Compare
nf_core/pipeline-template/subworkflows/local/utils_nfcore_pipeline_pipeline/main.nf
Show resolved
Hide resolved
| plugins { | ||
| id '[email protected]' // Validation of pipeline parameters and creation of an input channel from a sample sheet | ||
| id '[email protected]' // Validation of pipeline parameters and creation of an input channel from a sample sheet | ||
| id '[email protected]' // Utility functions for nf-core pipelines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| id 'nf-core-utils@0.3.0' // Utility functions for nf-core pipelines | |
| id 'nf-core-utils@1.0.0' // Utility functions for nf-core pipelines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this because you want nf-core-utils to be at a stable release?
tests/subworkflows/test_lint.py
Outdated
| self.subworkflow_remove.remove("utils_nfschema_plugin", force=True) | ||
| """Test linting a pipeline with no nf-core subworkflows installed. | ||
| The template now has no nf-core subworkflows by default (migrated to nf-core-utils plugin). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The template now has no nf-core subworkflows by default (migrated to nf-core-utils plugin). |
|
should we ask the maintainers team for test implementations before we add it to the template. we currently only have two pipelines, both done by maxime. |
Integrate nf-core-utils plugin v0.3.0 to replace utility subworkflows with centralized plugin functions, following RFC proposal #51. Major changes: - Add [email protected] plugin to nextflow.config - Replace UTILS_NEXTFLOW_PIPELINE subworkflow with direct plugin calls - Replace UTILS_NFCORE_PIPELINE subworkflow with plugin functions - Replace UTILS_NFSCHEMA_PLUGIN subworkflow with nf-schema plugin calls - Remove entire subworkflows/nf-core/ directory - Update modules.json to remove nf-core subworkflows Functions now provided by nf-core-utils plugin: - getWorkflowVersion, dumpParametersToJSON, checkCondaChannels - completionEmail, completionSummary, imNotification - checkConfigProvided, checkProfileProvided - processVersionsFromFile, workflowVersionToChannel Functions retained in local subworkflow: - paramsSummaryMultiqc, softwareVersionsToYAML (uses plugin functions) - getGenomeAttribute, validateInputSamplesheet - toolCitationText, methodsDescriptionText Closes: #3685 Related: nf-core/proposals#51 feat(template): migrate to nf-core-utils plugin - Add [email protected] plugin to nextflow.config - Replace all nf-core subworkflow imports with plugin imports - utils_nextflow_pipeline functions -> direct plugin calls - utils_nfcore_pipeline functions -> plugin/nf-core-utils - utils_nfschema_plugin functions -> plugin/nf-schema - Use plugin functions for version processing: - processVersionsFromFile() instead of local implementation - workflowVersionToChannel() instead of local implementation - Remove entire subworkflows/nf-core/ directory - Update modules.json: empty nf-core subworkflows section - Update test expectations for removed subworkflows Closes #3685
Add Jinja2 conditional to only include completionEmail function from nf-core-utils plugin when email functionality is enabled.
Remove implementation details from docstring.
Add Jinja2 conditional to only include paramsSummaryMultiqc function when MultiQC is enabled in the pipeline.
8b9f27c to
7aa626c
Compare
|
See nf-core/rnavar#256 as an example PR |
| include { paramsSummaryMultiqc } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline'{% endif %} | ||
| include { softwareVersionsToYAML } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@edmundmiller can we remove this from the subworkflow as well? It doesn't add much.
- paramsSummaryMultiQc can probably be moved to nf-core-utils
- softwareVersionsToYAML can be moved to nf-core-utils
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| include { paramsSummaryMultiqc } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline'{% endif %} | |
| include { softwareVersionsToYAML } from '../subworkflows/local/utils_nfcore_{{ short_name }}_pipeline' | |
| include { paramsSummaryMultiqc } from 'plugin/nf-core-utils'{% endif %} | |
| include { softwareVersionsToYAML } from 'plugin/nf-core-utils' |
| if (validate_params) { | ||
| validateParameters() | ||
| } | ||
| {%- endif %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need an additional {%- endif %}, this one is for the {%- if nf_schema %} on line 70
| // | ||
| // Get channel of software versions used in pipeline in YAML format | ||
| // | ||
| def softwareVersionsToYAML(ch_versions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this function be also added to the plugin?
PR checklist
CHANGELOG.mdis updateddocsis updated