tools icon indicating copy to clipboard operation
tools copied to clipboard

Non-CLI usage of nf-core download

Open seedgeorge opened this issue 1 year ago • 3 comments

Description of feature

Hi there,

Currently the nf-core download command doesn't permit a parameter-based answer to to the Define $NXF_SINGULARITY_CACHEDIR f question that pops up on the command-line interface. For the purposes of putting this command in a script, it would be handy to not have to interact with a command line prompt at all.

Thanks for the useful tool!

seedgeorge avatar Jun 28 '24 14:06 seedgeorge

Sorry for the late reply.

Technically, this should already be the case. The code has a check that should prevent prompts from being shown in non-interactive sessions:

https://github.com/nf-core/tools/blob/930ece572bf23b68c7a7c5259e918a878ba6499e/nf_core/download.py#L440-L444

Why this detection fails in your case, I can't tell. Have you tried to pipe the output to tee, cat or tail or something? At least the pipe should be detected, and any interactive prompts thus turned off.

MatthiasZepper avatar Jul 18 '24 15:07 MatthiasZepper

Is there a reason that you can't provide it on the same line as the command? eg.

NXF_SINGULARITY_CACHEDIR="/path/to/cache" nf-core download

Then as @MatthiasZepper says, the interactive prompt shouldn't show. And it is not super different to using a flag with the path after the command.

ewels avatar Sep 26 '24 11:09 ewels

I presume, that the original poster does not want to define a cache directory?

MatthiasZepper avatar Sep 26 '24 11:09 MatthiasZepper

This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days.

github-actions[bot] avatar Nov 03 '24 00:11 github-actions[bot]

This issue was closed because it has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor and then staled for 20 days with no activity.

github-actions[bot] avatar Nov 24 '24 00:11 github-actions[bot]