nf-core / nf-core/modules

[FEATURE] Make `hostile/fetch` output compatible with `storeDir` by explicitly coding the downloaded files

Open
#9,191 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nextflow
Stars
429
Forks
1.1k
Avg merge
1d 6h
Merged PRs (30d)
153

Description

Is your feature request related to a problem? Please describe

I like to use the storeDir argument to cache my downloaded database files in a common/shared directory with other lab members on our servers. This works really well on some other modules such as checkm2/databasedownload and bakta/baktadbdownload but not on hostile/fetch due to the output not explicitly mentioning the downloaded file(s)

output:
    tuple val(index_name), path('reference/'), emit: reference
    path 'versions.yml', emit: versions
Describe the solution you'd like

I would like the hostile/fetch output to be updated somewhat like this to include the files. Directly including the path outputing the reference/ and setting the can be avoided?

output:
    tuple val(index_name), path("reference/${index_name}*"), emit: reference
    path 'versions.yml', emit: versions

hostile/clean module should work with the same output which will be a full path now after removing the export HOSTILE_CACHE_DIR directive. This is on the same lines as the approach before recent commit where the reference_dir/reference_name was completed within the code:

hostile \\
        clean \\
       ... 
        --index ${reference_dir}/${reference_name} \\

The recent commit relies on the exported HOSTILE_CACHE_DIR and specifies only the reference_name which I have had issues with. So the above approach specifying the full path should be more stable

hostile \\
        clean \\
       ... 
        --index ${reference_name} \\
Describe alternatives you've considered

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with modules/nf-core/hostile/fetch/main.nf and compare its outputs with the checkm2/databasedownload and bakta/baktadbdownload modules. Then inspect modules/nf-core/hostile/clean/main.nf and the referenced commit to verify how the downloaded reference path is consumed. Done means fetch explicitly emits the downloaded files and clean works with that output without relying on HOSTILE_CACHE_DIR.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.