From e5ff644b77a488512f13480d4c300baa9c7da298 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Wed, 21 Aug 2024 13:15:22 +0000 Subject: [PATCH 1/9] Add comments and update Nextflow in Gitpod image --- .gitpod.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index b7edd35c..bfd83668 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,14 +1,38 @@ +# Use the nf-core Gitpod image located at https://github.com/nf-core/tools/blob/master/nf_core/gitpod/gitpod.Dockerfile image: nfcore/gitpod:latest +# Gitpod definition file adapted from: +# - https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/.gitpod.yml +# - https://github.com/nextflow-io/training/blob/master/.gitpod.yml + tasks: + # TODO: Do we remove this task? Used to preview Carpentries page build - name: Install local page serve init: | sudo apt-get install -y ruby ruby-dev build-essential libxml2-dev sudo gem install bundler - + # Update Nextflow if image version is behind + - name: Update Nextflow and setup pre-commit + command: | + pre-commit install --install-hooks + nextflow self-update + - name: unset JAVA_TOOL_OPTIONS + command: | + unset JAVA_TOOL_OPTIONS + # Install additional tools + - name: Install tools for the exercises. + command: | + echo conda install toolname vscode: - extensions: # minimal helpful extensions from nf-core suggestions. - # - nextflow.nextflow # Nextflow syntax highlighting - - oderwat.indent-rainbow # Highlight indentation level - - streetsidesoftware.code-spell-checker # Spelling checker for source code + extensions: # based on nf-core.nf-core-extensionpack + - codezombiech.gitignore # Language support for .gitignore files + - cssho.vscode-svgviewer # SVG viewer + - esbenp.prettier-vscode # Markdown/CommonMark linting and style checking for Visual Studio Code + - EditorConfig.EditorConfig # override user/workspace settings with settings found in .editorconfig files + - Gruntfuggly.todo-tree # Display TODO and FIXME in a tree view in the activity bar + # - mechatroner.rainbow-csv # Highlight columns in csv files in different colors + - nextflow.nextflow # Nextflow syntax highlighting + - oderwat.indent-rainbow # Highlight indentation level + - streetsidesoftware.code-spell-checker # Spelling checker for source code + - ms-vscode.live-server From 301dafa5b8579ed62edd934a0da1b5552e18bf09 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 22 Aug 2024 12:13:40 +0000 Subject: [PATCH 2/9] Disable pre-commit Install salmon 1.5 fastqc 0.11 multiqc 1.10 --- .gitpod.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index bfd83668..6ce57f7b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -14,15 +14,17 @@ tasks: # Update Nextflow if image version is behind - name: Update Nextflow and setup pre-commit command: | - pre-commit install --install-hooks + # pre-commit install --install-hooks nextflow self-update - - name: unset JAVA_TOOL_OPTIONS - command: | unset JAVA_TOOL_OPTIONS # Install additional tools - name: Install tools for the exercises. command: | - echo conda install toolname + conda install --yes --update-all \ + salmon=1.5 \ + fastqc=0.11 \ + multiqc=1.10 \ + && conda clean --all --force-pkgs-dirs --yes vscode: extensions: # based on nf-core.nf-core-extensionpack From 2be2f2640ded26d505890891122995da221c01e7 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Thu, 22 Aug 2024 12:18:49 +0000 Subject: [PATCH 3/9] Combine tasks --- .gitpod.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 6ce57f7b..50432d0b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -12,19 +12,16 @@ tasks: sudo apt-get install -y ruby ruby-dev build-essential libxml2-dev sudo gem install bundler # Update Nextflow if image version is behind - - name: Update Nextflow and setup pre-commit - command: | - # pre-commit install --install-hooks - nextflow self-update - unset JAVA_TOOL_OPTIONS - # Install additional tools - - name: Install tools for the exercises. + # Install tools for exercises + - name: Update tools for exercises command: | conda install --yes --update-all \ salmon=1.5 \ fastqc=0.11 \ multiqc=1.10 \ && conda clean --all --force-pkgs-dirs --yes + nextflow self-update + unset JAVA_TOOL_OPTIONS vscode: extensions: # based on nf-core.nf-core-extensionpack From 475e42bd572898d2d7d6cb87da7549c0fe5d4ed7 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 07:53:16 +0000 Subject: [PATCH 4/9] Add task to setup terminal for exercises --- .gitpod.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index 50432d0b..4137992f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -22,6 +22,12 @@ tasks: && conda clean --all --force-pkgs-dirs --yes nextflow self-update unset JAVA_TOOL_OPTIONS + # Sets up a terminal in the correct location. + # This must be the last task in the list + - name: Terminal for training exercises + command: | + mkdir -p nf-training # Create the directory + cd nf-training # Change into the directory vscode: extensions: # based on nf-core.nf-core-extensionpack From bfdcd83deb0a7ecbdc8f11e83101157e5fd46007 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 07:59:23 +0000 Subject: [PATCH 5/9] Close unnecessary terminals --- .gitpod.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 4137992f..56ac9e97 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -19,13 +19,14 @@ tasks: salmon=1.5 \ fastqc=0.11 \ multiqc=1.10 \ - && conda clean --all --force-pkgs-dirs --yes - nextflow self-update - unset JAVA_TOOL_OPTIONS + && conda clean --all --force-pkgs-dirs --yes \ + && nextflow self-update \ + && exit # Sets up a terminal in the correct location. # This must be the last task in the list - name: Terminal for training exercises command: | + unset JAVA_TOOL_OPTIONS mkdir -p nf-training # Create the directory cd nf-training # Change into the directory From 477c86014d65fb78906a2b9fb23da01308fb0b3c Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 08:03:30 +0000 Subject: [PATCH 6/9] Unpin MultiQC --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 56ac9e97..40bd0e9c 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -18,7 +18,7 @@ tasks: conda install --yes --update-all \ salmon=1.5 \ fastqc=0.11 \ - multiqc=1.10 \ + multiqc \ && conda clean --all --force-pkgs-dirs --yes \ && nextflow self-update \ && exit From 769d2f97b38cf76d49972602289ea34135f43814 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 08:09:32 +0000 Subject: [PATCH 7/9] Open training material in side pannel --- .gitpod.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitpod.yml b/.gitpod.yml index 40bd0e9c..e9e774d7 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -22,6 +22,9 @@ tasks: && conda clean --all --force-pkgs-dirs --yes \ && nextflow self-update \ && exit + # Open Carpentries training material in a side panel. + - name: Open training material + command: gp preview https://carpentries-incubator.github.io/workflows-nextflow/ && exit # Sets up a terminal in the correct location. # This must be the last task in the list - name: Terminal for training exercises From 8a338f5cc8223c1dcf746a3daf8870306b7324b6 Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 08:13:25 +0000 Subject: [PATCH 8/9] Remove webserver task as it wasn't working anymore --- .gitpod.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index e9e774d7..29b45183 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -6,11 +6,6 @@ image: nfcore/gitpod:latest # - https://github.com/nextflow-io/training/blob/master/.gitpod.yml tasks: - # TODO: Do we remove this task? Used to preview Carpentries page build - - name: Install local page serve - init: | - sudo apt-get install -y ruby ruby-dev build-essential libxml2-dev - sudo gem install bundler # Update Nextflow if image version is behind # Install tools for exercises - name: Update tools for exercises From 2c448376ba516b11d4a1491192508216012b930e Mon Sep 17 00:00:00 2001 From: Mahesh Binzer-Panchal Date: Mon, 26 Aug 2024 09:38:55 +0000 Subject: [PATCH 9/9] Add setup information. --- learners/setup.md | 56 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 16 deletions(-) diff --git a/learners/setup.md b/learners/setup.md index 15718bdc..e5852b55 100644 --- a/learners/setup.md +++ b/learners/setup.md @@ -4,11 +4,18 @@ permalink: /setup/ --- +# Setup +There are two options presented here on how setup your computer to complete the exercises +in this workshop. -# Running the lessons on your local machine +1. Running locally on your personal computer +2. Running the exercises in your browser using a remote environment called Gitpod. -## Training directory +## Running locally on your personal computer + + +### Training directory Each learner should setup a training folder e.g. `nf-training` @@ -27,7 +34,7 @@ There are three items that you need to download: -## Training software +### Training software A list of software with version required for this training is listed below: @@ -40,12 +47,12 @@ A list of software with version required for this training is listed below: |multiqc|1.10| |python|3.8| -### conda +#### conda The simplest way to install the software for this course is using conda. -To install conda see [here](https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/setup/). +To install conda see [here](https://carpentries-incubator.github.io/introduction-to-conda-for-data-scientists/setup/). An environment file is provided here [environment.yml](https://raw.githubusercontent.com/carpentries-incubator/workflows-nextflow/main/episodes/data/environment.yml) @@ -53,7 +60,7 @@ An environment file is provided here [environment.yml](https://raw.githubusercon wget wget https://raw.githubusercontent.com/carpentries-incubator/workflows-nextflow/main/episodes/data/environment.yml -# or curl +# or curl curl -L -o environment.yml https://raw.githubusercontent.com/carpentries-incubator/workflows-nextflow/main/episodes/data/environment.yml ``` @@ -69,7 +76,7 @@ Then activate the environment by running conda activate nf-training ``` -## Training scripts +### 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. @@ -89,7 +96,7 @@ curl -L -o main.zip https://github.com//carpentries-incubator/workflows-nextflow # unzip the script file unzip main.zip 'workflows-nextflow-main/episodes/files/scripts*' -d . -# mv the scripts folder to the nf-training folder +# mv the scripts folder to the nf-training folder mv workflows-nextflow-main/episodes/files/scripts . # remove the zip file and the git repo @@ -99,7 +106,7 @@ 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. -### Data +#### Data Inside the `nf-training` folder download the workshop dataset from Figshare, [https://figshare.com/articles/dataset/RNA-seq\_training\_dataset/14822481](https://figshare.com/articles/dataset/RNA-seq_training_dataset/14822481) @@ -117,23 +124,23 @@ tar -xvf data.tar.gz rm data.tar.gz ``` -## Visual Studio Code editor setup +### Visual Studio Code editor setup Any text editor can be used to write Nextflow scripts. A recommended code editor is [Visual Studio Code](https://code.visualstudio.com/). Go to [Visual Studio Code](https://code.visualstudio.com/) 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 in Visual Studio Code +#### Nextflow language support in Visual Studio Code You can add Nextflow language support in Visual Studio Code by clicking the [install](https://marketplace.visualstudio.com/items?itemName=nextflow.nextflow) button on the Nextflow language extension. -## Nextflow install without conda +### Nextflow install without conda 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 -## Nextflow installation +### Nextflow installation Install the latest version of Nextflow copy \& pasting the following snippet in a terminal window: @@ -145,7 +152,7 @@ java -version curl -s https://get.nextflow.io | bash ``` -## Add Nextflow binary to your user's PATH: +### Add Nextflow binary to your user's PATH: ```bash mv nextflow ~/bin/ @@ -159,14 +166,31 @@ Check the correct installation running the following command: nextflow info ``` -## nf-core/tools installation without conda +### nf-core/tools installation without conda -### Pip +#### Pip ```bash pip install nf-core ``` +## Running exercises remotely in your web-browser through Gitpod. + +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. + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/carpentries-incubator/workflows-nextflow) +Gitpod sessions automatically close after some period of inactivity. +To open your session again, go to the [Gitpod Dashboard](https://gitpod.io/workspaces) +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).