Skip to content

Commit b7f5fd0

Browse files
committed
use nextflow clone not nfcore download
1 parent ae999a0 commit b7f5fd0

2 files changed

Lines changed: 19 additions & 48 deletions

File tree

docs/session_1/1.2_run.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,6 @@ Alternatively, you could build your own execution command with the command line
174174

175175
![](../assets/1.2_downloadhelp.png){width=100%}
176176

177-
We will use `nf-core pipelines download` to download a workflow later on today.
178-
179177
## 1.2.4 Executing a workflow
180178

181179
Nextflow seamlessly integrates with code repositories such as [GitHub](https://github.com/). This feature allows you to manage your project code and use public Nextflow workflows — including nf-core workflows — quickly, consistently, and transparently.
@@ -327,6 +325,8 @@ More information about the Nextflow `run`, `pull`, and `clone` commands can be f
327325

328326
As you can see, there are a few different ways you can go about running a nextflow or nf-core pipeline. We recommend using either the `nextflow clone` command or directly cloning the repository with `git clone`. This is because it is the most flexible approach and gives you control over exacly what version of the workflow is being downloaded and where it is being downloaded to (instead of all pipelines going to `$HOME/.nextflow/assets` as with `nextflow pull`/`nextflow run`).
329327

328+
The one exception to this is when you need to execute an **nf-core pipeline** in an environment **without an internet connection**. In this case, the recommendation is to use the `nf-core pipelines download` method [mentioned above](#nf-core-pipelines-download), as this tool allows you to localise all of the required configuration files and singularity images for offline use.
329+
330330
## 1.2.5 Nextflow log
331331

332332
It is important to keep a record of the commands you have run to generate your results. Nextflow helps with this by creating and storing metadata and logs about the run in hidden files and folders in your current directory (unless otherwise specified). This data can be used by Nextflow to generate reports. It can also be queried using the Nextflow `log` command:

docs/session_1/1.4_rnaseq.md

Lines changed: 17 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -36,46 +36,31 @@ Before we proceed, let's create a fresh working directory for all our experiment
3636

3737
### Download the pipeline code
3838

39-
!!! example "Exercise 1.4.1"
40-
41-
Recall from [Lesson 1.2.3](./1.2_run.md#123-nf-core-tools) that the `nf-core` tools utility has a `download` command that can be used to localise an entire workflow along with its dependencies to your computer.
42-
43-
Use the `nf-core pipelines download` command to download a local copy of the `nf-core/rnaseq` workflow that:
39+
As mentioned above, we will be working with version 3.23.0 of the nf-core/rnaseq pipeline for the rest of the workshop. Go ahead and download that to your working directory now.
4440

45-
- Downloads pipeline version 3.23.0
46-
- Outputs the code base to `~/session2/nf-core-rnaseq-3.23.0/`
47-
- Disables downloading the prerequisite Singularity containers (since we have already prepared these beforehand for you!)
48-
- Downloads the institutional configs from [nf-core/configs](https://github.com/nf-core/configs)
41+
!!! example "Exercise 1.4.1"
4942

50-
**Remember,** you can use `nf-core pipelines download --help` to review the available parameters for the `download` command.
43+
Clone the `nf-core/rnaseq` pipeline to your working directory. **Ensure that you download the version `3.23.0`**.
5144

5245
??? success "Solution"
5346

54-
We can fetch the workflow code base with the following command:
47+
Recall from [earlier today](1.2_run.md#124-executing-a-workflow) that we can clone a workflow with `nextflow clone`. Recall also that we can pull a specific version of the workflow with the `-r` parameter:
5548

5649
```bash
57-
nf-core pipelines download rnaseq \
58-
--revision 3.23.0 \
59-
--outdir ~/session2/nf-core-rnaseq-3.23.0 \
60-
--container-system none \
61-
--compress none \
62-
--download-configuration yes
50+
nextflow clone -r 3.23.0 nf-core/rnaseq
6351
```
6452

65-
The pipeline files and institutional configuration files from [nf-core/configs](https://github.com/nf-core/configs) will be downloaded to `~/session2/nf-core-rnaseq-3.23.0`. Inside this directory you will see 2 subdirectories.
66-
67-
Let's have a look at the directory structure.
53+
The pipeline files will be downloaded to `~/session2/rnaseq`. Let's have a look at the directory structure.
6854

6955
!!! example "List the downloaded directory contents"
7056

7157
```bash
72-
ls -lh nf-core-rnaseq-3.23.0/*
58+
ls -lh rnaseq
7359
```
7460

7561
You should see the following:
7662

7763
```console title="Output"
78-
nf-core-rnaseq-3.23.0/3_23_0:
7964
total 340K
8065
drwxrwxr-x 2 tdev01 tdev01 4.0K Apr 16 03:31 assets
8166
drwxrwxr-x 2 tdev01 tdev01 4.0K Apr 16 03:31 bin
@@ -97,23 +82,9 @@ Let's have a look at the directory structure.
9782
drwxrwxr-x 2 tdev01 tdev01 4.0K Apr 16 03:31 tests
9883
-rwxrwxr-x 1 tdev01 tdev01 3.0K Apr 16 03:31 tower.yml
9984
drwxrwxr-x 3 tdev01 tdev01 4.0K Apr 16 03:31 workflows
100-
101-
nf-core-rnaseq-3.23.0/configs:
102-
total 68K
103-
drwxrwxr-x 2 tdev01 tdev01 4.0K Apr 16 03:31 bin
104-
-rwxrwxr-x 1 tdev01 tdev01 1.6K Apr 16 03:31 CITATION.cff
105-
drwxrwxr-x 5 tdev01 tdev01 4.0K Apr 16 03:31 conf
106-
-rwxrwxr-x 1 tdev01 tdev01 273 Apr 16 03:31 configtest.nf
107-
drwxrwxr-x 4 tdev01 tdev01 4.0K Apr 16 03:31 docs
108-
-rwxrwxr-x 1 tdev01 tdev01 1.1K Apr 16 03:31 LICENSE
109-
-rwxrwxr-x 1 tdev01 tdev01 69 Apr 16 03:31 nextflow.config
110-
-rwxrwxr-x 1 tdev01 tdev01 15K Apr 16 03:31 nfcore_custom.config
111-
drwxrwxr-x 2 tdev01 tdev01 4.0K Apr 16 03:31 pipeline
112-
-rwxrwxr-x 1 tdev01 tdev01 17K Apr 16 03:31 README.md
113-
11485
```
11586

116-
The public [institutional configs](https://github.com/nf-core/configs) were downloaded to the `configs` directory. The code base for our pipeline will be stored in the `3_23_0` directory, named after the revision of the pipeline that we requested (`--revision 3.23.0`). The files and directories we will be working with in this session are:
87+
The files and directories we will be interacting with in this workshop are:
11788

11889
|Feature |Importance |
11990
|-----------------------|-------------------------------------------------------------------|
@@ -183,7 +154,7 @@ The number and type of default and optional parameters an nf-core pipeline accep
183154
Recall that we can print out pipeline information, including available paramters, with the `--help` parameter. Print out the available parameters for the `nf-core/rnaseq` pipeline by running:
184155

185156
```bash
186-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 --help
157+
nextflow run rnaseq --help
187158
```
188159

189160
The typical or recommended run command for this pipeline is provided at the top of the screen:
@@ -294,7 +265,7 @@ Many nf-core pipelines have a minimum requirement for reference data inputs. The
294265
!!! example "Find the available parameters for specifying reference files"
295266

296267
```bash
297-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 --help
268+
nextflow run rnaseq --help
298269
```
299270

300271
The <u>**Reference genome options**</u> section lists all of the reference file options we could possibly provide:
@@ -357,22 +328,22 @@ The pipeline requires us to define both an input samplesheet and an output direc
357328
Start by writing out the basic `nextflow run` command:
358329

359330
```bash
360-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
331+
nextflow run rnaseq \
361332
```
362333

363334
**Note** that we have added a space and a backslash (` \`) to the end of the line so we may continue writing the full command over multiple lines for legibility. If you hit `Enter` now, the command won't run yet, but you will be provided a new line to continue writing.
364335

365336
Next, add the `--input` parameter and pass it the path to the samplesheet. Be sure to replace `<USERNAME>` with your provided user name:
366337

367338
```bash hl_lines="2"
368-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
339+
nextflow run rnaseq \
369340
--input /home/<USERNAME>/data/samplesheet.csv \
370341
```
371342

372343
Finally, add the `--outdir` parameter and give it the name `lesson-1.4`:
373344

374345
```bash hl_lines="3"
375-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
346+
nextflow run rnaseq \
376347
--input /home/<USERNAME>/data/samplesheet.csv \
377348
--outdir lesson-1.4 \
378349
```
@@ -390,7 +361,7 @@ With the inputs and outputs defined, we next need to tell the pipeline where to
390361
Following on from the last line from Exercise 1.4.2.1, add the `--fasta`, `--gtf`, `--star_index`, and `--salmon_index` parameters, and pass them the files we determined above in [Reference data](#reference-data):
391362

392363
```bash hl_lines="4-7"
393-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
364+
nextflow run rnaseq \
394365
--input /home/<USERNAME>/data/samplesheet.csv \
395366
--outdir lesson-1.4 \
396367
--fasta /home/<USERNAME>/data/mm10_reference/mm10_chr18.fa \
@@ -417,7 +388,7 @@ Now that we have prepared our input and reference data, we have defined all the
417388
Finish writing the run command by adding the `-profile` and `--skip_markduplicates` parameters:
418389

419390
```bash hl_lines="8-9"
420-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
391+
nextflow run rnaseq \
421392
--input /home/<USERNAME>/data/samplesheet.csv \
422393
--outdir lesson-1.4 \
423394
--fasta /home/<USERNAME>/data/mm10_reference/mm10_chr18.fa \
@@ -508,7 +479,7 @@ We now have a finished initial run command. Now we just need to update our run c
508479
Our final run command and default config file look like:
509480

510481
```bash hl_lines="11-13"
511-
nextflow run nf-core-rnaseq-3.23.0/3_23_0 \
482+
nextflow run rnaseq \
512483
--input /home/<USERNAME>/data/samplesheet.csv \
513484
--outdir lesson-1.4 \
514485
--fasta /home/<USERNAME>/data/mm10_reference/mm10_chr18.fa \
@@ -583,7 +554,7 @@ In the meantime, list the contents of your directory. You will see a few new dir
583554
drwxrwxr-x 4 tdev01 tdev01 4.0K Apr 20 01:34 .nextflow
584555
-rw-rw-r-- 1 tdev01 tdev01 79 Apr 17 03:43 nectar_vm.config
585556
-rw-rw-r-- 1 tdev01 tdev01 150K Apr 20 01:34 .nextflow.log
586-
drwxrwxr-x 4 tdev01 tdev01 4.0K Apr 17 06:55 nf-core-rnaseq-3.23.0
557+
drwxrwxr-x 4 tdev01 tdev01 4.0K Apr 17 06:55 rnaseq
587558
drwxrwxr-x 66 tdev01 tdev01 4.0K Apr 20 01:32 work
588559
```
589560

0 commit comments

Comments
 (0)