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

nf-core modules install --dir seems to not reset the working directory #2796

Closed
luisas opened this issue Feb 27, 2024 · 4 comments
Closed

nf-core modules install --dir seems to not reset the working directory #2796

luisas opened this issue Feb 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@luisas
Copy link

luisas commented Feb 27, 2024

Description of the bug

I am trying to install an nf-core module into a not nf-core pipeline.

By using the command:
nf-core modules install famsa --dir .

I get the error:

WARNING  Could not find a 'main.nf' or 'nextflow.config' file in '/home/luisasantus/Desktop'                                                                                                               
INFO     The 'modules.json' file is not up to date. Recreating the 'modules.json' file.                                                                                                                    
? Can't find a ./modules directory. Would you like me to create one? [y/n] (y): n

I also tried with the absolute path of the directory, same error.

Command used and terminal output

nf-core modules install famsa --dir . 

( the current dir . is not the default working directory)

System information

nextflow version 23.10.1.5891
Desktop
Local
Ubuntu 20.04.3 LTS
nf-core/tools version 2.13 - https://nf-co.re
Python 3.10.12

@luisas luisas added the bug Something isn't working label Feb 27, 2024
@pmoris
Copy link
Contributor

pmoris commented Mar 18, 2024

I just tried to replicate this, but everything seemed to work fine for me. Perhaps I've misunderstood the issue though?


Using a non-nf-core template pipeline:

mkdir new-pipeline && cd new-pipeline && touch main.nf
nf-core modules install zip --dir .

Prompts the warning:

WARNING  'repository_type' not defined in .nf-core.yml
? Is this repository an nf-core pipeline or a fork of nf-core/modules? (Use arrow keys)
 » Pipeline
   nf-core/modules

Selecting pipeline results in a few more messages (asking whether to add a .nf-core.yml file and modules directory), and then the module appears in the folder as expected.


Using a nf-core template pipeline (via nf-core create) also works as expected.

However, I did notice that when trying to use the --dir flag to point to another directory, while the current working directory already contains the module, the installation would be skipped. To fix this, the check to look for already installed modules needs to point to whatever directory is supplied via the --dir flag.

@luisas
Copy link
Author

luisas commented Mar 18, 2024

I was looking at it and it seems like there was an issue with another .nf-core.yml file.

So I had my pipeline folder in /home/Desktop/mypipeline

and after

cd /home/Desktop/mypipeline
nf-core modules install famsa --dir . 

i was running into the above mentioned issue. Yet, when i removed a .nf-core.yml file I had in the Desktop, it just started working. So it must have mistakenly used that one, although i never explicitly pointed to that.

After removing it, everything now runs fine. So I think it must have been some weird set up I had. I guess we can close the issue?

Sorry for this!

@pmoris
Copy link
Contributor

pmoris commented Mar 19, 2024

No worries, glad you got it resolved!

Incidently, When I mentioned this on Slack, @awgymer spotted a related bug and managed to fix it! #2863

@pmoris pmoris closed this as completed Mar 19, 2024
@awgymer
Copy link
Contributor

awgymer commented Mar 19, 2024

Yep that error was the precisely the issue I applied the fix for. It's rare that people have nested config yml but where they did it really messed things up

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

No branches or pull requests

3 participants