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

Setting targeted mode without a panel gives an error message containing null #77

Closed
SPPearce opened this issue Aug 6, 2024 · 1 comment · Fixed by #78
Closed

Setting targeted mode without a panel gives an error message containing null #77

SPPearce opened this issue Aug 6, 2024 · 1 comment · Fixed by #78
Assignees
Labels
bug Something isn't working

Comments

@SPPearce
Copy link
Contributor

SPPearce commented Aug 6, 2024

Running the pipeline in targeted mode without specifying --panel gives the following error message:

ERROR ~

  The null is not defined. Currently, the available panels are:
    - tso500

Looking at the code, the first if block was not triggered when it should have done, and so the second was used:

           if (!params.containsKey('panel')) {

                def panels = Constants.PANELS_DEFINED.join('\n    - ')
                log.error "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
                    "  A panel is required to be set using the --panel CLI argument or in a \n" +
                    "  configuration file.\n" +
                    "  Currently, the available panels are:\n" +
                    "    - ${panels}\n" +
                    "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
                Nextflow.exit(1)

            } else if (!Constants.PANELS_DEFINED.contains(params.panel)) {

                def panels = Constants.PANELS_DEFINED.join('\n    - ')
                log.error "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
                    "  The ${params.panel} is not defined. Currently, the available panels are:\n" +
                    "    - ${panels}\n" +
                    "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
                Nextflow.exit(1)

            }
@scwatts scwatts self-assigned this Aug 6, 2024
@scwatts scwatts added the bug Something isn't working label Aug 6, 2024
@scwatts
Copy link
Collaborator

scwatts commented Aug 6, 2024

Nice catch @SPPearce, thanks for the report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants