Skip to content
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

Dynamically build methods description from ch_versions #510

Merged
merged 4 commits into from
Nov 22, 2024

Conversation

fellen31
Copy link
Collaborator

@fellen31 fellen31 commented Nov 21, 2024

This PR adds a software_references.yml and uses that together with the tools reported in ch_versions to dynamically write the methods description tools and references, depending on how subworkflows are skipped and params set.

This should make the method description easier to maintain when adding or moving around tools and subworkflows. An error will also be produced if a new tool is added without an entry in software_references.yml.

Screenshot 2024-11-21 at 14 02 54

Closes #508.

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
  • 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).

@fellen31 fellen31 force-pushed the fix-multiqc branch 12 times, most recently from 7a933fa to 122ef72 Compare November 21, 2024 16:07
@fellen31 fellen31 marked this pull request as ready for review November 21, 2024 16:36
@fellen31 fellen31 requested a review from a team as a code owner November 21, 2024 16:36
@fellen31 fellen31 requested review from jemten and peterpru November 21, 2024 16:36
@fellen31 fellen31 linked an issue Nov 21, 2024 that may be closed by this pull request
@fellen31 fellen31 mentioned this pull request Nov 22, 2024
10 tasks
Copy link
Collaborator

@jemten jemten left a comment

Choose a reason for hiding this comment

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

Looks like a neat solution to me. Good to get rid of all the if statements in the toolCitationsText function.

Comment on lines +374 to +376
if (toolDetails == null) {
throw new IllegalStateException("Tool: '${tool}' not found in ${references_yaml}")
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this to make sure that each tool we run has an entry in the software_reference.yml file, even if the values are empty? Should we add this to the contribution doc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is both to make sure we have an entry, but also because toolDetails[description] below will error with a less informative "can't get null value" or similar..

Good idea, will add to contribution doc!

@fellen31 fellen31 merged commit aae65d7 into genomic-medicine-sweden:dev Nov 22, 2024
23 checks passed
@fellen31 fellen31 deleted the fix-multiqc branch November 22, 2024 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Missing methods description in MultiQC report
2 participants