Skip to content

Snakemake/directsketch not able to find the global variable NCBI_API_KEY #207

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

Open
ccbaumler opened this issue Feb 20, 2025 · 5 comments
Open

Comments

@ccbaumler
Copy link

I have my NCBI_API_KEY in both my bashrc and bash_profile. gbsketch was not able to find the key unless I set it in the command with -a '$NCBI_API_KEY'

Error: please provide an API Key to use n_simultaneous_downloads > 3.
@bluegenes
Copy link
Collaborator

@ccbaumler I noticed this on farm as well - it doesn't always seem to get set properly. Can you run echo $NCBI_API_KEY when you run into this issue to see if it's actually set?

If it's not set properly (as happened for me), it's a farm issue and not a directsketch issue

@ccbaumler
Copy link
Author

ccbaumler commented Feb 21, 2025

Echo returns the API key with the correct information.

I ran the command in both command line and snakemake. Both needed the -a flag to register the API key. Is that a farm thing?

@bluegenes
Copy link
Collaborator

hmm. I can't replicate this -- when I run, it is able to detect and use $NCBI_API_KEY automatically. @ctb is the variable detection working for you?

@ctb
Copy link
Contributor

ctb commented Feb 21, 2025

@ccbaumler what specific commands are you using in your bashrc? In particular do you have 'export' in front?

@ctb
Copy link
Contributor

ctb commented Feb 21, 2025

see https://superuser.com/questions/153371/what-does-export-do-in-bash - I did not actually know this, FWIW :)

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

No branches or pull requests

3 participants