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

All modules with the same prefix being found with nf-core modules update #1380

Closed
drpatelh opened this issue Jan 7, 2022 · 2 comments · Fixed by #1441
Closed

All modules with the same prefix being found with nf-core modules update #1380

drpatelh opened this issue Jan 7, 2022 · 2 comments · Fixed by #1441
Labels
bug Something isn't working high-priority
Milestone

Comments

@drpatelh
Copy link
Member

drpatelh commented Jan 7, 2022

Description of the bug

Not sure whether this affects any other nf-core modules commands but if I want to update minia in my pipeline then it is correctly updated but another module with the same prefix miniasm is being installed too as you can see at the end of the console output below. I suspect there is a regex or glob that needs to be updated somewhere in the tools codebase to only find and update the required module.

Command used and terminal output

$ git clone https://github.com/nf-core/viralrecon.git 
Cloning into 'viralrecon'...
remote: Enumerating objects: 10345, done.
remote: Counting objects: 100% (100/100), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 10345 (delta 22), reused 42 (delta 4), pack-reused 10245
Receiving objects: 100% (10345/10345), 7.96 MiB | 5.16 MiB/s, done.
Resolving deltas: 100% (6536/6536), done.

$ cd viralrecon 

$ nf-core modules update minia

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.2



INFO     Updating 'nf-core/modules/minia'                                                                                                                                update.py:239
INFO     Downloaded 4 files to ./modules/nf-core/modules/minia                                                                                                  modules_command.py:273

$ git status 
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   modules.json
	deleted:    modules/nf-core/modules/minia/functions.nf
	modified:   modules/nf-core/modules/minia/main.nf
	modified:   modules/nf-core/modules/minia/meta.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	modules/nf-core/modules/miniasm/

no changes added to commit (use "git add" and/or "git commit -a")

System information

No response

@drpatelh drpatelh added bug Something isn't working high-priority labels Jan 7, 2022
@drpatelh drpatelh added this to the 2.2.1 milestone Jan 7, 2022
@ewels
Copy link
Member

ewels commented Mar 14, 2022

Not just updating, also installing and probably everything else...

$ nf-core modules install minia

                                          ,--./,-.
          ___     __   __   __   ___     /,-._.--~\
    |\ | |__  __ /  ` /  \ |__) |__         }  {
    | \| |       \__, \__/ |  \ |___     \`-._,-`-,
                                          `._,._,'

    nf-core/tools version 2.3.dev0 - https://nf-co.re


INFO     Installing 'minia'                                                                                                                                install.py:127
INFO     Downloaded 4 files to ./modules/nf-core/modules/minia                                                                                     modules_command.py:273
 ❯ gs
## master
 M modules.json
?? modules/nf-core/modules/minia/
?? modules/nf-core/modules/miniasm/

@ewels
Copy link
Member

ewels commented Mar 14, 2022

Ok, this was a pretty extreme edge case 😅 It wasn't just all prefixes (min didn't work), it had to be a module that exists with a base name that matched another module that exists (not including submodules, so samtools also doesn't work).

ewels added a commit to ewels/nf-core-tools that referenced this issue Mar 14, 2022
@ewels ewels linked a pull request Mar 14, 2022 that will close this issue
4 tasks
@ewels ewels closed this as completed Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high-priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants