# nf-core/scrnaseq: Output

This document describes the output produced by the pipeline. Most of the plots are taken from the MultiQC report, which summarises results at the end of the pipeline.

## Pipeline overview

The pipeline is built using [Nextflow](https://www.nextflow.io/)
and processes data using the following steps:

* [nf-core/scrnaseq: Output](#nf-corescrnaseq-output)
  * [Pipeline overview](#pipeline-overview)
  * [Kallisto & Bustools Results](#kallisto--bustools-results)
  * [STARsolo](#starsolo)
  * [Salmon Alevin & AlevinQC](#salmon-alevin--alevinqc)
  * [Other output data](#other-output-data)
  * [MultiQC](#multiqc)

## Kallisto & Bustools Results

See [Kallisto](https://pachterlab.github.io/kallisto/about) for details about Kallisto and [Bustools](https://bustools.github.io/) for more information on BusTools.

The pipeline can analyze data from single cell rnaseq experiments and generates a set of folders with respective outputs from various steps of the analysis. For a detailed summary what the pipeline does specifically, please follow the [excellent tutorial](https://www.kallistobus.tools/getting_started.html) that also describes specific steps for downstream analysis of the generated matrices.

**Output directory: `results/kallisto`**

* `raw_bus`
  * Contains the unconverted BUS formatted pseudo aligned data
* `sort_bus`
  * Contains the same BUS formatted data, sorted and corrected with the supplied barcode whitelist
* `kallisto_gene_map`
  * Contains the converted GTF gene map that is used by BUSTools for downstream analysis
* `bustools_counts`
  * Contains two subdirectories
    * `eqcount`: Containing the Transcript Compatibility Count (TCC) Matrix (`tcc.mtx`)
    * `genecount`: Containing the Gene Count Matrix (`gene.mtx`)
* `bustools_metrics`
  * Contains the JSON metrics generated by BUStools

For details on how to load these into R and perform further downstream analysis, please refer to the [BusTools HowTo](https://github.com/BUStools/getting_started/blob/master/getting_started.ipynb).

**Output directory: `results/reference_genome`**

* `kallisto_index`
  * Contains the index of the supplied (genome/transcriptome) fasta file

## STARsolo

**Output directory: `results/STAR`**

* Contains the mapped BAM files and output metrics created by STARsolo

**Output directory: `results/reference_genome`**

* `star_index`
  * Contains the index of the supplied genome fasta file

## Salmon Alevin & AlevinQC

**Output directory: `results/alevin`**

* `alevin`
  * Contains the created Salmon Alevin pseudo-aligned output
* `alevinqc`
  * Contains the QC report for the aforementioned Salmon Alevin output data

**Output directory: `results/reference_genome`**

* `salmon_index`
  * Contains the indexed reference transcriptome for Salmon Alevin
* `alevin/txp2gene.tsv`
  * The transcriptome to gene mapping TSV file utilized by Salmon Alevin

## Other output data

**Output directory: `results/reference_genome`**

* `barcodes`
  * Contains the utilized cell barcode whitelists (if applicable)
* `extract_transcriptome`
  * When supplied with a `--fasta` genome fasta, this contains the extracted transcriptome
  * The GTF file supplied with `--gtf` is used to extract the transcriptome positions appropriately
  
## MultiQC

[MultiQC](http://multiqc.info) is a visualisation tool that generates a single HTML report summarising all samples in your project. Most of the pipeline QC results are visualised in the report and further statistics are available in within the report data directory.

The pipeline has special steps which allow the software versions used to be reported in the MultiQC output for future traceability.

**Output directory: `results/multiqc`**

* `Project_multiqc_report.html`
  * MultiQC report - a standalone HTML file that can be viewed in your web browser
* `Project_multiqc_data/`
  * Directory containing parsed statistics from the different tools used in the pipeline

For more information about how to use MultiQC reports, see [http://multiqc.info](http://multiqc.info)
