Skip to content

Commit

Permalink
Found a solution to run rnaseq from Nextflow training material
Browse files Browse the repository at this point in the history
  • Loading branch information
apca committed Nov 18, 2024
1 parent bff47ea commit 8849083
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
36 changes: 32 additions & 4 deletions course_contents/RunningRealWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
```

>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`).
2 changes: 1 addition & 1 deletion course_information/Instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 8849083

Please sign in to comment.