From 848b371d43d60e01e0da7e4726c24f938628d796 Mon Sep 17 00:00:00 2001 From: apca Date: Mon, 25 Nov 2024 12:33:53 +0100 Subject: [PATCH] Updated RunningRealWorkflow and SeqeraPlatform --- course_contents/RunningRealWorkflow.md | 15 ++++++++++++--- course_contents/SeqeraPlatform.md | 11 ++++++++--- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/course_contents/RunningRealWorkflow.md b/course_contents/RunningRealWorkflow.md index 4666ab9..7fe38cb 100644 --- a/course_contents/RunningRealWorkflow.md +++ b/course_contents/RunningRealWorkflow.md @@ -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: @@ -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`). \ No newline at end of file +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` diff --git a/course_contents/SeqeraPlatform.md b/course_contents/SeqeraPlatform.md index 1f70956..cba4c84 100644 --- a/course_contents/SeqeraPlatform.md +++ b/course_contents/SeqeraPlatform.md @@ -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 -``` \ No newline at end of file +``` + +If it run properly you should have got an URL like this one: `Monitor the execution with Seqera Platform using this URL: `. 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. +