nextflow plugins offline - core-unit-bioinformatics/knowledge-base GitHub Wiki

author date tags
Hufsah Ashraf 2023-08-01 nextflow, workflow, plugin, pipeline
KH 2023-08-14 update

Using Nextflow plugins on offline systems

During certain pipeline executions, Nextflow tries to install plugins which can be a problem if you are working on an offline system. Here is how you can fix this:

  1. On a system with internet, create a conda environment containing the latest version of Nextflow.
  2. Activate the environment.
  3. Download the pipeline of interest using nf-core download nf-core/\<pipeline\>
  4. Run the pipeline using nextflow run \<pipeline_dir\>. Instead of running on real data, it is better to use the test profile for this step specified using -profile test.
  5. The successful run of Step 4 will tell you if your pipeline requires certain plugins. If that is the case, for every execution, Nextflow will try to look for the latest version of these plugins online. In order to prevent this:
    1. Check if the required plugin is already present in $HOME/.nextflow/plugins. If yes, proceed to the next step, if not, download it using
      nextflow plugin install plugin@latest_version_number
    2. Create the conda environment from step 0 on your offline system.
    3. Copy $HOME/.nextflow/ from your local system to $HOME/.nextflow/ on the offline system.
    4. Explicitly mention the plugin name while running the pipeline:
      nextflow run [...] -plugins plugin@latest_version_number Alternatively, add to the nextflow.config file in your pipeline directory the id for the downloaded plugin:
      plugins { id 'plugin@latest_version_number'}
      This would tell Nextflow that the plugin already exists and it doesn't need to download it again.
⚠️ **GitHub.com Fallback** ⚠️