Skip to content

Commit 5d74628

Browse files
committed
Further modify the tutorials based on reviews
1 parent db3a345 commit 5d74628

3 files changed

Lines changed: 46 additions & 38 deletions

File tree

docs/usage/bulk_tutorial.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,17 @@ This tutorial provides a step by step introduction on how to run nf-core/airrflo
66

77
You can run this tutorial using the Github Codespaces platform. Codespaces already has Nextflow and Singularity pre-installed, and it can automatically be used for every nf-core repository. To create a Codespace instance for nf-core/airrflow, first click on the button labelled `Code` at the top of [nf-core/airrflow repository](https://github.com/nf-core/airrflow).
88

9-
In the dropdown menu, go to the `Codespaces` tab. You can create a basic "2-core" Codespace by clicking the `+` icon. However, as more CPUs and memories are needed for nf-core/airrflow task, you need to press the `...` sign and choose `+ New with options...`.
9+
In the dropdown menu, go to the `Codespaces` tab. Click the `...` sign, then select `+ New with options...`.
1010

1111
![Create Codespaces with options](../images/Create_codespaces.png)
1212

13-
Afterwards, you will be directed to another page to choose the setting of your platform. Select `4-core` for `machine type`, which will give you 4 CPUs, 16GB RAM and 32GB space.
13+
After that, you’ll be directed to the configuration page. Select "4-core" for `machine type`, which will give you 4 CPUs, 16GB RAM and 32GB space.
1414

1515
![Chose 4-core](../images/Codespaces_4core.png)
1616

17-
If you want to know more about Codespaces, check [the Codespaces overview](https://docs.github.com/en/codespaces/about-codespaces/what-are-codespaces) or the Codespaces part in [the Devcontainers overview](https://nf-co.re/docs/tutorials/devcontainer/overview).
17+
If you want to know more about Codespaces, check [the Codespaces overview](https://docs.github.com/en/codespaces/about-codespaces/what-are-codespaces) or the Codespaces section in nf-core documentation [the Devcontainers overview](https://nf-co.re/docs/tutorials/devcontainer/overview).
18+
19+
When running this tutorial on your local machine, you'll first have to set up Nextflow and a container engine (Docker or Singularity).
1820

1921
> [!NOTE]
2022
> If you want to run this tutorial on your local machine, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set up Nextflow and a container engine needed to run this pipeline. At the moment, nf-core/airrflow does NOT support using conda virtual environments for dependency management, only containers are supported. Make sure to [test your setup](https://nf-co.re/docs/usage/introduction#how-to-run-a-pipeline) before running the workflow on actual data. To install Docker, follow the [instructions](https://docs.docker.com/engine/install/). After installation Docker on Linux, don't forget to check the [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/).
@@ -26,7 +28,14 @@ Once you have set up Nextflow and container (Docker or Singularity) for your loc
2628
```bash
2729
nextflow run nf-core/airrflow -r 4.3.1 -profile test,docker --outdir test_results
2830
```
29-
Change the `docker` profile to `singularity` if you use Codespace since The docker profile currently does not work in Codespaces.
31+
Change the `docker` profile to `singularity` if you use Codespaces since Docker currently cannot be used in Codespaces. You can first set up a Singularity cache directory which will allow the reuse of Singularity container across all runs:
32+
33+
```bash
34+
mkdir singularity_cache
35+
export NXF_SINGULARITY_CACHEDIR="/workspaces/airrflow/singularity_cache"
36+
```
37+
38+
Then run nf-core/airrflow with the test data:
3039

3140
```bash
3241
nextflow run nf-core/airrflow -r 4.3.1 -profile test,singularity --outdir test_results
@@ -35,13 +44,16 @@ nextflow run nf-core/airrflow -r 4.3.1 -profile test,singularity --outdir test_r
3544
> [!NOTE]
3645
> The '-r' flag in the command specifies which nf-core/airrflow release to run. We recommend always [checking](https://nf-co.re/airrflow/releases_stats/) and using the latest release.
3746
47+
> [!NOTE]
48+
> Because Codespaces provides limited CPU and RAM resources, the test run may take 20-25 minutes. The process will be faster on systems with greater CPU and RAM capacity.
49+
3850
If the tests run through correctly, you should see this output in your command line:
3951

4052
```bash
4153
-[nf-core/airrflow] Pipeline completed successfully-
42-
Completed at: 17-Nov-2025 19:53:55
43-
Duration : 19m 48s
44-
CPU hours : 1.0
54+
Completed at: 25-Nov-2025 21:07:46
55+
Duration : 23m 56s
56+
CPU hours : 1.1
4557
Succeeded : 221
4658
```
4759

@@ -63,12 +75,12 @@ process {
6375
```
6476

6577
> [!TIP]
66-
> Before setting memory and cpus in the configuration file, we recommend verifying the available memory and cpus on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more cpus than available or run out of memory.
78+
> Before setting memory and CPUs in the configuration file, we recommend verifying the available memory and CPUs on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more CPUs than available or run out of memory.
6779
6880
> [!NOTE]
6981
> When running nf-core/airrflow with your own data, provide the full path to your input files under the filename column.
7082
71-
We prepared the [samplesheet](https://github.com/nf-core/airrflow/tree/dev/docs/usage/bulk_tutorial/bulk_sample_code/metadata_pcr_umi_airr_300.tsv) and the [configuration file](https://github.com/nf-core/airrflow/tree/dev/docs/usage/bulk_tutorial/bulk_sample_code/resource.config) for this tutorial. If you run the pipeline locally, download both files to the directory where you intend to run nf-core/airrflow.
83+
We prepared the [samplesheet](https://github.com/nf-core/airrflow/tree/dev/docs/usage/bulk_tutorial/bulk_sample_code/metadata_pcr_umi_airr_300.tsv) and the [configuration file](bulk_tutorial/bulk_sample_code/resource.config) for this tutorial. If you run the pipeline locally, download both files to the directory where you intend to run nf-core/airrflow.
7284

7385
## Choosing the right protocol profile
7486

docs/usage/single_cell_tutorial.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,51 +6,55 @@ This tutorial provides a step by step introduction on how to run nf-core/airrflo
66

77
You can run this tutorial using the Github Codespaces platform. Codespaces already has Nextflow and Singularity pre-installed, and it can automatically be used for every nf-core repository. To create a Codespace instance for nf-core/airrflow, first click on the button labelled `Code` at the top of [nf-core/airrflow repository](https://github.com/nf-core/airrflow).
88

9-
In the dropdown menu, go to the `Codespaces` tab. After clicking on the `...` sign, and the `+ New with options...` button.
9+
In the dropdown menu, go to the `Codespaces` tab. Click the `...` sign, then select `+ New with options...`.
1010

1111
![Create Codespaces with options](../images/Create_codespaces.png)
1212

13-
Choose the setting of your platform. Select "4-core" for `machine type`, which will give you 4 CPUs, 16GB RAM and 32GB space.
13+
After that, you’ll be directed to the configuration page. Select "4-core" for `machine type`, which will give you 4 CPUs, 16GB RAM and 32GB space.
1414

1515
![Chose 4-core](../images/Codespaces_4core.png)
1616

17-
If you want to know more about Codespaces, check [the Codespaces overview](https://docs.github.com/en/codespaces/about-codespaces/what-are-codespaces) or the Codespaces section in [the Devcontainers overview](https://nf-co.re/docs/tutorials/devcontainer/overview) nf-core documentation.
17+
If you want to know more about Codespaces, check [the Codespaces overview](https://docs.github.com/en/codespaces/about-codespaces/what-are-codespaces) or the Codespaces section in nf-core documentation [the Devcontainers overview](https://nf-co.re/docs/tutorials/devcontainer/overview).
1818

19-
The Codespaces environment already comes with Singularity and Nextflow pre-installed. When running this tutorial on your local machine, you'll first have to set up Nextflow and a container engine (Docker or Singularity).
19+
When running this tutorial on your local machine, you'll first have to set up Nextflow and a container engine (Docker or Singularity).
2020

2121
> [!NOTE]
2222
> If you want to run this tutorial on your local machine, please refer to [this page](https://nf-co.re/docs/usage/installation) on how to set up Nextflow and a container engine needed to run this pipeline. At the moment, nf-core/airrflow does NOT support using conda virtual environments for dependency management, only containers are supported. To install Docker, follow the [instructions](https://docs.docker.com/engine/install/). After installation Docker on Linux, don't forget to check the [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/).
2323
2424
## Testing the pipeline with built-in tests
2525

26-
Once you have set up Nextflow and container (Docker or Singularity) for your local machine or Codespace environment, test nf-core/airrflow with the built-in test data.
26+
Once you have set up Nextflow and container (Docker or Singularity) for your local machine or Codespaces environment, test nf-core/airrflow with the built-in test data.
2727

2828
```bash
29-
nextflow run nf-core/airrflow -r 4.3.1 -profile test_assembled_hs,docker --outdir test_results
29+
nextflow run nf-core/airrflow -r 4.3.1 -profile test,docker --outdir test_results
3030
```
31-
Change the `docker` profile to `singularity` if you use Codespaces since Docker currently cannot be used in Codespaces.
32-
33-
We can first set up a Singularity cache directory. This will allow us to reuse the containers across all runs:
31+
Change the `docker` profile to `singularity` if you use Codespaces since Docker currently cannot be used in Codespaces. You can first set up a Singularity cache directory which will allow the reuse of Singularity container across all runs:
3432

3533
```bash
3634
mkdir singularity_cache
3735
export NXF_SINGULARITY_CACHEDIR="/workspaces/airrflow/singularity_cache"
36+
```
37+
38+
Then run nf-core/airrflow with the test data:
3839

3940
```bash
40-
nextflow run nf-core/airrflow -r 4.3.1 -profile test_assembled_hs,singularity --outdir test_results
41+
nextflow run nf-core/airrflow -r 4.3.1 -profile test,singularity --outdir test_results
4142
```
4243

4344
> [!NOTE]
4445
> The '-r' flag in the command specifies which nf-core/airrflow release to run. We recommend always [checking](https://nf-co.re/airrflow/releases_stats/) and using the latest release.
4546
47+
> [!NOTE]
48+
> Because Codespaces provides limited CPU and RAM resources, the test run may take 20-25 minutes. The process will be faster on systems with greater CPU and RAM capacity.
49+
4650
If the tests run through correctly, you should see this output in your command line:
4751

4852
```bash
4953
-[nf-core/airrflow] Pipeline completed successfully-
50-
Completed at: 25-Nov-2025 16:23:32
51-
Duration : 11m 43s
52-
CPU hours : 0.4
53-
Succeeded : 32
54+
Completed at: 25-Nov-2025 21:07:46
55+
Duration : 23m 56s
56+
CPU hours : 1.1
57+
Succeeded : 221
5458
```
5559

5660
## Supported input formats
@@ -80,21 +84,18 @@ The samplesheet collects experimental details that are important for the data an
8084

8185
Details on the required columns of a samplesheet are available [here](https://nf-co.re/airrflow/usage#assembled-input-samplesheet-bulk-or-single-cell-sequencing).
8286

83-
The resource configuration file sets the compute infrastructure maximum available number of CPUs, RAM memory and running time. This will ensure that no pipeline process requests more resources than available in the compute infrastructure where the pipeline is running. The resource config should be provided with the `-c` option. In this example we set the maximum RAM memory to 16GB, we restrict the pipeline to use 4 CPUs and to run for a maximum of 24 hours.
87+
The resource configuration file sets the compute infrastructure maximum available number of CPUs, RAM memory and running time. This will ensure that no pipeline process requests more resources than available in the compute infrastructure where the pipeline is running. The resource config should be provided with the `-c` option. In this example we set the maximum RAM memory to 15GB, we restrict the pipeline to use 4 CPUs and to run for a maximum of 24 hours.
8488

8589
```json title="resource.config"
8690
process {
87-
resourceLimits = [ memory: 16.GB, time: 24.h, cpus: 4 ]
88-
}
89-
apptainer{
90-
cacheDir = "/workspaces/airrflow/singularity_cache"
91+
resourceLimits = [ memory: 15.GB, time: 24.h, cpus: 4 ]
9192
}
9293
```
9394

94-
We prepared the [samplesheet](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/assembled_samplesheet.tsv) and the [configuration file](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/resource.config) for this tutorial. Download both files to the directory where you intend to run nf-core/airrflow.
95+
We prepared the [samplesheet](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/assembled_samplesheet.tsv) and the [configuration file](single_cell_tutorial/sample_data_code/resource.config) for this tutorial. Download both files to the directory where you intend to run nf-core/airrflow.
9596

9697
> [!TIP]
97-
> Before setting memory and cpus in the configuration file, we recommend verifying the available memory and cpus on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more cpus than available or run out of memory. You can also remove the "time" parameter from the configuration file to allow for unlimited runtime for large-size dataset.
98+
> Before setting memory and CPUs in the configuration file, we recommend verifying the available memory and CPUs on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more CPUs than available or run out of memory. You can also remove the "time" parameter from the configuration file to allow for unlimited runtime for large-size dataset.
9899
99100
> [!NOTE]
100101
> When running nf-core/airrflow with your own data, provide the full path to your input files under the filename column.
@@ -113,7 +114,7 @@ nextflow run nf-core/airrflow -r 4.3.1 \
113114
-resume
114115
```
115116

116-
Of course you can wrap all your code in a [bash file](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/airrflow_sc_from_assembled.sh). With the bash file, it's easy to run the pipeline with a single-line command.
117+
Of course you can wrap all your code in a [bash file](single_cell_tutorial/sample_data_code/airrflow_sc_from_assembled.sh). With the bash file, it's easy to run the pipeline with a single-line command.
117118

118119
```bash
119120
bash airrflow_sc_from_assembled.sh
@@ -177,7 +178,7 @@ To run nf-core/airrflow on single cell TCR or BCR sequencing data from fastq fil
177178
We prepared the [samplesheet](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/10x_sc_raw.tsv) and the [configuration file](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/resource.config) for this tutorial. Download these two files to the directory where you intend to run nf-core/airrflow.
178179

179180
> [!TIP]
180-
> Before setting memory and cpus in the configuration file, we recommend verifying the available memory and cpus on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more cpus than available or run out of memory.
181+
> Before setting memory and CPUs in the configuration file, we recommend verifying the available memory and CPUs on your system. Otherwise, exceeding the system's capacity may result in an error indicating that you requested more CPUs than available or run out of memory.
181182
182183
Pre-built 10x genomics V(D)J references can be accessed at the [10x Genomics website](https://www.10xgenomics.com/support/software/cell-ranger/downloads). Both human and mouse V(D)J references are available. Download the reference that corresponds to the species of your dataset.
183184

@@ -200,7 +201,7 @@ nextflow run nf-core/airrflow -r 4.3.1 \
200201

201202
In this tutorial, since the samples are TCRs, which do not have somatic hypermutation, clones are defined strictly by identical junction regions. For this reason, we set the `--clonal_threshold` parameter to 0. For more details on important considerations when performing clonal analysis check [FAQ](./FAQ.md).
202203

203-
Of course you can wrap all your code in a bash file. We prepared one for you and it's available [here](https://github.com/nf-core/airrflow/blob/dev/docs/usage/single_cell_tutorial/sample_data_code/airrflow_sc_from_fastq.sh).
204+
Of course you can wrap all your code in a bash file. We prepared one for you and it's available [here](single_cell_tutorial/sample_data_code/airrflow_sc_from_fastq.sh).
204205
With the bash file, it's easy to run the pipeline with a single-line command.
205206

206207
```bash
@@ -209,7 +210,6 @@ bash airrflow_sc_from_fastq.sh
209210

210211
> [!NOTE]
211212
> Due to the limited RAM and storage space, the single cell raw reads example in this tutorial cannot be run on Codespace.
212-
```bash
213213
214214
After launching the pipeline the following will be printed to the console output, followed by some the default parameters used by the pipeline and execution log of airrflow processes:
215215

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
process {
22
resourceLimits = [ memory: 15.GB, time: 24.h, cpus: 4 ]
33
}
4-
5-
apptainer{
6-
cacheDir = "/workspaces/airrflow/singularity_cache"
7-
}

0 commit comments

Comments
 (0)