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

Check for comma-separated profiles with whitespace #2643

Closed
ewels opened this issue Jan 8, 2024 · 4 comments
Closed

Check for comma-separated profiles with whitespace #2643

ewels opened this issue Jan 8, 2024 · 4 comments
Labels
template nf-core pipeline/component template

Comments

@ewels
Copy link
Member

ewels commented Jan 8, 2024

Description of feature

A common user error is to have spaces in config profiles on the command line, for example:

-profile test, singularity

This gives an unintuitive error about not having required software available etc.

It would be nice if we could automatically detect suspected cases of this:

  • Trailing comma in the profile
  • 1 or more positional arguments

Could then throw a warning, or even exit with an error if we're feeling confident.

@ewels ewels added the template nf-core pipeline/component template label Jan 8, 2024
@ewels ewels added this to the 2.11 milestone Jan 8, 2024
@mashehu
Copy link
Contributor

mashehu commented Jan 8, 2024

How would we catch that in the template? Nextflow should check the parameters, not sure where nf-core/tools can interfere with that?

@maxulysse
Copy link
Member

yeah, shouldn't this be handled on the Nextflow side?

@mashehu mashehu modified the milestones: 2.11, 2.12 Jan 11, 2024
@ewels
Copy link
Member Author

ewels commented Jan 19, 2024

Having positional arguments in the command is valid for Nextflow, but we never do it with nf-core. So if we use that as the main detection method it should be nf-core specific.

I'm suggesting that we put this into a function that sits in lib in the template and is called for every pipeline launch.

The trailing comma in the profile string is an optional extra, if we want to make the check more specific. I'm not 100% certain that we can get the raw profile string or not.

@ewels
Copy link
Member Author

ewels commented Jan 19, 2024

See here

${args[0]}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template nf-core pipeline/component template
Projects
None yet
Development

No branches or pull requests

4 participants