Running the lessons on your local machine
There are three items that you need to download:
- The training material.
- The training dataset.
- The workshop scripts.
Training material
Download the training material copy & pasting the following command in the terminal:
# note this is specific to our fork, which we will need to change back
$ git clone https://github.com/HPCBio/workflows-nextflow
$ cd workflows-nextflow/files/scripts
Training software
The simplest way to install the software for this course is using conda.
To install conda see here.
To create the training environment run:
conda env create -f data/environment.yml
Then activate the environment by running
conda activate nf-training
Training scripts
To aid in the delivery of the lesson, the scripts mentioned in each episode, can be found in the respective episode folders in the github repository.
https://github.com/carpentries-incubator/workflows-nextflow/tree/gh-pages/files/scripts
Data
Inside the workflows-nextflow/files/scripts
folder download the workshop dataset from Figshare, https://figshare.com/articles/dataset/RNA-seq_training_dataset/14822481
$ wget --content-disposition https://ndownloader.figshare.com/files/28531743
Unpack gzipped tar file:
$ tar -xvf data.tar.gz
$ rm data.tar.gz
Text editor setup
Any text editor can be used to write Nextflow scripts. The nf-core project has a list of common text editors that have plugins for Nextflow. Below are a few examples.
VS Code
Visual Studio Code (VS Code) is a standard source code editor developed by Microsoft that can run on most operating systems (Mac, Windows, and Linux). The free Community version of VS Code can be retrieved from the download site for your particular operating system.
Nextflow language support
You can add Nextflow language support in VS Code by clicking the ‘Install’ button on the Nextflow VS Code extension page.
Alternatively, you can install from within VS Code by clicking on the ‘Extensions’ icon and searching for ‘Nextflow’. Note you can also use remote development (with some configuration) using VS Code, which comes in handy if you want to develop on a remote server or cluster.
Atom
Atom is one of the original text editors which Nextflow added language support to. Originally developed by the Github team, this project was offically sunsetted in Dec 2022. It’s still a great option, but keep in mind that it is no longer actively supported, and Nextflow support for Atom will also cease.
If you wish to use it: go to https://atom.io and you should see a download button. The button or buttons should be specific to your platform and the download package should be installable.
Nextflow language support
You can add Nextflow language support in Atom by clicking the install button on the atom package site https://atom.io/packages/language-nextflow.
Nextflow install without conda
Nextflow can be used on any POSIX compatible system (Linux, OS X, etc). It requires Bash and Java 8 (or later, up to 12) to be installed.
Windows systems may be supported using a POSIX compatibility layer like Cygwin (unverified) or, alternatively, installing it into a Linux VM using virtualization software like VirtualBox or VMware.
Nextflow installation
Install the latest version of Nextflow copy & pasting the following snippet in a terminal window:
# Make sure that Java v8+ is installed:
java -version
# Install Nextflow
export NXF_VER=20.10.0
curl get.nextflow.io | bash
Add Nextflow binary to your user’s PATH:
mv nextflow ~/bin/
# OR system-wide installation:
# sudo mv nextflow /usr/local/bin
Check the correct installation running the following command:
nextflow info
Check the correct installation running the following command:
nextflow info
nf-core/tools installation without conda
Pip
pip install nf-core