comparison README.md @ 0:a30f4bfe8f01 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scater commit 61f3899168453092fd25691cf31871a3a350fd3b"
author iuc
date Tue, 03 Sep 2019 14:30:21 -0400
parents
children 2b09ca1c5e41
comparison
equal deleted inserted replaced
-1:000000000000 0:a30f4bfe8f01
1 # Wrappers for Scater
2
3 This code wraps a number of [scater](https://bioconductor.org/packages/release/bioc/html/scater.html) functions as Galaxy wrappers. Briefly, the `scater-create-qcmetric-ready-sce` tool takes a sample gene expression matrix (usually read-counts) and a cell annotation file, creates a [SingleCellExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html) object and runs scater's `calculateQCMetrics` function (using other supplied files such as ERCC's and mitochondrial gene features).
4 Various filter scripts are provided, along with some plotting functions for QC.
5
6
7 ## Typical workflow
8
9 1. Read in data with `scater-create-qcmetric-ready-sce`.
10 2. Visualise it.\
11 Take a look at the distribution of library sizes, expressed features and mitochondrial genes with `scater-plot-dist-scatter`.
12 Then look at the distibution of genes across cells with `scater-plot-exprs-freq`.
13 3. Guided by the plots, filter the data with `scater-filter`.\
14 You can either manually filter with user-defined parameters or use PCA to automatically removes outliers.
15 4. Visualise data again to see how the filtering performed using `scater-plot-dist-scatter`.\
16 Decide if you're happy with the data. If not, try increasing or decreasing the filtering parameters.
17 5. Normalise data with `scater-normalize`.
18 6. Investigate other confounding factors.\
19 Plot the data (using PCA) and display various annotated properties of the cells using `scater-plot-pca`.
20
21 ## Command-line usage
22
23 The scripts require the installation of scater and few other R/BioConductor packages. An easy way to install them is to create a [conda](https://conda.io/) environment using the `environment.yml` file distributed together with these wrappers:
24
25 ```
26 conda env create -f environment.yml
27 conda activate scater
28 ```
29
30 For help with any of the following scripts, run:
31 `<script-name> --help`
32
33 ---
34
35 `scater-create-qcmetric-ready-sce.R`
36 Takes an expression matrix (usually read-counts) of samples (columns) and gene/transcript features (rows), along with other annotation information, such as cell metadata, control genes (mitochondrail genes, ERCC's), creates a [SingleCellExperiment](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html) object and runs scater's `calculateQCMetrics`. Save the resulting SingleCellExperiment object in Loom format.
37
38
39 ```
40 ./scater-create-qcmetric-ready-sce.R -a test-data/counts.txt -c test-data/annotation.txt -f test-data/mt_controls.txt -o test-data/scater_qcready.loom
41 ```
42
43 ---
44
45 `scater-plot-dist-scatter.R`
46 Takes SingleCellExperiment object (from Loom file) and plots a panel of read and feature graphs, including the distribution of library sizes, distribution of feature counts, a scatterplot of reads vs features, and % of mitochondrial genes in library.
47
48 ```
49 ./scater-plot-dist-scatter.R -i test-data/scater_qcready.loom -o test-data/scater_reads_genes_dist.pdf
50 ```
51
52 ---
53
54 `scater-plot-exprs-freq.R`
55 Plots mean expression vs % of expressing cells and provides information as to the number of genes expressed in 50% and 25% of cells.
56
57 ---
58
59 `scater-pca-filter.R`
60 Takes SingleCellExperiment object (from Loom file) and automatically removes outliers from data using PCA. Save the filtered SingleCellExperiment object in Loom format.
61
62 ```
63 ./scater-pca-filter.R -i test-data/scater_qcready.loom -o test-data/scater_pca_filtered.loom
64 ```
65
66 ---
67
68 `scater-manual-filter.R`
69 Takes SingleCellExperiment object (from Loom file) and filters data using user-provided parameters. Save the filtered SingleCellExperiment object in Loom format.
70
71 ```
72 ./scater-manual-filter.R -i test-data/scater_qcready.loom -l 10000 -d 4 -m 33 -o test-data/scater_manual_filtered.loom
73 ```
74
75 ---
76
77 `scater-normalize.R`
78 Compute log-normalized expression values from count data in a SingleCellExperiment object, using the size factors stored in the object. Save the normalised SingleCellExperiment object in Loom format.
79
80 ```
81 ./scater-normalize.R -i test-data/scater_manual_filtered.loom -o test-data/scater_man_filtered_normalised.loom
82 ```
83
84 ---
85
86 `scater-plot-pca.R`
87 PCA plot of a normalised SingleCellExperiment object (produced with `scater-normalize.R`). The options `-c`, `-p`, and `-s` all refer to cell annotation features. These are the column headers of the `-c` option used in `scater-create-qcmetric-ready-sce.R`.
88
89 ```
90 ./scater-plot-pca.R -i test-data/scater_man_filtered_normalised.loom -c Treatment -p Mutation_Status -o test-data/scater_pca_plot.pdf
91 ```