# WEHI-SODA-Hub/spatialvpt: Output

## Introduction

This document describes the output produced by the pipeline. The pipeline will generate segmentation boundaries, updated metadata/vzg files and a report from the VPT tool that gives an overview of the segmentation QC.

## Pipeline outputs

Examples of the reports generated by `vpt` can be found in the [vizgen postprocessing documentation](https://vizgen.github.io/vizgen-postprocessing/analysis_vignettes/segmentation_heart_dataset_cellpose2.html#step-6-evaluate-new-segmentation).

### Output files

<!--<details markdown="1">
<summary>Output files</summary>-->

- `vizgenpostprocessing/`
  - `cell_by_gene_repartitioned.csv` -- cell-by-gene table with transcripts repartitioned based on re-segmentation.
  - `cell_metadata_resegmented.csv` -- geometric attributes calculated based on re-segmentation.
  - `sample/segmentation_specification.json` -- parameters for the segmentation (output from `prepare-segmentation`).
  - `sample/result_tiles/cell_N.parquet` -- tiled segmentation outputs.
  - `sample/algorithm_micron_space.parquet` -- compiled segmentation boundaries in micron space.
  - `sample/algorithm_mosaic_space.parquet` -- compiled segmentation boundaries in mosaic space.
- `pipeline_info/`
  - Reports generated by Nextflow: `execution_report.html`, `execution_timeline.html`, `execution_trace.txt` and `pipeline_dag.dot`/`pipeline_dag.svg`.
  - Reports generated by the pipeline: `pipeline_report.html`, `pipeline_report.txt` and `software_versions.yml`. The `pipeline_report*` files will only be present if the `--email` / `--email_on_fail` parameter's are used when running the pipeline.
  - Reformatted samplesheet files used as input to the pipeline: `samplesheet.valid.csv`.
  - Parameters used by the pipeline run: `params.json`.

<!--</details>-->

[Nextflow](https://www.nextflow.io/docs/latest/tracing.html) provides excellent functionality for generating various reports relevant to the running and execution of the pipeline. This will allow you to troubleshoot errors with the running of the pipeline, and also provide you with other information such as launch commands, run times and resource usage.
