DEV Community

Cover image for Nextflow
Maxime HEBRARD
Maxime HEBRARD

Posted on

Nextflow

If you ever wrote bash scripts for each of your task, then try to write "one script to rule them all", a gigantic master script that handle parameters, and chains all the other tasks... Then you should stop right here and look for a workflow manager ! Nextflow.io is what you are looking for.

Nextflow

Install on MacOS

Before reading this post, I suggest you follow Improved Shell (MacOS).

Install Java

At the point of writing this post, the recommanded java version to install is OpenJDK 21. See Which JDK for more info.

  • Open 'Terminal'
  • Install OpenJDK from Homebrew
brew install openjdk@21
Enter fullscreen mode Exit fullscreen mode
  • Link it to Java
sudo ln -sfn /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk-21.jdk
Enter fullscreen mode Exit fullscreen mode
  • Add it to the PATH
echo 'export PATH="/opt/homebrew/opt/openjdk@21/bin:$PATH"' >> ~/.zshrc
Enter fullscreen mode Exit fullscreen mode

Java version

Install Nextflow

  • Download Nextflow
curl -s https://get.nextflow.io | bash
Enter fullscreen mode Exit fullscreen mode
  • Make Nextflow executable
chmod +x nextflow
Enter fullscreen mode Exit fullscreen mode
  • Create a new directory with write permissions to store binary
mkdir -p $HOME/.local/bin/
Enter fullscreen mode Exit fullscreen mode
  • Move Nextflow into the directory
mv nextflow $HOME/.local/bin/
Enter fullscreen mode Exit fullscreen mode
  • Add the directory to the PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Enter fullscreen mode Exit fullscreen mode
  • Confirm Nextflow is installed correctly
nextflow info
Enter fullscreen mode Exit fullscreen mode

Nextflow info

Top comments (0)