From 88490832adc4df7eb3b44632c96dddba6f6f3db0 Mon Sep 17 00:00:00 2001 From: apca Date: Mon, 18 Nov 2024 17:03:30 +0100 Subject: [PATCH] Found a solution to run rnaseq from Nextflow training material --- course_contents/RunningRealWorkflow.md | 36 +++++++++++++++++++++++--- course_information/Instructions.md | 2 +- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/course_contents/RunningRealWorkflow.md b/course_contents/RunningRealWorkflow.md index b48cf3b..4666ab9 100644 --- a/course_contents/RunningRealWorkflow.md +++ b/course_contents/RunningRealWorkflow.md @@ -11,14 +11,42 @@ This pipeline that we will run will cover the following 4 steps using diffrent c This is based on this part of [Nextflow tutorial](https://training.nextflow.io/basic_training/rnaseq_pipeline/). There you can find the pipeline broken into the different pieces in a collection of 7 different scripts if you want to get into the details. -In this part of the tutorial you can also see that Nextflow allows the execution of a workflow project directly from a GitHub repository. This [GitHub repository](https://github.com/nextflow-io/rnaseq-nf) hosts a version of this tutorial workflow (first 4 steps with some test data). You can run it specifying the project name and executing each process in a Docker container (`with-docker` as parameter). The containers will be automatically downloaded and saved in the folder `$HOME/.nextflow`. +To be able to run this pipeline we will clone the training repository from Nextflow training materials in github. Here you can enjoy the hello training, their fundamentals training based on the rnaseq pipeline and the advanced training with all data, files and scripts needed. -```groovy -nextflow run nextflow-io/rnaseq-nf -with-docker +First cloning with `git clone`: +```bash +git clone https://github.com/nextflow-io/training.git +``` +And then move to `training/nf-training`: +```bash +cd training/nf-training +``` +Here there are a colloection of 7 scripts where the rnaseq pipeline (a small version of it) is broken into the different parts. It is great training material and I recommend you go through if you want to keep learning Nextflow. For today we will run the last script that contains all the parts we want to run (Indexing transcriptome file, fastQC, Salmon for quantification and MultiQC to see a final report of our run). + +```{code-block} groovy +:caption: Running rnaseq pipeline (scrip7.nf) +nextflow run script7.nf -with-docker +``` + +After few minutes you should have run succesfully your first rnaseq pipeline! Time to check your results: +```bash +tree -a results +tree -a work +ls results ``` +Let's have a look to an interesting report that we get summarizing the different steps of the pipeline. For that you may jave to go to Extensions icon in VSCode and install Live Preview. And then: +```bash +code results/multiqc_report.html +``` +Then on the top right corner look for the icon `Show Preview`. + +MultiQC report aggregates results from the pipeline steps (from all the softwares that is compatible with - quite many). In this case it shows some general statistics, fastQC results, and the Quantification information. + In order to avoid to add the option `-with-docker` add the following line in the `nextflow.config` file: ```{code-block} groovy :caption: nextflow.config docker.enabled = true -``` \ No newline at end of file +``` + +>Remember that I mentioned in the theoretical part that usually nextflow script are run with the minimal environment settings specified in a config file (`nextflow.config`) placed in the same folder where you are running your main script (`main.nf`). \ No newline at end of file diff --git a/course_information/Instructions.md b/course_information/Instructions.md index a5e3048..d2a323e 100644 --- a/course_information/Instructions.md +++ b/course_information/Instructions.md @@ -36,7 +36,7 @@ nextflow info docker --version ``` -If everything went weel you have a fully functional Nextflow environment for today. Rememeber that we are going to use VS code as our editor to write code and handle our files. +If everything went well you have a fully functional Nextflow environment for today. Rememeber that we are going to use VS code as our editor to write code and handle our files. ## Local installation