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

add branch in case of no fusions #388

Merged
merged 5 commits into from Sep 4, 2023
Merged

add branch in case of no fusions #388

merged 5 commits into from Sep 4, 2023

Conversation

rannick
Copy link
Collaborator

@rannick rannick commented Aug 30, 2023

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

@github-actions
Copy link

github-actions bot commented Aug 30, 2023

nf-core lint overall result: Passed ✅

Posted for pipeline commit 72ee2ec

+| ✅ 158 tests passed       |+

✅ Tests passed:

Run details

  • nf-core/tools version 2.9
  • Run at 2023-09-04 11:28:16

@rannick rannick self-assigned this Aug 30, 2023
@fevac fevac requested a review from peterpru September 4, 2023 09:39
CHANGELOG.md Outdated Show resolved Hide resolved

if (params.whitelist) {
ch_whitelist = ch_fusion_list.combine(Channel.value(file(params.whitelist, checkIfExists:true)))
ch_whitelist = ch_fusion_list.fusions.combine(Channel.value(file(params.whitelist, checkIfExists:true)))
Copy link
Member

Choose a reason for hiding this comment

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

What happens if there are no fusions here? It creates a ch_fusion_list.no_fusions above, but the here ch_fusion_list.fusions would be NULL, then this code would essentially output ch_whitelist = null. Then CAT_CAT(ch_whitelist) should lead to a NullPointerException or a similar error, is that correct?

Then maybe we could check first whether there are fusions?

if (ch_whitelist) {
    CAT_CAT(ch_whitelist)
} else {
    // some action when there are no fusions
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From what I understand: in case of no fusions, ch_fusion_list.fusions and ch_whitelist do not exist and the processes are not triggered. No error is thrown.

Copy link
Member

Choose a reason for hiding this comment

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

Ok awesome 👍

Co-authored-by: Peter Pruisscher <57712924+peterpru@users.noreply.github.com>
@rannick rannick merged commit 4bab85b into dev Sep 4, 2023
6 checks passed
@rannick rannick deleted the fix_no_fusions branch September 22, 2023 06:49
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.

None yet

2 participants