-
Notifications
You must be signed in to change notification settings - Fork 104
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
Conversation
|
|
||
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))) |
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 <[email protected]>
PR checklist
nf-core lint
).nextflow run . -profile test,docker --outdir <OUTDIR>
).docs/usage.md
is updated.docs/output.md
is updated.CHANGELOG.md
is updated.README.md
is updated (including new tool citations and authors/contributors).