## Seurat -Setup and QC

### Description

This tool can be used to setup the Seurat object from two possible inputs:

1. a .tar package of a folder which contains the 10X Genomics output files (see more info below)
2. the DGE table (from DropSeq) -this can be generated with the Digital expression tool

After setting up the R-object (.Robj), some quality control plots are drawn.

### Parameters

- Project name for plotting [Project_name]
- Include genes with detected expression in at least this many cells [3]
- Include cells where at least this many genes are detected [200]
- Perform log normalization [T]
- Scale factor in the log normalization [10000]

### Details

As inputs, user can give EITHER
a .tar packed folder of 10X Genomics files output files (barcodes.tsv, genes.tsv and matrix.mtx -these are generated by the Cell Ranger -pipeline, and can be found under a folder corresponding to the hg19-folder in this example),
OR
a (DropSeq) digital gene expression (DGE) matrix (which one can generate using Digital expression tool).
Make sure that your input is assigned correctly (under the parameters).

After setting up the object, some basic filtering is performed. At this step, user can define:

- Filtering genes: in how many cells a gene is required to be detected
- Filtering cells: how many genes are required to be detected in a cell
- Log normalization: whether to perform log normalization to data (default: yes)
- Scaling for log normalization: scale each cell to this number of molecules before log transformation (default: 10000)

Next, some quality control plots are drawn in the QC-plots.pdf file. Note that it might be easier to view this large pdf with the external viewer.
The first plot shows the number of genes (nGene), UMIs (nUMI) and the percentage of mitochondrial genes (percent.mito) in the cells. The next plot compares the percent.mito and nGene to nUMI. These plots can be used to estimate the outliers: the upper limits for number of genes per cell and mitochondrial percentage. Check the plots and determine these cut-offs, and use them in the filtering & regression tool.

For more details, please check the Seurat tutorials.

### Output

- seurat_obj.Robj: The Seurat R-object to pass to the next Seurat tool, or to import to R. Not viewable in Chipster.
- QCplots.pdf: Quality control plots (explained in detail above)