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

nf-test: utils_nfcore_rnaseq_pipeline tests #1235

Merged

Conversation

adamrtalbot
Copy link
Contributor

@adamrtalbot adamrtalbot commented Mar 6, 2024

  • Add nf-tests for nf-core/rnaseq utility functions
  • Adds tests for nf-core/rnaseq utility subworkflows
  • Makes nextflow_schema.json a parameter for both subworkflows so it can be set correctly in the test and improves scoping of the subworkflows.
  • Subworkflow tests only check for correct running right now - need to refine them in future.
  • Changes function name from validateInputSamplesheet to checkSamplesAreConsistent which more accurately reflects what it is doing.

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
  • If necessary, also make a PR on the nf-core/rnaseq branch on the nf-core/test-datasets repository.
  • Make sure your code lints (nf-core 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).

Changes:
 - Change function name from validateInputSamplesheet to checkSamplesAreConsistent to accurately reflect what the function is doing
 - Add nf-tests for all functions in UTILS_NFCORE_RNASEQ_PIPELINE
Changes:
 - Makes nextflow_schema.json a parameter so we can actually set it. Not exposed right now but will be.
 - Adds basic tests that check for correct running only. Defaults to lots of stuff off.

We should extend this to check for more things but we're in a rush right now.
Copy link

github-actions bot commented Mar 6, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit f8f493c

+| ✅ 169 tests passed       |+
#| ❔   8 tests were ignored |#
!| ❗   7 tests had warnings |!

❗ Test warnings:

  • files_exist - File not found: assets/multiqc_config.yml
  • files_exist - File not found: .github/workflows/awstest.yml
  • files_exist - File not found: .github/workflows/awsfulltest.yml
  • pipeline_todos - TODO string in main.nf: Optionally add in-text citation tools to this list.
  • pipeline_todos - TODO string in main.nf: Optionally add bibliographic entries to this list.
  • pipeline_todos - TODO string in main.nf: Only uncomment below if logic in toolCitationText/toolBibliographyText has been filled!
  • pipeline_todos - TODO string in methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline

❔ Tests ignored:

  • files_exist - File is ignored: conf/modules.config
  • nextflow_config - Config default ignored: params.ribo_database_manifest
  • files_unchanged - File ignored due to lint config: .github/PULL_REQUEST_TEMPLATE.md
  • 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: .gitignore or .prettierignore or pyproject.toml
  • actions_awstest - 'awstest.yml' workflow not found: /home/runner/work/rnaseq/rnaseq/.github/workflows/awstest.yml
  • multiqc_config - 'assets/multiqc_config.yml' not found

✅ Tests passed:

Run details

  • nf-core/tools version 2.13.1
  • Run at 2024-03-06 18:02:58

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.

Chunky amount of work! Just skimmed and spotted a lingering println, but that's all.

@@ -507,6 +509,7 @@ def getStarPercentMapped(params, align_log) {
align_log.eachLine { line ->
def matcher = line =~ pattern
if (matcher) {
println matcher[0][1].toFloat()
Copy link
Member

Choose a reason for hiding this comment

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

Assume this is going?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Blast!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed now.

@adamrtalbot adamrtalbot merged commit cb26b69 into nf-core:dev Mar 6, 2024
96 checks passed
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