Skip to content

Commit

Permalink
Updated RunningRealWorkflow and SeqeraPlatform
Browse files Browse the repository at this point in the history
  • Loading branch information
apca committed Nov 25, 2024
1 parent 17beb8c commit 848b371
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
15 changes: 12 additions & 3 deletions course_contents/RunningRealWorkflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ 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).

> This pipeline requires Docker as every process is run inside a Docker container. On other words an environment where the required operation system and software is installed with all dependencies. Nextflow uses generally containerization tools like Docker, Singularity, or Conda to ensure reproducibility of the results.
> To avoid permission issues with Docker we will run nextflow being super user (`sudo`)
```{code-block} groovy
:caption: Running rnaseq pipeline (scrip7.nf)
nextflow run script7.nf -with-docker
sudo nextflow run script7.nf -with-docker
```

After few minutes you should have run succesfully your first rnaseq pipeline! Time to check your results:
Expand All @@ -43,10 +46,16 @@ 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:
In order to avoid to add the option `-with-docker`, you can customize your config file. Let's create a config file `course.config` and add the following:
```{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`).
Let's run again the workflow by calling our config file:
```{code-block} groovy
:caption: Running rnaseq pipeline (scrip7.nf) with course.config
sudo nextflow run script7.nf -c course.config
```

You are are welcome to have a look to the file that was downloaded `nextflow.config`, to see what usually these files contain and realise how important they are to setup the environment for the nextflow runs. The config file `nextflow.config` must be in the same folder where you are running your main script (`main.nf`) otherwise you need to specify the location with `-c`
11 changes: 8 additions & 3 deletions course_contents/SeqeraPlatform.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ Seqera platform can help us by:
## Run hello.nf script and follow the run in Seqera platform

First you need to create an account and create an access token. Later you need to export the token to your system:

```bash
export TOWER_ACCESS_TOKEN=copyandpastetokenfromtheSqeraPlatformhere
```

Now get back to the directory where the `hello.nf` script is.
```bash
cd ../..
```
Lets's run our first nextflow script in Seqera with the addition of the -with-tower command:

```{code-block} groovy
:caption: hello.nf capturing logs in Seqera platform
nextflow run hello.nf -with-tower
```
```

If it run properly you should have got an URL like this one: `Monitor the execution with Seqera Platform using this URL: <https://cloud.seqera.io/user/apca1/watch/1CexaaYrhJc2JE>`. If you copy and paste that link in your browser you get a report of the workflow run with logs information (run information, cpus used, memory used, processes that succeded, processes that failed, etc...). This can be categorized as you desire and the runs can be shared among your collaborators. Pipelines can also be launched from the Platform.

0 comments on commit 848b371

Please sign in to comment.