Skip to content

Conversation

@mattheww95
Copy link
Collaborator

@mattheww95 mattheww95 commented Sep 3, 2025

The changes in this PR are performed to reflect what is listed in STRY0017737, however the implementation of how the work is done has been altered.

Acceptance Criteria:

  1. Mikrokondo QC message generation in the report modules is refactored so that adding new QC messages is easier and maintenance of the code is easier.

@github-actions
Copy link

github-actions bot commented Sep 3, 2025

nf-core pipelines lint overall result: Passed ✅ ⚠️

Posted for pipeline commit e67cbdd

+| ✅ 228 tests passed       |+
#| ❔  35 tests were ignored |#
!| ❗   3 tests had warnings |!

❗ Test warnings:

❔ Tests ignored:

  • files_exist - File is ignored: CODE_OF_CONDUCT.md
  • files_exist - File is ignored: assets/nf-core-mikrokondo_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-mikrokondo_logo_light.png
  • files_exist - File is ignored: docs/images/nf-core-mikrokondo_logo_dark.png
  • files_exist - File is ignored: .github/ISSUE_TEMPLATE/config.yml
  • files_exist - File is ignored: .github/workflows/awstest.yml
  • files_exist - File is ignored: .github/workflows/awsfulltest.yml
  • files_exist - File is ignored: docs/output.md
  • files_exist - File is ignored: docs/README.md
  • files_exist - File is ignored: docs/usage.md
  • files_exist - File is ignored: conf/igenomes_ignored.config
  • files_exist - File is ignored: ro-crate-metadata.json
  • nextflow_config - Config variable ignored: manifest.name
  • nextflow_config - Config variable ignored: manifest.homePage
  • nextflow_config - Config variable ignored: params.max_cpus
  • files_unchanged - File does not exist: CODE_OF_CONDUCT.md
  • files_unchanged - File ignored due to lint config: LICENSE or LICENSE.md or LICENCE or LICENCE.md
  • files_unchanged - File ignored due to lint config: .github/CONTRIBUTING.md
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/bug_report.yml
  • files_unchanged - File does not exist: .github/ISSUE_TEMPLATE/config.yml
  • files_unchanged - File ignored due to lint config: .github/ISSUE_TEMPLATE/feature_request.yml
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • files_unchanged - File ignored due to lint config: .github/workflows/branch.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting_comment.yml
  • files_unchanged - File ignored due to lint config: .github/workflows/linting.yml
  • files_unchanged - File ignored due to lint config: assets/email_template.html
  • files_unchanged - File ignored due to lint config: assets/email_template.txt
  • files_unchanged - File ignored due to lint config: assets/sendmail_template.txt
  • files_unchanged - File does not exist: assets/nf-core-mikrokondo_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-mikrokondo_logo_light.png
  • files_unchanged - File does not exist: docs/images/nf-core-mikrokondo_logo_dark.png
  • files_unchanged - File does not exist: docs/README.md
  • files_unchanged - File ignored due to lint config: .gitignore or .prettierignore
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/mikrokondo/mikrokondo/.github/workflows/awstest.yml
  • multiqc_config - multiqc_config

✅ Tests passed:

Run details

  • nf-core/tools version 3.1.1
  • Run at 2025-09-11 14:53:35

@mattheww95 mattheww95 marked this pull request as ready for review September 4, 2025 19:30
@mattheww95
Copy link
Collaborator Author

test with additional missing report needed data needed e.g. checkm disabled

@mattheww95
Copy link
Collaborator Author

test with additional missing report needed data needed e.g. checkm disabled

We cannot get CheckM to run in current tests so it is currently disabled showing 3/4 passed tests. If CheckM is enabled we see 4/4 passed tests, it is unclear if users would like to see the number of passed tests reflect skipped tests or not and we should follow up on this later. E.g. if CheckM is skipped the user would see 3/3 passed tests in our examples.

Copy link
Member

@apetkau apetkau left a comment

Choose a reason for hiding this comment

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

This so much for this Matthew. This looks amazing 😄. Just a few comments.

class ReportFunctions{

/*
enum FuncType{
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove this commented out bit of code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd


def qual_message = []
def failed_p = false
//def failed_p = false
Copy link
Member

Choose a reason for hiding this comment

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

If this is now unused could you remove it.

check_failed,
check_ignored) = this.contig_qc_func(qual_data, metric, qc_message)
break;
}
Copy link
Member

Choose a reason for hiding this comment

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

Could you add a default case here that raises an exception about an invalid FuncType (though I suspect you would likely also get an exception raised when casting the string to the enum FuncType anyways).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd

resequence,
failed_p,
check_failed,
check_ignored) = this.generic_qc_func(qual_data, metric, qc_message)
Copy link
Member

Choose a reason for hiding this comment

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

I would use ReportFunctions.generic_qc_func() to call the function (or just generic_qc_func()) since these are static functions and this is meant to refer to the particular instance of a class (for non-static functions). Though it seems like it works anyways like how you have things.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd

resequence = 1
failed_p = true
checks_failed = 1
//return [checks, reisolate, resequence, failed_p, checks_failed, checks_ignored]
Copy link
Member

Choose a reason for hiding this comment

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

Remove commented-out code

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd

resequence,
failed_p,
check_failed,
check_ignored) = this.generic_qc_func(qual_data, metric, qc_message)
Copy link
Member

Choose a reason for hiding this comment

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

Is GENERIC and AUTOFAIL meant to run identical code?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nope, a separate method should be run good catch!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd




class ReportFunctions{
Copy link
Member

Choose a reason for hiding this comment

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

Could you maybe run the VSCode formatter on this file to clean up whitespace, etc?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in: e67cbdd

@mattheww95
Copy link
Collaborator Author

The autofail function needs to be tested better, e.g. a failing result needs to be passed to checkM

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.

3 participants