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

Strip problematic ifEmpty() #1317

Merged
merged 2 commits into from
Jun 12, 2024
Merged

Strip problematic ifEmpty() #1317

merged 2 commits into from
Jun 12, 2024

Conversation

pinin4fjords
Copy link
Member

@pinin4fjords pinin4fjords commented Jun 12, 2024

Currently, if CAT_FASTQ doesn't fire, rnaseq will error like:

Cannot invoke "java.nio.file.Path.getFileSystem()" because "path" is null

This is because of this line:

ch_versions = ch_versions.mix(CAT_FASTQ.out.versions.first().ifEmpty(null))

Because CAT_FASTQ does not fire (as in test_full), ch_versions gets a null emission, which gets passed to softwareVersionsToYAML() and thence to processVersionsFromYAML(), which attempts to read the null as a file and triggers the getFileSystem() error.

As far as I can tell the ifEmpty() is a hangover of a bygone era, so I propose we just strip it.

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

Copy link

github-actions bot commented Jun 12, 2024

nf-core lint overall result: Passed ✅ ⚠️

Posted for pipeline commit a8eb811

+| ✅ 171 tests passed       |+
#| ❔   9 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 methods_description_template.yml: #Update the HTML below to your preferred methods description, e.g. add publication citation for this pipeline
  • 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!

❔ Tests ignored:

✅ Tests passed:

Run details

  • nf-core/tools version 2.14.1
  • Run at 2024-06-12 16:27:32

@pinin4fjords pinin4fjords merged commit e277e3e into dev Jun 12, 2024
185 checks passed
@ewels ewels deleted the strip_ifempty branch June 12, 2024 19:37
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