title | permalink |
---|---|
Setup |
/setup/ |
There are two options presented here on how setup your computer to complete the exercises in this workshop.
- Running locally on your personal computer
- Running the exercises in your browser using a remote environment called Gitpod.
Each learner should setup a training folder e.g. nf-training
mkdir nf-training
cd nf-training
There are three items that you need to download:
- The training software.
- The training dataset.
- The workshop scripts.
A list of software with version required for this training is listed below:
Software | Version |
---|---|
Nextflow | 20.10.0 |
nf-core/tools | 1.12.1 |
salmon | 1.5 |
fastqc | 0.11 |
multiqc | 1.10 |
python | 3.8 |
The simplest way to install the software for this course is using conda.
To install conda see here.
An environment file is provided here environment.yml
# You can use either wget or curl to download content from the web via the command line.
# wget
wget https://raw.githubusercontent.com/carpentries-incubator/workflows-nextflow/main/episodes/data/environment.yml
# curl
curl -L -o environment.yml https://raw.githubusercontent.com/carpentries-incubator/workflows-nextflow/main/episodes/data/environment.yml
To create the training environment run:
conda env create -n nf-training -f environment.yml
Then activate the environment by running
conda activate nf-training
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/main/episodes/files/scripts
To get the scripts associated with each episode you will need to download the scripts folder from the github repository.
Below is a series of commands to download and unpack scripts folder.
# get the gitrepo as a zip file
wget https://github.com//carpentries-incubator/workflows-nextflow/archive/main.zip
#or
curl -L -o main.zip https://github.com//carpentries-incubator/workflows-nextflow/archive/main.zip
# unzip the script file
unzip main.zip 'workflows-nextflow-main/episodes/files/scripts*' -d .
# mv the scripts folder to the nf-training folder
mv workflows-nextflow-main/episodes/files/scripts .
# remove the zip file and the git repo
rm -r workflows-nextflow-main main.zip
The nextflow scripts for each episode, can be found in the respective episode folders inside this the scripts folder.
Inside the nf-training
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
# or curl
curl -L -o data.tar.gz https://ndownloader.figshare.com/files/28531743
Unpack gzipped tar file:
tar -xvf data.tar.gz
rm data.tar.gz
Any text editor can be used to write Nextflow scripts. A recommended code editor is Visual Studio Code.
Go to Visual Studio Code and you should see a download button. The button or buttons should be specific to your platform and the download package should be installable.
You can add Nextflow language support in Visual Studio Code by clicking the install button on the Nextflow language extension.
Nextflow can be used on any POSIX-compatible system (Linux, macOS, etc), and on Windows through WSL. It requires Bash 3.2 (or later) and Java 11 (or later, up to 22) to be installed
Install the latest version of Nextflow copy & pasting the following snippet in a terminal window:
# Make sure that Java v11 or later is installed:
java -version
# Install Nextflow
curl -s https://get.nextflow.io | bash
mv nextflow ~/bin/
# OR system-wide installation:
# sudo mv nextflow /usr/local/bin
Check the correct installation running the following command:
nextflow info
pip install nf-core
Gitpod is a cloud-based computing environment that is accessed using your web-browser. You can click the button below to open up a Gitpod instance ready for training. This Gitpod environment comes with the tools necessary for the exercises already installed. You'll be presented with a VSCode-like interface in your browser, which has a file explorer panel on the left, a main panel in which to view and edit files, and a panel below that includes a terminal in which to run unix commands.
Gitpod sessions automatically close after some period of inactivity. To open your session again, go to the Gitpod Dashboard where you can find and reopen any session.
Gitpod gives each user 10 hours usage allocation per month ( 50 if you connect your LinkedIn account).