Repository 'scater_filter'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/scater_filter

Changeset 0:e6ca62ac65c6 (2019-07-18)
Next changeset 1:b7ea9f09c02f (2019-09-03)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/scater commit 5fdcafccb6c645d301db040dfeed693d7b6b4278
added:
README.md
macros.xml
scater-create-qcmetric-ready-sce.R
scater-filter.xml
scater-manual-filter.R
scater-normalize.R
scater-pca-filter.R
scater-plot-dist-scatter.R
scater-plot-exprs-freq.R
scater-plot-pca.R
test-data/annotation.txt
test-data/counts.txt
test-data/mt_controls.txt
test-data/scater_exprs_freq.pdf
test-data/scater_filtered_normalised.loom
test-data/scater_manual_filtered.loom
test-data/scater_pca_filtered.loom
test-data/scater_pca_plot.pdf
test-data/scater_qcready.loom
test-data/scater_reads_genes_dist.pdf
b
diff -r 000000000000 -r e6ca62ac65c6 README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md Thu Jul 18 11:13:41 2019 -0400
[
@@ -0,0 +1,84 @@
+# Wrappers for Scater
+
+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).
+Various filter scripts are provided, along with some plotting functions for QC.
+
+
+## Typical workflow
+
+1. Read in data with `scater-create-qcmetric-ready-sce`.
+2. Visualise it.\
+   Take a look at the distribution of library sizes, expressed features and mitochondrial genes with `scater-plot-dist-scatter`.
+   Then look at the distibution of genes across cells with `scater-plot-exprs-freq`.
+3. Guided by the plots, filter the data with `scater-filter`.\
+   You can either manually filter with user-defined parameters or use PCA to automatically removes outliers.
+4. Visualise data again to see how the filtering performed using `scater-plot-dist-scatter`.\
+   Decide if you're happy with the data. If not, try increasing or decreasing the filtering parameters.
+5. Normalise data with `scater-normalize`.
+6. Investigate other confounding factors.\
+   Plot the data (using PCA) and display various annotated properties of the cells using `scater-plot-pca`.
+
+## Command-line usage
+
+For help with any of the following scripts, run:
+ `<script-name> --help`
+
+---
+
+`scater-create-qcmetric-ready-sce.R`
+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.
+
+
+```
+./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
+```
+
+---
+
+`scater-plot-dist-scatter.R`
+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.
+
+```
+./scater-plot-dist-scatter.R -i test-data/scater_qcready.loom -o test-data/scater_reads_genes_dist.pdf
+```
+
+---
+
+`scater-plot-exprs-freq.R`
+Plots mean expression vs % of expressing cells and provides information as to the number of genes expressed in 50% and 25% of cells.
+
+---
+
+`scater-pca-filter.R`
+Takes SingleCellExperiment object (from Loom file) and automatically removes outliers from data using PCA. Save the filtered SingleCellExperiment object in Loom format.
+
+```
+./scater-pca-filter.R -i test-data/scater_qcready.loom -o test-data/scater_pca_filtered.loom
+```
+
+---
+
+`scater-manual-filter.R`
+Takes SingleCellExperiment object (from Loom file) and filters data using user-provided parameters. Save the filtered SingleCellExperiment object in Loom format.
+
+```
+./scater-manual-filter.R -i test-data/scater_qcready.loom -l 10000 -d 4 -m 33 -o test-data/scater_manual_filtered.loom
+```
+
+---
+
+`scater-normalize.R`
+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.
+
+```
+./scater-normalize.R -i test-data/scater_manual_filtered.loom -o test-data/scater_man_filtered_normalised.loom
+```
+
+---
+
+`scater-plot-pca.R`
+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`.
+
+```
+./scater-plot-pca.R -i test-data/scater_man_filtered_normalised.loom -c Treatment -p Mutation_Status -o test-data/scater_pca_plot.pdf
+```
b
diff -r 000000000000 -r e6ca62ac65c6 macros.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/macros.xml Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,17 @@
+<macros>
+    <token name="@TOOL_VERSION@">1.10.1</token>
+    <xml name="requirements">
+        <requirements>
+            <requirement type="package" version="@TOOL_VERSION@">bioconductor-scater</requirement>
+            <requirement type="package" version="1.6.2">r-optparse</requirement>
+            <requirement type="package" version="0.0.4">r-workflowscriptscommon</requirement>
+            <requirement type="package" version="1.0.4">bioconductor-loomexperiment</requirement>
+            <yield />
+        </requirements>
+    </xml>
+    <xml name="citations">
+        <citations>
+            <citation type="doi">10.1093/bioinformatics/btw777</citation>
+        </citations>
+    </xml>
+</macros>
b
diff -r 000000000000 -r e6ca62ac65c6 scater-create-qcmetric-ready-sce.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-create-qcmetric-ready-sce.R Thu Jul 18 11:13:41 2019 -0400
[
@@ -0,0 +1,142 @@
+#!/usr/bin/env Rscript
+#Creates a SingleCellExperiment object, which scater's calculateQCMetrics already applied
+
+library(optparse)
+library(workflowscriptscommon)
+library(scater)
+library(LoomExperiment)
+
+# parse options
+#SCE-specific options
+option_list = list(
+  make_option(
+    c("-a", "--counts"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A tab-delimited expression matrix. The first column of all files is assumed to be feature names and the first row is assumed to be sample names."
+  ),
+  make_option(
+    c("-r", "--row-data"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Path to TSV (tab-delimited) format file describing the features. Row names from the expression matrix (-a), if present, become the row names of the SingleCellExperiment."
+  ),
+  make_option(
+    c("-c", "--col-data"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Path to TSV format file describing the samples (annotation). The number of rows (samples) must equal the number of columns in the expression matrix."
+  ),
+  #The scater-specific options
+  make_option(
+    c("--assay-name"),
+    action = "store",
+    default = 'counts',
+    type = 'character',
+    help= "String specifying the name of the 'assay' of the 'object' that should be used to define expression."
+  ),
+  make_option(
+    c("-f", "--mt-controls"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Path to file containing a list of the mitochondrial control genes"
+  ),
+  make_option(
+    c("-p", "--ercc-controls"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Path to file containing a list of the ERCC controls"
+  ),
+  make_option(
+    c("-l", "--cell-controls"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Path to file (one cell per line) to be used to derive a vector of cell (sample) names used to identify cell controls (for example, blank wells or bulk controls)."
+  ),
+  make_option(
+    c("-o", "--output-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "File name in which to store the SingleCellExperiment object in Loom format."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('counts', 'output_loom'))
+
+# Read the expression matrix
+
+counts <- wsc_split_string(opt$counts)
+reads <- read.table(counts)
+
+# Read row and column annotations
+
+rowdata <- opt$row_data
+
+if ( ! is.null(opt$row_data) ){
+  rowdata <- read.delim(opt$row_data)
+}
+
+coldata <- opt$col_data
+
+if ( ! is.null(opt$col_data) ){
+  coldata <- read.delim(opt$col_data)
+}
+
+# Now build the object
+assays <- list(as.matrix(reads))
+names(assays) <- c(opt$assay_name)
+scle <- SingleCellLoomExperiment(assays = assays, colData = coldata, rowData = rowdata)
+# Define spikes (if supplied)
+
+
+#Scater options
+
+# Check feature_controls (only mitochondrial and ERCC used for now)
+feature_controls_list = list()
+if (! is.null(opt$mt_controls) && opt$mt_controls != 'NULL'){
+  if (! file.exists(opt$mt_controls)){
+    stop((paste('Supplied feature_controls file', opt$mt_controls, 'does not exist')))
+  } else {
+    mt_controls <- readLines(opt$mt_controls)
+    feature_controls_list[["MT"]] <- mt_controls
+  }
+}
+
+if (! is.null(opt$ercc_controls) && opt$ercc_controls != 'NULL'){
+  if (! file.exists(opt$ercc_controls)){
+    stop((paste('Supplied feature_controls file', opt$ercc_controls, 'does not exist')))
+  } else {
+    ercc_controls <- readLines(opt$ercc_controls)
+    feature_controls_list[["ERCC"]] <- ercc_controls
+  }
+} else {
+  ercc_controls <- character()
+}
+
+# Check cell_controls
+cell_controls_list <- list()
+if (! is.null(opt$cell_controls) && opt$cell_controls != 'NULL'){
+  if (! file.exists(opt$cell_controls)){
+    stop((paste('Supplied feature_controls file', opt$cell_controls, 'does not exist')))
+  } else {
+    cell_controls <- readLines(opt$cell_controls)
+    cell_controls_list[["empty"]] <- cell_controls
+  }
+}
+
+
+# calculate QCMs
+scle  <- calculateQCMetrics(scle, exprs_values = opt$assay_name, feature_controls = feature_controls_list, cell_controls = cell_controls_list)
+
+# Output to a Loom file
+if (file.exists(opt$output_loom)) {
+  file.remove(opt$output_loom)
+}
+export(scle, opt$output_loom, format='loom')
b
diff -r 000000000000 -r e6ca62ac65c6 scater-filter.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-filter.xml Thu Jul 18 11:13:41 2019 -0400
[
@@ -0,0 +1,68 @@
+<tool id="scater_filter" name="Scater: filter SCE" version="@TOOL_VERSION@">
+    <description>with user-defined parameters or PCA</description>
+    <macros>
+        <import>macros.xml</import>
+    </macros>
+    <expand macro="requirements">
+        <requirement type="package" version="2.0.9">r-mvoutlier</requirement>
+    </expand>
+    <command detect_errors="exit_code"><![CDATA[
+#if $filter_type.filter_type_selector == 'manual':
+    Rscript '$__tool_directory__/scater-manual-filter.R'
+    -i '$input_loom'
+    #if str($filter_type.detection_limit):
+        --detection-limit ${filter_type.detection_limit}
+    #end if
+    #if str($filter_type.library_size):
+        --library-size ${filter_type.library_size}
+    #end if
+    #if str($filter_type.percent_counts_MT):
+        --percent-counts-MT ${filter_type.percent_counts_MT}
+    #end if
+#else:
+    Rscript '$__tool_directory__/scater-pca-filter.R'
+    -i '$input_loom'
+#end if
+-o '$output_loom'
+    ]]></command>
+    <inputs>
+        <param name="input_loom" type="data" format="loom" label="Input SingleCellLoomExperiment dataset" />
+        <conditional name="filter_type">
+            <param name="filter_type_selector" type="select" label="Type of filter">
+                <option value="manual">manual</option>
+                <option value="pca">PCA</option>
+            </param>
+            <when value="manual">
+                <param name="detection_limit" argument="--detection-limit" type="float" optional="true" label="Number of reads mapped to a gene for it to be counted as expressed" help="Raising this number will raise the stringency and may lower the number of expressed genes" />
+                <param name="library_size" argument="--library-size" type="integer" optional="true" label="Minimum library size (mapped reads) to filter cells on" help="Raising this number will raise the stringency and may lower the number of included cells" />
+                <param name="percent_counts_MT" argument="--percent-counts-MT" type="float" optional="true" label="Maximum % of mitochondrial genes expressed per cell" help="Cells that exceed this value will be filtered out" />
+            </when>
+            <when value="pca" />
+        </conditional>
+    </inputs>
+    <outputs>
+        <data name="output_loom" format="loom" label="${tool.name} on ${on_string}" />
+    </outputs>
+    <tests>
+        <test>
+            <param name="input_loom" value="scater_qcready.loom" ftype="loom" />
+            <param name="filter_type_selector" value="manual" />
+            <param name="detection_limit" value="4" />
+            <param name="library_size" value="100000" />
+            <param name="percent_counts_MT" value="33.0" />
+            <output name="output_loom" file="scater_manual_filtered.loom" compare="sim_size" />
+        </test>
+        <test>
+            <param name="input_loom" value="scater_qcready.loom" ftype="loom" />
+            <param name="filter_type_selector" value="pca" />
+            <output name="output_loom" file="scater_pca_filtered.loom" compare="sim_size" />
+        </test>
+    </tests>
+    <help><![CDATA[
+Filter a SingleCellLoomExperiment object with Scater using one of the following methods:
+
+- user-defined parameters
+- PCA to automatically removes outliers.
+    ]]></help>
+    <expand macro="citations" />
+</tool>
b
diff -r 000000000000 -r e6ca62ac65c6 scater-manual-filter.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-manual-filter.R Thu Jul 18 11:13:41 2019 -0400
[
@@ -0,0 +1,84 @@
+#!/usr/bin/env Rscript
+# Manually filter SingleCellExperiment with user-defined parameters
+
+# Load optparse we need to check inputs
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+
+# parse options
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-d", "--detection-limit"),
+    action = "store",
+    default = 0,
+    type = 'numeric',
+    help = "Numeric scalar providing the value above which observations are deemed to be expressed"
+  ),
+  make_option(
+    c("-l", "--library-size"),
+    action = "store",
+    default = 0,
+    type = 'numeric',
+    help = "Minimum library size (mapped reads) to filter cells on"
+  ),
+  make_option(
+    c("-m", "--percent-counts-MT"),
+    action = "store",
+    default = 100,
+    type = 'numeric',
+    help = "Maximum % of mitochondrial genes expressed per cell. Cells that exceed this value will be filtered out."
+  ),
+  make_option(
+    c("-o", "--output-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "File name in which to store the SingleCellExperiment object in Loom format."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_loom'))
+
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+# Filter out unexpressed features
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+print(paste("Starting with", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Create a logical vector of features that are expressed (above detection_limit)
+feature_expressed <- nexprs(scle, detection_limit = opt$detection_limit, exprs_values = 1, byrow=TRUE) > 0
+scle <- scle[feature_expressed, ]
+
+print(paste("After filtering out unexpressed features: ", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Filter low library sizes
+to_keep <- scle$total_counts > opt$library_size
+scle <- scle[, to_keep]
+
+print(paste("After filtering out low library counts: ", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Filter out high MT counts
+to_keep <- scle$pct_counts_MT < opt$percent_counts_MT
+scle <- scle[, to_keep]
+
+print(paste("After filtering out high MT gene counts: ", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Output to a Loom file
+if (file.exists(opt$output_loom)) {
+  file.remove(opt$output_loom)
+}
+export(scle, opt$output_loom, format='loom')
b
diff -r 000000000000 -r e6ca62ac65c6 scater-normalize.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-normalize.R Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,50 @@
+#!/usr/bin/env Rscript
+#Normalises a SingleCellExperiment object
+
+# Load optparse we need to check inputs
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+
+# parse options
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-o", "--output-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "File name in which to store the SingleCellExperiment object in Loom format."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_loom'))
+
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+# Input from Loom format
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+print(paste("Normalising...."))
+
+#Normalise
+scle <- normalize(scle, exprs_values = 1)
+
+print(paste("Finished normalising"))
+
+# Output to a Loom file
+if (file.exists(opt$output_loom)) {
+  file.remove(opt$output_loom)
+}
+export(scle, opt$output_loom, format='loom')
b
diff -r 000000000000 -r e6ca62ac65c6 scater-pca-filter.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-pca-filter.R Thu Jul 18 11:13:41 2019 -0400
[
@@ -0,0 +1,60 @@
+#!/usr/bin/env Rscript
+#Filters a SingleCellExperiment object, using PCA on the following metrics:
+# "pct_counts_top_100_features"
+# "total_features"
+# "pct_counts_feature_control"
+# "total_features_feature_control"
+# "log10_total_counts_endogenous"
+# "log10_total_counts_feature_control"
+
+# Load optparse we need to check inputs
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+library(mvoutlier)
+
+# parse options
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-o", "--output-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "File name in which to store the SingleCellExperiment object in Loom format."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_loom'))
+
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+# Input from Loom format
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+print(paste("Starting with", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Run PCA on data and detect outliers
+scle <- runPCA(scle, use_coldata = TRUE, detect_outliers = TRUE)
+
+# Filter out outliers
+scle <- scle[, !scle$outlier]
+
+print(paste("Ending with", ncol(scle), "cells and", nrow(scle), "features."))
+
+# Output to a Loom file
+if (file.exists(opt$output_loom)) {
+  file.remove(opt$output_loom)
+}
+export(scle, opt$output_loom, format='loom')
b
diff -r 000000000000 -r e6ca62ac65c6 scater-plot-dist-scatter.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-plot-dist-scatter.R Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,62 @@
+#!/usr/bin/env Rscript
+
+# Plot the distribution of read counts and feature counts, side by side, then a scatter plot of read counts vs feature counts below
+
+# Load optparse we need to check inputs
+
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+library(ggpubr)
+
+# parse options
+
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-o", "--output-plot-file"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "Path of the PDF output file to save plot to."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_plot_file'))
+
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+# Input from Loom format
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+
+#do the scatter plot of reads vs genes
+total_counts <- scle$total_counts
+total_features <- scle$total_features_by_counts
+count_feats <- cbind(total_counts, total_features)
+cf_dm <- as.data.frame(count_feats)
+
+# Calculate binwidths for reads and features plots. Use 20 bins
+read_bins <- max(total_counts / 1e6) / 20
+feat_bins <- max(total_features) / 20
+
+#make the plots
+plot <- ggplot(cf_dm, aes(x=total_counts / 1e6, y=total_features)) + geom_point(shape=1) + geom_smooth() + xlab("Read count (millions)") +
+   ylab("Feature count") + ggtitle("Scatterplot of reads vs features")
+plot1 <- qplot(total_counts / 1e6, geom="histogram", binwidth = read_bins, ylab="Number of cells", xlab = "Read counts (millions)", fill=I("darkseagreen3")) + ggtitle("Read counts per cell")
+plot2 <- qplot(total_features, geom="histogram", binwidth = feat_bins, ylab="Number of cells", xlab = "Feature counts", fill=I("darkseagreen3")) + ggtitle("Feature counts per cell")
+plot3 <- plotColData(scle, y="pct_counts_MT", x="total_features_by_counts") + ggtitle("% MT genes") + geom_point(shape=1) + theme(text = element_text(size=15)) + theme(plot.title = element_text(size=15))
+
+final_plot <- ggarrange(plot1, plot2, plot, plot3, ncol=2, nrow=2)
+ggsave(opt$output_plot_file, final_plot, device="pdf")
b
diff -r 000000000000 -r e6ca62ac65c6 scater-plot-exprs-freq.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-plot-exprs-freq.R Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,45 @@
+#!/usr/bin/env Rscript
+
+#Plots mean expression vs % of expressing cells and provides information as to the number of genes expressed in 50% and 25% of cells.
+# Load optparse we need to check inputs
+
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+
+# parse options
+
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-o", "--output-plot-file"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "Path of the PDF output file to save plot to."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_plot_file'))
+
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+
+# Input from Loom format
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+
+#produce and save the scatter plot of reads vs genes
+plot <- plotExprsFreqVsMean(scle, controls = "is_feature_control_MT")
+ggsave(opt$output_plot_file, plot, device="pdf")
b
diff -r 000000000000 -r e6ca62ac65c6 scater-plot-pca.R
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/scater-plot-pca.R Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,68 @@
+#!/usr/bin/env Rscript
+
+# Creates a PCA plot of a normalised SingleCellExperiment object.
+
+# Load optparse we need to check inputs
+
+library(optparse)
+library(workflowscriptscommon)
+library(LoomExperiment)
+library(scater)
+
+# parse options
+
+option_list = list(
+  make_option(
+    c("-i", "--input-loom"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "A SingleCellExperiment object file in Loom format."
+  ),
+  make_option(
+    c("-c", "--colour-by"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Feature (from annotation file) to colour PCA plot points by. The values represented in this options should be categorical"
+  ),
+  make_option(
+    c("-s", "--size-by"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Feature (from annotation file) to size PCA plot points by. The values represented in this options should be numerical and not categorical"
+  ),
+  make_option(
+    c("-p", "--shape-by"),
+    action = "store",
+    default = NULL,
+    type = 'character',
+    help = "Feature (from annotation file) to shape PCA plot points by. The values represented in this options should be categorical"
+  ),
+  make_option(
+    c("-o", "--output-plot-file"),
+    action = "store",
+    default = NA,
+    type = 'character',
+    help = "Path of the PDF output file to save plot to."
+  )
+)
+
+opt <- wsc_parse_args(option_list, mandatory = c('input_loom', 'output_plot_file'))
+# Check parameter values
+
+if ( ! file.exists(opt$input_loom)){
+  stop((paste('File', opt$input_loom, 'does not exist')))
+}
+
+
+# Input from Loom format
+
+scle <- import(opt$input_loom, format='loom', type='SingleCellLoomExperiment')
+scle <- normalize(scle, exprs_values = 1)
+scle <- runPCA(scle)
+plot <- plotReducedDim(scle, "PCA", colour_by = opt$colour_by, size_by = opt$size_by, shape_by = opt$shape_by)
+#do the scatter plot of reads vs genes
+
+ggsave(opt$output_plot_file, plot, device="pdf")
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/annotation.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/annotation.txt Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,41 @@
+Cell Mutation_Status Cell_Cycle Treatment
+Cell_001 positive S treat1
+Cell_002 positive G0 treat1
+Cell_003 negative G1 treat1
+Cell_004 negative S treat1
+Cell_005 negative G1 treat2
+Cell_006 negative G0 treat1
+Cell_007 positive S treat1
+Cell_008 positive G1 treat2
+Cell_009 negative G0 treat1
+Cell_010 positive G0 treat1
+Cell_011 negative G0 treat2
+Cell_012 negative G0 treat1
+Cell_013 positive S treat1
+Cell_014 negative G1 treat2
+Cell_015 negative G1 treat1
+Cell_016 negative G0 treat1
+Cell_017 positive G0 treat1
+Cell_018 negative S treat1
+Cell_019 negative S treat1
+Cell_020 negative G1 treat2
+Cell_021 positive G1 treat2
+Cell_022 positive G0 treat1
+Cell_023 negative G0 treat2
+Cell_024 positive S treat1
+Cell_025 negative G0 treat1
+Cell_026 positive G0 treat2
+Cell_027 positive G1 treat1
+Cell_028 negative G2M treat1
+Cell_029 positive G0 treat2
+Cell_030 negative G1 treat2
+Cell_031 negative S treat1
+Cell_032 positive G0 treat2
+Cell_033 positive S treat1
+Cell_034 negative G1 treat1
+Cell_035 positive G1 treat1
+Cell_036 negative G0 treat1
+Cell_037 negative G0 treat1
+Cell_038 negative G0 treat2
+Cell_039 negative G1 treat1
+Cell_040 negative G0 treat2
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/counts.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/counts.txt Thu Jul 18 11:13:41 2019 -0400
b
b'@@ -0,0 +1,2001 @@\n+Cell_001\tCell_002\tCell_003\tCell_004\tCell_005\tCell_006\tCell_007\tCell_008\tCell_009\tCell_010\tCell_011\tCell_012\tCell_013\tCell_014\tCell_015\tCell_016\tCell_017\tCell_018\tCell_019\tCell_020\tCell_021\tCell_022\tCell_023\tCell_024\tCell_025\tCell_026\tCell_027\tCell_028\tCell_029\tCell_030\tCell_031\tCell_032\tCell_033\tCell_034\tCell_035\tCell_036\tCell_037\tCell_038\tCell_039\tCell_040\n+Gene_0001\t0\t123\t2\t0\t0\t0\t0\t21\t2\t0\t2624\t1\t1015\t0\t0\t1\t34\t1\t0\t6\t0\t0\t1\t0\t0\t0\t0\t0\t788\t1549\t458\t0\t0\t1279\t0\t0\t2185\t0\t0\t0\n+Gene_0002\t575\t65\t3\t1561\t2311\t160\t2\t1\t0\t0\t2\t0\t2710\t0\t4\t0\t908\t673\t174\t622\t2085\t1\t0\t444\t0\t0\t1\t921\t24\t1389\t1\t2\t0\t1\t0\t0\t1\t0\t1\t0\n+Gene_0003\t0\t0\t0\t0\t1213\t0\t0\t1\t0\t0\t2\t178\t0\t0\t0\t0\t0\t0\t1\t0\t3320\t0\t2\t7\t0\t0\t1\t0\t361\t0\t0\t0\t0\t0\t1\t0\t0\t0\t1111\t1468\n+Gene_0004\t0\t1\t0\t0\t0\t99\t476\t0\t1\t66\t0\t1\t0\t1\t0\t906\t655\t1020\t1\t0\t0\t4\t0\t31\t0\t0\t1\t2\t0\t1926\t0\t0\t0\t1\t1155\t781\t0\t4\t2\t0\n+Gene_0005\t0\t0\t11\t0\t0\t0\t0\t0\t1\t0\t0\t2\t2\t0\t0\t0\t0\t2\t0\t0\t3\t0\t0\t0\t9\t0\t0\t0\t0\t1\t1\t0\t0\t2\t1\t0\t3\t1\t0\t0\n+Gene_0006\t0\t0\t0\t0\t0\t0\t673\t0\t3094\t0\t0\t270\t2\t0\t1176\t0\t3\t0\t0\t0\t1\t0\t0\t0\t1240\t0\t34\t1\t0\t8\t5\t170\t0\t662\t0\t0\t0\t0\t2\t68\n+Gene_0007\t0\t0\t0\t0\t988\t0\t1\t63\t0\t0\t312\t104\t0\t1\t0\t0\t0\t240\t143\t0\t0\t0\t0\t174\t0\t0\t0\t424\t0\t331\t480\t521\t0\t0\t3\t324\t0\t0\t0\t0\n+Gene_0008\t0\t38\t0\t0\t1\t0\t1\t0\t648\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t4\t0\t0\t1\t0\t0\t0\t38\t0\t0\t1\t0\t0\t0\n+Gene_0009\t416\t0\t2\t0\t0\t1\t93\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t0\t0\t0\t729\t0\t149\t0\t662\t0\t0\t2\t189\t0\t0\t771\t0\t286\t0\t0\t499\t0\t0\t0\n+Gene_0010\t12\t0\t0\t7\t210\t6\t1\t93\t13\t343\t30\t131\t12\t0\t0\t0\t0\t1\t0\t0\t617\t0\t0\t182\t19\t2\t0\t1007\t6\t1\t1104\t11\t1\t0\t26\t0\t602\t38\t73\t0\n+Gene_0011\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t1\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0012\t171\t0\t210\t28\t481\t1\t0\t0\t0\t0\t1\t0\t0\t3\t529\t0\t274\t223\t0\t0\t1\t1\t173\t327\t0\t0\t2\t302\t153\t0\t475\t1\t3\t206\t0\t0\t0\t0\t2\t3\n+Gene_0013\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t8\t0\t0\t0\t0\t0\t0\t0\t0\t0\t599\t0\t0\t309\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0014\t2\t2550\t959\t709\t37\t0\t1\t1003\t3\t0\t1817\t204\t1213\t0\t1\t2056\t0\t0\t0\t758\t4811\t0\t0\t1\t155\t2\t1400\t3\t0\t0\t0\t0\t0\t2\t2\t148\t2261\t0\t2\t1\n+Gene_0015\t1649\t550\t163\t1403\t952\t665\t1464\t959\t543\t865\t902\t349\t2088\t1641\t471\t1381\t99\t3788\t1679\t298\t1885\t228\t843\t819\t754\t430\t313\t3177\t530\t460\t7603\t701\t1641\t1271\t439\t156\t89\t451\t1243\t360\n+Gene_0016\t0\t0\t0\t0\t7\t0\t1\t18\t0\t1\t0\t0\t0\t0\t0\t0\t818\t0\t12\t0\t10\t3\t4\t2\t0\t1\t0\t0\t0\t1465\t0\t1587\t0\t0\t20\t0\t0\t0\t2\t0\n+Gene_0017\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t62\t0\t0\t0\t0\t0\t2\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t535\t0\t265\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0018\t31\t3\t0\t137\t0\t1\t0\t0\t0\t182\t0\t0\t0\t0\t0\t0\t0\t0\t0\t3\t0\t0\t0\t0\t2\t0\t0\t0\t0\t0\t556\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0019\t2306\t771\t716\t1177\t7212\t873\t1654\t493\t2482\t571\t26\t733\t342\t2557\t3\t1139\t738\t1352\t607\t1252\t7\t5332\t1957\t249\t3\t990\t1973\t2608\t1882\t2302\t762\t201\t237\t1452\t864\t964\t1585\t3\t490\t2\n+Gene_0020\t0\t0\t0\t1\t0\t0\t0\t0\t1\t5\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t0\t1\t0\t1\t1\t0\t0\t4\t0\t0\t2\t0\n+Gene_0021\t1\t0\t692\t142\t0\t0\t0\t726\t0\t0\t1\t0\t4\t2357\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t1\t1\t0\t769\t0\t0\t253\t0\t1\t1012\t0\t0\t2\t734\t0\n+Gene_0022\t0\t0\t0\t1\t1\t0\t0\t0\t2\t0\t0\t1\t2\t0\t1\t1\t1\t0\t1\t1\t2\t0\t0\t0\t0\t0\t0\t2\t1\t1\t2\t1\t1\t1\t1\t1\t0\t0\t0\t2\n+Gene_0023\t1343\t0\t990\t631\t5241\t730\t113\t12\t1477\t2\t18\t454\t1166\t3\t1604\t1568\t0\t1257\t8\t2\t17\t5165\t1045\t760\t34\t219\t910\t11\t378\t167\t2390\t2486\t15\t3\t639\t1868\t356\t3\t9\t0\n+Gene_0024\t1\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t1\t0\t0\t0\t0\t0\t1\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0025\t0\t763\t0\t0\t3\t0\t472\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t8\t0\t0\t0\t0\t3\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0026\t0\t0\t0\t309\t0\t0\t0\t0\t0\t558\t1\t0\t0\t1\t1517\t1\t0\t0\t1\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t4334\t2347\t0\t2402\t435\t0\t0\t1\t0\n+Gene_0027\t378\t6\t0\t1\t0\t0\t0\t402\t1\t11\t0\t2\t741\t0\t1\t0\t1\t213\t190\t105\t2\t1\t0\t271\t684\t0\t0\t0\t146\t0\t0\t2\t0\t0\t61\t544\t1039\t0\t0\t752\n+Gene_0028\t0\t0\t0\t46\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t321\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t58\t0\t0\n+Gene_0029\t0\t0\t0\t0\t0\t0\t0\t0\t0\t8\t5\t10\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0030\t0\t0\t1\t1\t0\t0\t0\t0\t0\t0\t3\t0\t0\t0\t1\t0\t0\t0\t2\t0\t0\t2\t0\t0\t0\t0\t0\t0\t0\t1\t3\t0\t0\t0\t0\t1\t0\t0\t0\t0\n+Gene_0031\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_0032\t0\t0\t0\t0\t0\t289\t0\t0\t0\t0\t0\t0\t1\t0\t9\t76\t0\t87\t0\t0\t0\t0\t0\t0\t0\t3\t0\t0\t0\t0\t0\t0\t0\t0\t0\t15\t0\t0\t0\t0\n+Gene_0033\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t1\t0\t0\t0\t0\t391\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t102\n+Gene_0034\t1049\t0'..b'46\t0\t0\t211\t79\t82\t1\t1\t205\t168\t17\t149\t0\t43\t219\t171\t44\t62\t46\t247\t3\t0\t127\t130\t1\t125\t160\t63\t26\t120\t92\t0\t37\t2\t136\t1\t1\t138\t21\n+Gene_1965\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\n+Gene_1966\t1725\t0\t0\t324\t1422\t0\t1327\t3\t0\t1168\t1260\t1\t0\t0\t0\t1\t0\t0\t141\t1\t121\t1\t0\t0\t0\t1\t2\t575\t1\t629\t1\t0\t0\t1\t0\t94\t0\t0\t18\t0\n+Gene_1967\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t352\t0\t0\t0\t0\t1\t0\t5\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t6\t0\t0\n+Gene_1968\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1969\t1\t277\t0\t0\t0\t0\t0\t76\t1577\t0\t0\t1\t0\t0\t407\t0\t0\t635\t226\t1\t0\t0\t0\t7\t1\t0\t1\t124\t0\t0\t407\t1170\t0\t0\t742\t635\t0\t1\t333\t0\n+Gene_1970\t2\t0\t1\t0\t2686\t0\t0\t0\t0\t42\t0\t0\t0\t0\t2\t0\t0\t1781\t0\t1\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t28\t0\t0\n+Gene_1971\t1\t0\t731\t0\t1\t0\t411\t4\t0\t625\t3206\t0\t1\t0\t1\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t531\t1752\t5\t0\t1\t0\t0\t0\t2\t1229\t0\t0\t1\t93\t0\n+Gene_1972\t1104\t831\t674\t2005\t4163\t1\t1\t11\t0\t433\t4\t10\t1363\t1\t2181\t2\t0\t2084\t2\t1120\t2\t956\t409\t1\t2\t1\t696\t605\t0\t3685\t48\t0\t2547\t2130\t1\t2\t4\t0\t766\t1\n+Gene_1973\t256\t176\t478\t83\t1331\t153\t299\t427\t261\t41\t203\t111\t744\t143\t508\t61\t201\t248\t150\t49\t223\t1956\t145\t113\t131\t374\t473\t502\t83\t81\t621\t849\t258\t310\t417\t208\t385\t2\t142\t211\n+Gene_1974\t781\t634\t2\t0\t2\t14\t1837\t1\t5038\t1\t0\t2\t867\t0\t1689\t19\t0\t2600\t568\t919\t134\t2\t1616\t576\t1121\t1094\t1\t172\t1260\t2488\t108\t294\t592\t4\t1088\t1722\t3\t5\t4\t0\n+Gene_1975\t1121\t1410\t1082\t264\t3177\t1292\t0\t2\t1\t1\t9\t585\t1957\t0\t1573\t973\t1\t407\t1\t1\t2\t4733\t1581\t1\t1771\t0\t0\t1\t0\t2\t0\t1\t0\t0\t1594\t1407\t1745\t3\t3\t31\n+Gene_1976\t245\t0\t0\t0\t0\t0\t1109\t0\t0\t1\t0\t0\t1816\t0\t0\t0\t0\t0\t20\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\n+Gene_1977\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1978\t421\t0\t279\t338\t1146\t1\t843\t39\t2190\t18\t2\t1\t1345\t0\t598\t188\t0\t352\t228\t4\t1033\t3\t127\t167\t559\t1\t307\t1297\t0\t975\t2559\t0\t1\t1\t0\t71\t564\t0\t0\t0\n+Gene_1979\t203\t0\t0\t23\t0\t0\t0\t18\t1\t0\t1028\t11\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t41\t42\t0\t0\t0\t0\t0\t2\n+Gene_1980\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t261\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1981\t0\t2\t1\t1\t2365\t309\t526\t1\t0\t1752\t6\t263\t2426\t528\t1099\t0\t1436\t785\t3\t1\t2576\t3332\t5\t3\t1\t1155\t2297\t1026\t0\t571\t1\t0\t1\t1240\t1\t1618\t4\t679\t3\t3\n+Gene_1982\t36\t0\t0\t0\t1\t1\t0\t1\t1\t0\t2\t159\t0\t0\t0\t78\t1\t0\t66\t0\t0\t0\t143\t0\t0\t4\t0\t0\t0\t36\t0\t0\t0\t0\t1522\t0\t1\t6\t0\t1338\n+Gene_1983\t0\t0\t0\t226\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1984\t0\t0\t769\t280\t0\t0\t0\t1\t0\t0\t1\t189\t893\t0\t2\t1036\t0\t0\t0\t0\t0\t5\t0\t1\t1245\t3\t0\t1\t0\t859\t0\t0\t0\t0\t0\t1772\t6\t1\t0\t0\n+Gene_1985\t0\t2\t1\t0\t0\t0\t0\t3\t592\t0\t4\t0\t0\t0\t0\t1\t0\t0\t3\t0\t0\t0\t0\t197\t0\t0\t0\t596\t0\t0\t0\t0\t0\t0\t0\t874\t0\t0\t0\t0\n+Gene_1986\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t1\t2\t0\t0\t1\t0\t0\t1\t0\t0\t0\t0\n+Gene_1987\t0\t0\t42\t0\t0\t0\t139\t228\t0\t255\t2\t0\t0\t1\t0\t0\t0\t0\t0\t19\t0\t3146\t0\t1\t0\t203\t352\t758\t0\t0\t0\t1309\t0\t0\t323\t0\t484\t1\t5\t1\n+Gene_1988\t1\t675\t0\t0\t3009\t568\t2057\t0\t0\t61\t1\t91\t1\t0\t1\t1850\t0\t0\t0\t1646\t0\t10\t0\t0\t0\t2\t1241\t2\t1\t1\t1\t0\t6\t0\t0\t0\t0\t2\t2\t0\n+Gene_1989\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t189\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1990\t1\t2\t1\t0\t0\t0\t468\t0\t2\t1\t4\t0\t0\t0\t0\t0\t0\t1\t32\t0\t3\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1117\t0\t0\t0\t2\t1\t1\t0\t0\t990\n+Gene_1991\t0\t0\t0\t0\t0\t0\t0\t0\t0\t91\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t1\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1992\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t1\t0\t1\t0\t1\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\n+Gene_1993\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t8\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t1\t4\t0\t0\t1\t0\n+Gene_1994\t0\t0\t0\t0\t0\t0\t4\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1995\t0\t0\t0\t29\t0\t0\t0\t3\t0\t0\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1996\t0\t0\t0\t0\t157\t2\t30\t854\t8\t1\t1\t1027\t1\t0\t0\t10\t0\t0\t5\t7\t0\t0\t99\t0\t1\t1109\t146\t0\t1\t904\t2215\t3505\t0\t0\t5\t1163\t9\t21\t960\t10\n+Gene_1997\t0\t0\t3\t155\t0\t0\t29\t0\t0\t0\t220\t564\t0\t0\t0\t0\t0\t0\t0\t0\t0\t860\t0\t651\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\t0\n+Gene_1998\t2\t0\t1\t78\t0\t0\t3\t0\t0\t0\t0\t0\t1\t0\t0\t0\t0\t0\t0\t0\t2\t0\t0\t0\t0\t393\t1\t843\t1033\t208\t0\t0\t783\t0\t1907\t0\t0\t0\t1\t2\n+Gene_1999\t390\t0\t7\t3\t2\t0\t380\t7\t2\t0\t0\t0\t3\t2\t0\t3\t436\t2\t1\t0\t9\t1\t4\t4\t5\t2\t0\t0\t0\t2556\t0\t10\t0\t0\t3\t2\t2\t1\t2\t8\n+Gene_2000\t0\t2\t1\t1\t0\t1\t0\t0\t0\t1\t2\t0\t0\t0\t2\t0\t3\t880\t0\t0\t0\t3\t1\t414\t2\t186\t0\t0\t0\t1\t2\t1853\t0\t0\t2\t1\t2\t0\t1\t0\n'
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/mt_controls.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/mt_controls.txt Thu Jul 18 11:13:41 2019 -0400
b
@@ -0,0 +1,501 @@
+Gene_0500
+Gene_0501
+Gene_0502
+Gene_0503
+Gene_0504
+Gene_0505
+Gene_0506
+Gene_0507
+Gene_0508
+Gene_0509
+Gene_0510
+Gene_0511
+Gene_0512
+Gene_0513
+Gene_0514
+Gene_0515
+Gene_0516
+Gene_0517
+Gene_0518
+Gene_0519
+Gene_0520
+Gene_0521
+Gene_0522
+Gene_0523
+Gene_0524
+Gene_0525
+Gene_0526
+Gene_0527
+Gene_0528
+Gene_0529
+Gene_0530
+Gene_0531
+Gene_0532
+Gene_0533
+Gene_0534
+Gene_0535
+Gene_0536
+Gene_0537
+Gene_0538
+Gene_0539
+Gene_0540
+Gene_0541
+Gene_0542
+Gene_0543
+Gene_0544
+Gene_0545
+Gene_0546
+Gene_0547
+Gene_0548
+Gene_0549
+Gene_0550
+Gene_0551
+Gene_0552
+Gene_0553
+Gene_0554
+Gene_0555
+Gene_0556
+Gene_0557
+Gene_0558
+Gene_0559
+Gene_0560
+Gene_0561
+Gene_0562
+Gene_0563
+Gene_0564
+Gene_0565
+Gene_0566
+Gene_0567
+Gene_0568
+Gene_0569
+Gene_0570
+Gene_0571
+Gene_0572
+Gene_0573
+Gene_0574
+Gene_0575
+Gene_0576
+Gene_0577
+Gene_0578
+Gene_0579
+Gene_0580
+Gene_0581
+Gene_0582
+Gene_0583
+Gene_0584
+Gene_0585
+Gene_0586
+Gene_0587
+Gene_0588
+Gene_0589
+Gene_0590
+Gene_0591
+Gene_0592
+Gene_0593
+Gene_0594
+Gene_0595
+Gene_0596
+Gene_0597
+Gene_0598
+Gene_0599
+Gene_0600
+Gene_0601
+Gene_0602
+Gene_0603
+Gene_0604
+Gene_0605
+Gene_0606
+Gene_0607
+Gene_0608
+Gene_0609
+Gene_0610
+Gene_0611
+Gene_0612
+Gene_0613
+Gene_0614
+Gene_0615
+Gene_0616
+Gene_0617
+Gene_0618
+Gene_0619
+Gene_0620
+Gene_0621
+Gene_0622
+Gene_0623
+Gene_0624
+Gene_0625
+Gene_0626
+Gene_0627
+Gene_0628
+Gene_0629
+Gene_0630
+Gene_0631
+Gene_0632
+Gene_0633
+Gene_0634
+Gene_0635
+Gene_0636
+Gene_0637
+Gene_0638
+Gene_0639
+Gene_0640
+Gene_0641
+Gene_0642
+Gene_0643
+Gene_0644
+Gene_0645
+Gene_0646
+Gene_0647
+Gene_0648
+Gene_0649
+Gene_0650
+Gene_0651
+Gene_0652
+Gene_0653
+Gene_0654
+Gene_0655
+Gene_0656
+Gene_0657
+Gene_0658
+Gene_0659
+Gene_0660
+Gene_0661
+Gene_0662
+Gene_0663
+Gene_0664
+Gene_0665
+Gene_0666
+Gene_0667
+Gene_0668
+Gene_0669
+Gene_0670
+Gene_0671
+Gene_0672
+Gene_0673
+Gene_0674
+Gene_0675
+Gene_0676
+Gene_0677
+Gene_0678
+Gene_0679
+Gene_0680
+Gene_0681
+Gene_0682
+Gene_0683
+Gene_0684
+Gene_0685
+Gene_0686
+Gene_0687
+Gene_0688
+Gene_0689
+Gene_0690
+Gene_0691
+Gene_0692
+Gene_0693
+Gene_0694
+Gene_0695
+Gene_0696
+Gene_0697
+Gene_0698
+Gene_0699
+Gene_0700
+Gene_0701
+Gene_0702
+Gene_0703
+Gene_0704
+Gene_0705
+Gene_0706
+Gene_0707
+Gene_0708
+Gene_0709
+Gene_0710
+Gene_0711
+Gene_0712
+Gene_0713
+Gene_0714
+Gene_0715
+Gene_0716
+Gene_0717
+Gene_0718
+Gene_0719
+Gene_0720
+Gene_0721
+Gene_0722
+Gene_0723
+Gene_0724
+Gene_0725
+Gene_0726
+Gene_0727
+Gene_0728
+Gene_0729
+Gene_0730
+Gene_0731
+Gene_0732
+Gene_0733
+Gene_0734
+Gene_0735
+Gene_0736
+Gene_0737
+Gene_0738
+Gene_0739
+Gene_0740
+Gene_0741
+Gene_0742
+Gene_0743
+Gene_0744
+Gene_0745
+Gene_0746
+Gene_0747
+Gene_0748
+Gene_0749
+Gene_0750
+Gene_0751
+Gene_0752
+Gene_0753
+Gene_0754
+Gene_0755
+Gene_0756
+Gene_0757
+Gene_0758
+Gene_0759
+Gene_0760
+Gene_0761
+Gene_0762
+Gene_0763
+Gene_0764
+Gene_0765
+Gene_0766
+Gene_0767
+Gene_0768
+Gene_0769
+Gene_0770
+Gene_0771
+Gene_0772
+Gene_0773
+Gene_0774
+Gene_0775
+Gene_0776
+Gene_0777
+Gene_0778
+Gene_0779
+Gene_0780
+Gene_0781
+Gene_0782
+Gene_0783
+Gene_0784
+Gene_0785
+Gene_0786
+Gene_0787
+Gene_0788
+Gene_0789
+Gene_0790
+Gene_0791
+Gene_0792
+Gene_0793
+Gene_0794
+Gene_0795
+Gene_0796
+Gene_0797
+Gene_0798
+Gene_0799
+Gene_0800
+Gene_0801
+Gene_0802
+Gene_0803
+Gene_0804
+Gene_0805
+Gene_0806
+Gene_0807
+Gene_0808
+Gene_0809
+Gene_0810
+Gene_0811
+Gene_0812
+Gene_0813
+Gene_0814
+Gene_0815
+Gene_0816
+Gene_0817
+Gene_0818
+Gene_0819
+Gene_0820
+Gene_0821
+Gene_0822
+Gene_0823
+Gene_0824
+Gene_0825
+Gene_0826
+Gene_0827
+Gene_0828
+Gene_0829
+Gene_0830
+Gene_0831
+Gene_0832
+Gene_0833
+Gene_0834
+Gene_0835
+Gene_0836
+Gene_0837
+Gene_0838
+Gene_0839
+Gene_0840
+Gene_0841
+Gene_0842
+Gene_0843
+Gene_0844
+Gene_0845
+Gene_0846
+Gene_0847
+Gene_0848
+Gene_0849
+Gene_0850
+Gene_0851
+Gene_0852
+Gene_0853
+Gene_0854
+Gene_0855
+Gene_0856
+Gene_0857
+Gene_0858
+Gene_0859
+Gene_0860
+Gene_0861
+Gene_0862
+Gene_0863
+Gene_0864
+Gene_0865
+Gene_0866
+Gene_0867
+Gene_0868
+Gene_0869
+Gene_0870
+Gene_0871
+Gene_0872
+Gene_0873
+Gene_0874
+Gene_0875
+Gene_0876
+Gene_0877
+Gene_0878
+Gene_0879
+Gene_0880
+Gene_0881
+Gene_0882
+Gene_0883
+Gene_0884
+Gene_0885
+Gene_0886
+Gene_0887
+Gene_0888
+Gene_0889
+Gene_0890
+Gene_0891
+Gene_0892
+Gene_0893
+Gene_0894
+Gene_0895
+Gene_0896
+Gene_0897
+Gene_0898
+Gene_0899
+Gene_0900
+Gene_0901
+Gene_0902
+Gene_0903
+Gene_0904
+Gene_0905
+Gene_0906
+Gene_0907
+Gene_0908
+Gene_0909
+Gene_0910
+Gene_0911
+Gene_0912
+Gene_0913
+Gene_0914
+Gene_0915
+Gene_0916
+Gene_0917
+Gene_0918
+Gene_0919
+Gene_0920
+Gene_0921
+Gene_0922
+Gene_0923
+Gene_0924
+Gene_0925
+Gene_0926
+Gene_0927
+Gene_0928
+Gene_0929
+Gene_0930
+Gene_0931
+Gene_0932
+Gene_0933
+Gene_0934
+Gene_0935
+Gene_0936
+Gene_0937
+Gene_0938
+Gene_0939
+Gene_0940
+Gene_0941
+Gene_0942
+Gene_0943
+Gene_0944
+Gene_0945
+Gene_0946
+Gene_0947
+Gene_0948
+Gene_0949
+Gene_0950
+Gene_0951
+Gene_0952
+Gene_0953
+Gene_0954
+Gene_0955
+Gene_0956
+Gene_0957
+Gene_0958
+Gene_0959
+Gene_0960
+Gene_0961
+Gene_0962
+Gene_0963
+Gene_0964
+Gene_0965
+Gene_0966
+Gene_0967
+Gene_0968
+Gene_0969
+Gene_0970
+Gene_0971
+Gene_0972
+Gene_0973
+Gene_0974
+Gene_0975
+Gene_0976
+Gene_0977
+Gene_0978
+Gene_0979
+Gene_0980
+Gene_0981
+Gene_0982
+Gene_0983
+Gene_0984
+Gene_0985
+Gene_0986
+Gene_0987
+Gene_0988
+Gene_0989
+Gene_0990
+Gene_0991
+Gene_0992
+Gene_0993
+Gene_0994
+Gene_0995
+Gene_0996
+Gene_0997
+Gene_0998
+Gene_0999
+Gene_1000
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_exprs_freq.pdf
b
Binary file test-data/scater_exprs_freq.pdf has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_filtered_normalised.loom
b
Binary file test-data/scater_filtered_normalised.loom has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_manual_filtered.loom
b
Binary file test-data/scater_manual_filtered.loom has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_pca_filtered.loom
b
Binary file test-data/scater_pca_filtered.loom has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_pca_plot.pdf
b
Binary file test-data/scater_pca_plot.pdf has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_qcready.loom
b
Binary file test-data/scater_qcready.loom has changed
b
diff -r 000000000000 -r e6ca62ac65c6 test-data/scater_reads_genes_dist.pdf
b
Binary file test-data/scater_reads_genes_dist.pdf has changed