|
6 | 6 |
|
7 | 7 | ## Introduction |
8 | 8 |
|
9 | | -<!-- TODO nf-core: Add documentation about anything specific to running your pipeline. For general topics, please point to (and add to) the main nf-core website. --> |
10 | | - |
11 | 9 | ## Samplesheet input |
12 | 10 |
|
13 | | -You will need to create a samplesheet with information about the samples you would like to analyse before running the pipeline. Use this parameter to specify its location. It has to be a comma-separated file with 3 columns, and a header row as shown in the examples below. |
| 11 | +You will need to create a samplesheet with information about the sample you would like to analyse before running the pipeline. It has to be a comma-separated file with 3 columns, and a header row as shown in the examples below. |
| 12 | + |
| 13 | +```csv title="samplesheet.csv" |
| 14 | +sample,bundle,image |
| 15 | +breast_cancer,/path/to/xenium/bundle,/path/to/morphology.ome.tif |
| 16 | +``` |
| 17 | + |
| 18 | +| Column | Description | |
| 19 | +| -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
| 20 | +| `sample` | `Required`. Custom sample name. It is recommended to follow the same name from the output of the Xenium Onboard Analysis (XOA). Avoid using spaces in the sample name. | |
| 21 | +| `bundle` | `Required`. Full path to the Xenium bundle, output of the Xenium Onboard Analysis. | |
| 22 | +| `image` | `Optional`. Full path to morphology.ome.tif. If not provided, the morphology.ome.tif from the bundle is considered. | |
| 23 | + |
| 24 | +An [example samplesheet](../assets/example_samplesheet.csv) has been provided with the pipeline. |
| 25 | + |
| 26 | +#### Using the samplesheet |
14 | 27 |
|
15 | 28 | ```bash |
16 | 29 | --input '[path to samplesheet file]' |
17 | 30 | ``` |
18 | 31 |
|
19 | | -### Multiple runs of the same sample |
| 32 | +## Running the pipeline |
| 33 | + |
| 34 | +The typical command for running the pipeline is as follows: |
20 | 35 |
|
21 | | -The `sample` identifiers have to be the same when you have re-sequenced the same sample more than once e.g. to increase sequencing depth. The pipeline will concatenate the raw reads before performing any downstream analysis. Below is an example for the same sample sequenced across 3 lanes: |
| 36 | +#### Image-based segmentation mode |
22 | 37 |
|
23 | | -```csv title="samplesheet.csv" |
24 | | -sample,fastq_1,fastq_2 |
25 | | -CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz |
26 | | -CONTROL_REP1,AEG588A1_S1_L003_R1_001.fastq.gz,AEG588A1_S1_L003_R2_001.fastq.gz |
27 | | -CONTROL_REP1,AEG588A1_S1_L004_R1_001.fastq.gz,AEG588A1_S1_L004_R2_001.fastq.gz |
28 | | -``` |
| 38 | +This runs the default image mode:<br> |
| 39 | +`CELLPOSE ➔ BAYSOR ➔ XR-IMPORT-SEGMENTATION ➔ SPATIALDATA ➔ QC` |
29 | 40 |
|
30 | | -### Full samplesheet |
| 41 | +```bash |
| 42 | +nextflow run nf-core/spatialxe \ |
| 43 | + --input ./samplesheet.csv \ |
| 44 | + --outdir ./results \ |
| 45 | + --mode image \ |
| 46 | + -profile <docker/singularity/...> |
| 47 | +``` |
31 | 48 |
|
32 | | -The pipeline will auto-detect whether a sample is single- or paired-end using the information provided in the samplesheet. The samplesheet can have as many columns as you desire, however, there is a strict requirement for the first 3 columns to match those defined in the table below. |
| 49 | +#### Coordinate-based (transcripts-based) segmentation mode |
33 | 50 |
|
34 | | -A final samplesheet file consisting of both single- and paired-end data may look something like the one below. This is for 6 samples, where `TREATMENT_REP3` has been sequenced twice. |
| 51 | +This runs the default coordinate mode:<br> |
| 52 | +`PROSEG ➔ PROSEG2BAYSOR ➔ XR-IMPORT-SEGMENTATION ➔ SPATIALDATA ➔ QC` |
35 | 53 |
|
36 | | -```csv title="samplesheet.csv" |
37 | | -sample,fastq_1,fastq_2 |
38 | | -CONTROL_REP1,AEG588A1_S1_L002_R1_001.fastq.gz,AEG588A1_S1_L002_R2_001.fastq.gz |
39 | | -CONTROL_REP2,AEG588A2_S2_L002_R1_001.fastq.gz,AEG588A2_S2_L002_R2_001.fastq.gz |
40 | | -CONTROL_REP3,AEG588A3_S3_L002_R1_001.fastq.gz,AEG588A3_S3_L002_R2_001.fastq.gz |
41 | | -TREATMENT_REP1,AEG588A4_S4_L003_R1_001.fastq.gz, |
42 | | -TREATMENT_REP2,AEG588A5_S5_L003_R1_001.fastq.gz, |
43 | | -TREATMENT_REP3,AEG588A6_S6_L003_R1_001.fastq.gz, |
44 | | -TREATMENT_REP3,AEG588A6_S6_L004_R1_001.fastq.gz, |
| 54 | +```bash |
| 55 | +nextflow run nf-core/spatialxe \ |
| 56 | + --input ./samplesheet.csv \ |
| 57 | + --outdir ./results \ |
| 58 | + --mode coordinate \ |
| 59 | + -profile <docker/singularity/...> |
45 | 60 | ``` |
46 | 61 |
|
47 | | -| Column | Description | |
48 | | -| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
49 | | -| `sample` | Custom sample name. This entry will be identical for multiple sequencing libraries/runs from the same sample. Spaces in sample names are automatically converted to underscores (`_`). | |
50 | | -| `fastq_1` | Full path to FastQ file for Illumina short reads 1. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | |
51 | | -| `fastq_2` | Full path to FastQ file for Illumina short reads 2. File has to be gzipped and have the extension ".fastq.gz" or ".fq.gz". | |
| 62 | +### Image-based Segmentation mode (--mode image): <br> |
52 | 63 |
|
53 | | -An [example samplesheet](../assets/samplesheet.csv) has been provided with the pipeline. |
| 64 | +- cellpose |
| 65 | +- baysor |
| 66 | +- xeniumranger |
54 | 67 |
|
55 | | -## Running the pipeline |
| 68 | +### Coordinate-based (transcripts-based) Segmentation methods (--mode coordinate): <br> |
56 | 69 |
|
57 | | -The typical command for running the pipeline is as follows: |
| 70 | +- proseg |
| 71 | +- baysor |
| 72 | +- segger |
| 73 | + |
| 74 | +#### Run Segmentation with the methods methods mentioned above : <br> |
| 75 | + |
| 76 | +eg: To run proseg segmentation use the `coordinate` mode and the `proseg` segmentation method |
| 77 | + |
| 78 | +```bash |
| 79 | +nextflow run nf-core/spatialxe \ |
| 80 | + --input ./samplesheet.csv \ |
| 81 | + --outdir ./results \ |
| 82 | + --mode coordinate \ |
| 83 | + --segmentation proseg \ |
| 84 | + -profile <docker/singularity/...> |
| 85 | +``` |
| 86 | + |
| 87 | +eg: To run cellpose segmentation use the `image` mode and the `cellpose` segmentation method |
58 | 88 |
|
59 | 89 | ```bash |
60 | | -nextflow run nf-core/spatialxe --input ./samplesheet.csv --outdir ./results --genome GRCh37 -profile docker |
| 90 | +nextflow run nf-core/spatialxe \ |
| 91 | + --input ./samplesheet.csv \ |
| 92 | + --outdir ./results \ |
| 93 | + --mode image \ |
| 94 | + --segmentation cellpose \ |
| 95 | + -profile <docker/singularity/...> |
61 | 96 | ``` |
62 | 97 |
|
63 | 98 | This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles. |
|
89 | 124 | ```yaml title="params.yaml" |
90 | 125 | input: './samplesheet.csv' |
91 | 126 | outdir: './results/' |
92 | | -genome: 'GRCh37' |
93 | 127 | <...> |
94 | 128 | ``` |
95 | 129 |
|
|
0 commit comments