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

Remove hyphens from pipeline names in Nextflow workflows #3365

Open
adamrtalbot opened this issue Dec 18, 2024 · 4 comments
Open

Remove hyphens from pipeline names in Nextflow workflows #3365

adamrtalbot opened this issue Dec 18, 2024 · 4 comments

Comments

@adamrtalbot
Copy link
Contributor

Description of feature

There's a common convention outside of nf-core to call your pipeline nf-${thing}, but in doing this we add a hyphen which is an invalid Nextflow workflow name.

It's an easy fix shortly after creation to remove the hyphen, but we can replace all hyphens with strings while creating the subworkflow names.

@adamrtalbot
Copy link
Contributor Author

We could also reduce the number of workflows so this only affects one workflow in total, but this is a bigger issue.

I.e. the hierarchy would be from:

  1. anonymous workflow (main.nf)
  2. NF_CORE_PIPELINE_NAME (main.nf)
  3. PIPELINE_NAME (workflows/main.nf)

To:

  1. anonymous workflow (main.nf)
  2. PIPELINE_NAME (workflows/main.nf)

Cut out the middle man workflow.

@colinbrislawn
Copy link

I just ran into this when using nf-core pipelines create

(I'm not sure if this is the best place to open pipelines create issues, so feel free to move or x-link this post!)

User story:

I'll make a new pipeline and I'll call it ex-ample !

Then, the first time I run it:

ERROR ~ Script compilation error
- file : github/colinbrislawn/ex-ample/main.nf
- cause: Not a valid include module name @ line 16, column 1.
   include { EX-AMPLE  } from './workflows/ex-ample'
   ^

Script compilation error
- file : github/colinbrislawn/ex-ample/main.nf
- cause: Workflow definition syntax error -- A string identifier must be provided after the `workflow` keyword @ line 28, column 9.
   workflow COLINBRISLAWN_EX-AMPLE {

@adamrtalbot
Copy link
Contributor Author

adamrtalbot commented Jan 17, 2025

@colinbrislawn the easy workaround is to replace all EX-AMPLE with EX_AMPLE in every *.nf file, which will fix the issue but preserve all the ex-ample pipeline names in other files like schemas etc. Straightforward with vscode, you can use find and replace.

Do it as a separate commit and Git will sort out template merging in future.

This shouldn't be too hard a problem to solve but someone needs to find time to do it.

@colinbrislawn
Copy link

Understand!

I left a comment because nf-core pipelines create generated invalid code and this is the closest existing issue I could find.

If there is a better place to put this story please let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants