Skip to content
Snippets Groups Projects

Installation of nextflow and nf-core

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Charlie Pauvert

    The workflow manager nextflow as well as the nf-core toolbox can be installed with conda/mamba however to get the respective latest versions (22.10 and 2.6), mamba failed to solved the dependencies. Or downgrading to 20.04 and 2.4 exhibited a pyOpenSSL deprecation warning which was not secure.

    Hopefully, the nf-core team also provides a docker container.

    Edited
    install-nf-core-nextflow.md 1.21 KiB

    Mamba/conda environment

    This doesn't resolve the conflict

    mamba create -n nf -c bioconda -c conda-forge nextflow nf-core 'python=3.7'

    Docker

    docker pull nfcore/tools:2.6
    # works fine
    docker run -itv `pwd`:`pwd` -w `pwd` -u $(id -u):$(id -g) nfcore/tools:2.6
    # fails

    The error was the following (and was not alleviated with sudo):

    Traceback (most recent call last):
      File "/usr/local/bin/nf-core", line 5, in <module>
        from nf_core.__main__ import run_nf_core
      File "/usr/local/lib/python3.8/site-packages/nf_core/__main__.py", line 31, in <module>
        nf_core.utils.setup_nfcore_dir()
      File "/usr/local/lib/python3.8/site-packages/nf_core/utils.py", line 310, in setup_nfcore_dir
        os.makedirs(NFCORE_DIR)
      File "/usr/local/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/local/lib/python3.8/os.py", line 223, in makedirs
        mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/.config'

    Solved in the issue https://github.com/nf-core/tools/issues/1911#issuecomment-1283551143 by adding -e HOME=/tmp

    # in ~/.bashrc
    alias nf-core="docker run -itv `pwd`:`pwd` -w `pwd` -u $(id -u):$(id -g) -e HOME=/tmp nfcore/tools"
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Please register or to comment