Development container

A complete development container that setups you in a matter of minutes is available here.

Manual installation

Dependencies

  • Python ≥ 3.8, < 3.13
  • Docker ≥ 24 (we recommend using Docker Desktop)
  • Java Runtime ≥ 11, ≤ 17
    • On Ubuntu, install openjdk-jre-<version> packages
  • Nextflow ≥ 23.04.0
  • nf-test ≥ 0.9.0
  • Node ≥ 14, Prettier and editorconfig (see below)

Python environment

The project uses poetry to manage python dependencies. To install it using pipx, run the following commands :

pip install pipx
pipx ensurepath
pipx install poetry==1.8.*

Once done, install the project with :

poetry install --no-root

Loading the project’s environment

The project scripts and dependencies can be accessed using :

poetry shell

which will activate the project’s python environment in the current shell.

To exit the environment, simply enter the exit command in the shell.

Global environment

Set the following environment variables in your .bashrc (or whatever is the equivalent for your shell) :

export NFCORE_MODULES_GIT_REMOTE=https://github.com/scilus/nf-neuro.git
export NFCORE_MODULES_GIT_BRANCH=main
export NFCORE_SUBWORKFLOWS_GIT_REMOTE=https://github.com/scilus/nf-neuro.git
export NFCORE_SUBWORKFLOWS_GIT_BRANCH=main

This will make it so the nf-core commands target the right repository by default. Else, you’ll need to add --git-remote and --branch options to pretty much all commands relating to modules and subworkflows.

Working with VS Code

The nf-neuro project curates a bundle of useful extensions for Visual Studio Code, the nf-neuro-extensions package. You can find it easily on the extension marketplace.

Installing Prettier and editorconfig

To install Prettier and editorconfig for the project, you need to have node and npm installed on your system to at least version 14. On Ubuntu, you can do it using snap :

sudo snap install node --classic

However, if you cannot install snap, or have another OS, refer to the official documentation for the installation procedure.

Under the current configuration for the Development Container, for this project, we use the following procedure, considering ${NODE_MAJOR} is at least 14 for Prettier :

curl -fsSL https://deb.nodesource.com/setup_${NODE_MAJOR}.x | bash - &&\
apt-get install -y nodejs

npm install --save-dev --save-exact prettier
npm install --save-dev --save-exact editorconfig-checker

echo "function prettier() { npm exec prettier $@; }" >> ~/.bashrc
echo "function editorconfig-checker() { npm exec editorconfig-checker $@; }" >> ~/.bashrc