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 |
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:
- On a system with internet, create a conda environment containing the latest version of Nextflow.
- Activate the environment.
- Download the pipeline of interest using
nf-core download nf-core/\<pipeline\>
- 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. - 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:
- 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
- Create the conda environment from step 0 on your offline system.
- Copy
$HOME/.nextflow/
from your local system to$HOME/.nextflow/
on the offline system. - Explicitly mention the plugin name while running the pipeline:
nextflow run [...] -plugins plugin@latest_version_number
Alternatively, add to thenextflow.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.
- Check if the required plugin is already present in