diff --git a/NEWS.md b/NEWS.md index a73055c04708514c76678ec34708bdaf3acdc698..090c723a4263c64cfaa4aba9393574d47c2c68e0 100644 --- a/NEWS.md +++ b/NEWS.md @@ -15,7 +15,11 @@ ## Version 1.3.0 (2017-10-13) -* Bioconductor 3.7 devel +* Bioconductor 3.7 devel + +## Version 1.2.2 (2018-03-27) + +* Fix parameter passing bug in scDDEstimate ## Version 1.2.1 (2017-11-23) diff --git a/docs/articles/index.html b/docs/articles/index.html index 2825f7a736a15feee12ffcd2306e0fc9bf0c5f42..619a82f56e4331c1ace1b5c7429df30bef73a91a 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -96,7 +96,7 @@ </header> <div class="page-header"> - <h1>Articles <small>version 1.3.2</small></h1> + <h1>Articles <small>version 1.3.3</small></h1> </div> <div class="row"> diff --git a/docs/articles/splatter.html b/docs/articles/splatter.html index c19000206171379c9c52578ce63e5250e6cc6807..1d4b4568d7f2bd3249466593c84f818aaa7c2f83 100644 --- a/docs/articles/splatter.html +++ b/docs/articles/splatter.html @@ -76,21 +76,29 @@ <h1>Introduction to Splatter</h1> <h4 class="author">Luke Zappia</h4> - <h4 class="date">2018-01-31</h4> + <h4 class="date">2018-03-27</h4> </div> <div class="contents"> -<figure><img src="splatter-logo-small.png" alt="Splatter logo"><figcaption>Splatter logo</figcaption></figure><p>Welcome to Splatter! Splatter is an R package for the simple simulation of single-cell RNA sequencing data. This vignette gives an overview and introduction to Splatter’s functionality.</p> -<section id="installation" class="level1"><h1>Installation</h1> +<div class="figure"> +<img src="splatter-logo-small.png" alt="Splatter logo"><p class="caption">Splatter logo</p> +</div> +<p>Welcome to Splatter! Splatter is an R package for the simple simulation of single-cell RNA sequencing data. This vignette gives an overview and introduction to Splatter’s functionality.</p> +<div id="installation" class="section level1"> +<h1 class="hasAnchor"> +<a href="#installation" class="anchor"></a>Installation</h1> <p>Splatter can be installed from Bioconductor:</p> <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw">source</span>(<span class="st">"https://bioconductor.org/biocLite.R"</span>)</a> <a class="sourceLine" id="cb1-2" data-line-number="2"><span class="kw">biocLite</span>(<span class="st">"splatter"</span>)</a></code></pre></div> <p>To install the most recent development version from Github use:</p> <div class="sourceCode" id="cb2"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb2-1" data-line-number="1"><span class="kw">biocLite</span>(<span class="st">"Oshlack/splatter"</span>, <span class="dt">dependencies =</span> <span class="ot">TRUE</span>,</a> <a class="sourceLine" id="cb2-2" data-line-number="2"> <span class="dt">build_vignettes =</span> <span class="ot">TRUE</span>)</a></code></pre></div> -</section><section id="quickstart" class="level1"><h1>Quickstart</h1> +</div> +<div id="quickstart" class="section level1"> +<h1 class="hasAnchor"> +<a href="#quickstart" class="anchor"></a>Quickstart</h1> <p>Assuming you already have a matrix of count data similar to that you wish to simulate there are two simple steps to creating a simulated data set with Splatter. Here is an example using the example dataset in the <code>scater</code> package:</p> <div class="sourceCode" id="cb3"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb3-1" data-line-number="1"><span class="co"># Load package</span></a> <a class="sourceLine" id="cb3-2" data-line-number="2"><span class="kw">library</span>(splatter)</a></code></pre></div> @@ -175,10 +183,15 @@ <pre><code>## Simulating dropout (if needed)...</code></pre> <pre><code>## Done!</code></pre> <p>These steps will be explained in detail in the following sections but briefly the first step takes a dataset and estimates simulation parameters from it and the second step takes those parameters and simulates a new dataset.</p> -</section><section id="the-splat-simulation" class="level1"><h1>The Splat simulation</h1> +</div> +<div id="the-splat-simulation" class="section level1"> +<h1 class="hasAnchor"> +<a href="#the-splat-simulation" class="anchor"></a>The Splat simulation</h1> <p>Before we look at how we estimate parameters let’s first look at how Splatter simulates data and what those parameters are. We use the term ‘Splat’ to refer to the Splatter’s own simulation and differentiate it from the package itself. The core of the Splat model is a gamma-Poisson distribution used to generate a gene by cell matrix of counts. Mean expression levels for each gene are simulated from a <a href="https://en.wikipedia.org/wiki/Gamma_distribution">gamma distribution</a> and the Biological Coefficient of Variation is used to enforce a mean-variance trend before counts are simulated from a <a href="https://en.wikipedia.org/wiki/Poisson_distribution">Poisson distribution</a>. Splat also allows you to simulate expression outlier genes (genes with mean expression outside the gamma distribution) and dropout (random knock out of counts based on mean expression). Each cell is given an expected library size (simulated from a log-normal distribution) that makes it easier to match to a given dataset.</p> <p>Splat can also simulate differential expression between groups of different types of cells or differentiation paths between different cells types where expression changes in a continuous way. These are described further in the <a href="#simulating-counts">simulating counts</a> section.</p> -<section id="parameters" class="level2"><h2>Parameters</h2> +<div id="parameters" class="section level2"> +<h2 class="hasAnchor"> +<a href="#parameters" class="anchor"></a>Parameters</h2> <p>The parameters required for the Splat simulation are briefly described here:</p> <ul> <li> @@ -293,7 +306,11 @@ </li> </ul> <p>While this may look like a lot of parameters Splatter attempts to make it easy for the user, both by providing sensible defaults and making it easy to estimate many of the parameters from real data. For more details on the parameters see <code><a href="../reference/SplatParams.html">?SplatParams</a></code>.</p> -</section></section><section id="the-splatparams-object" class="level1"><h1>The <code>SplatParams</code> object</h1> +</div> +</div> +<div id="the-splatparams-object" class="section level1"> +<h1 class="hasAnchor"> +<a href="#the-splatparams-object" class="anchor"></a>The <code>SplatParams</code> object</h1> <p>All the parameters for the Splat simulation are stored in a <code>SplatParams</code> object. Let’s create a new one and see what it looks like.</p> <div class="sourceCode" id="cb43"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb43-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/newParams.html">newSplatParams</a></span>()</a> <a class="sourceLine" id="cb43-2" data-line-number="2">params</a></code></pre></div> @@ -302,7 +319,7 @@ ## ## Global: ## (Genes) (Cells) [Seed] -## 10000 100 253576 +## 10000 100 970999 ## ## 27 additional parameters ## @@ -344,7 +361,9 @@ ## [Sigma Factor] ## 0.8</code></pre> <p>As well as telling us what type of object we have (“A <code>Params</code> object of class <code>SplatParams</code>â€) and showing us the values of the parameter this output gives us some extra information. We can see which parameters can be estimated by the <code>splatEstimate</code> function (those in parentheses), which can’t be estimated (those in brackets) and which have been changed from their default values (those in ALL CAPS).</p> -<section id="getting-and-setting" class="level2"><h2>Getting and setting</h2> +<div id="getting-and-setting" class="section level2"> +<h2 class="hasAnchor"> +<a href="#getting-and-setting" class="anchor"></a>Getting and setting</h2> <p>If we want to look at a particular parameter, for example the number of genes to simulate, we can extract it using the <code>getParam</code> function:</p> <div class="sourceCode" id="cb45"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb45-1" data-line-number="1"><span class="kw"><a href="../reference/getParam.html">getParam</a></span>(params, <span class="st">"nGenes"</span>)</a></code></pre></div> <pre><code>## [1] 10000</code></pre> @@ -373,7 +392,7 @@ ## ## Global: ## (GENES) (Cells) [Seed] -## 8000 100 253576 +## 8000 100 970999 ## ## 27 additional parameters ## @@ -423,7 +442,11 @@ ## ## $lib.scale ## [1] 0.6</code></pre> -</section></section><section id="estimating-parameters" class="level1"><h1>Estimating parameters</h1> +</div> +</div> +<div id="estimating-parameters" class="section level1"> +<h1 class="hasAnchor"> +<a href="#estimating-parameters" class="anchor"></a>Estimating parameters</h1> <p>Splat allows you to estimate many of it’s parameters from a data set containing counts using the <code>splatEstimate</code> function.</p> <div class="sourceCode" id="cb55"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb55-1" data-line-number="1"><span class="co"># Check that sc_example counts is an integer matrix</span></a> <a class="sourceLine" id="cb55-2" data-line-number="2"><span class="kw">class</span>(sc_example_counts)</a></code></pre></div> @@ -443,7 +466,7 @@ ## Gene_0005 0 0 11 0 0</code></pre> <div class="sourceCode" id="cb63"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb63-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/splatEstimate.html">splatEstimate</a></span>(sc_example_counts)</a></code></pre></div> <p>Here we estimated parameters from a counts matrix but <code>splatEstimate</code> can also take a <code>SingleCellExperiment</code> object. The estimation process has the following steps:</p> -<ol type="1"> +<ol style="list-style-type: decimal"> <li>Mean parameters are estimated by fitting a gamma distribution to the mean expression levels.</li> <li>Library size parameters are estimated by fitting a log-normal distribution to the library sizes.</li> <li>Expression outlier parameters are estimated by determining the number of outliers and fitting a log-normal distribution to their difference from the median.</li> @@ -451,7 +474,10 @@ <li>Dropout parameters are estimated by checking if dropout is present and fitting a logistic function to the relationship between mean expression and proportion of zeros.</li> </ol> <p>For more details of the estimation procedures see <code><a href="../reference/splatEstimate.html">?splatEstimate</a></code>.</p> -</section><section id="simulating-counts" class="level1"><h1>Simulating counts</h1> +</div> +<div id="simulating-counts" class="section level1"> +<h1 class="hasAnchor"> +<a href="#simulating-counts" class="anchor"></a>Simulating counts</h1> <p>Once we have a set of parameters we are happy with we can use <code>splatSimulate</code> to simulate counts. If we want to make small adjustments to the parameters we can provide them as additional arguments, alternatively if we don’t supply any parameters the defaults will be used:</p> <div class="sourceCode" id="cb64"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb64-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(params, <span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">dropout.present =</span> <span class="ot">FALSE</span>)</a></code></pre></div> <pre><code>## Getting parameters...</code></pre> @@ -477,51 +503,51 @@ <div class="sourceCode" id="cb75"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb75-1" data-line-number="1"><span class="co"># Access the counts</span></a> <a class="sourceLine" id="cb75-2" data-line-number="2"><span class="kw">counts</span>(sim)[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">5</span>]</a></code></pre></div> <pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 13 0 0 0 0 -## Gene2 322 0 70 0 0 -## Gene3 899 0 109 2 2 -## Gene4 0 0 0 0 0 -## Gene5 11 0 0 0 122</code></pre> +## Gene1 0 0 0 2 0 +## Gene2 220 13206 16225 27 7 +## Gene3 3 0 0 0 0 +## Gene4 0 0 13 0 0 +## Gene5 0 17 0 1 7052</code></pre> <div class="sourceCode" id="cb77"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb77-1" data-line-number="1"><span class="co"># Information about genes</span></a> <a class="sourceLine" id="cb77-2" data-line-number="2"><span class="kw">head</span>(<span class="kw">rowData</span>(sim))</a></code></pre></div> <pre><code>## DataFrame with 6 rows and 4 columns -## Gene BaseGeneMean OutlierFactor GeneMean -## <factor> <numeric> <numeric> <numeric> -## 1 Gene1 16.052376 1 16.052376 -## 2 Gene2 239.127600 1 239.127600 -## 3 Gene3 43.214270 1 43.214270 -## 4 Gene4 10.362140 1 10.362140 -## 5 Gene5 5.141514 1 5.141514 -## 6 Gene6 22.376227 1 22.376227</code></pre> +## Gene BaseGeneMean OutlierFactor GeneMean +## <factor> <numeric> <numeric> <numeric> +## 1 Gene1 158.719527020559 1 158.719527020559 +## 2 Gene2 970.318963415582 1 970.318963415582 +## 3 Gene3 377.696503133266 1 377.696503133266 +## 4 Gene4 0.710912644993431 1 0.710912644993431 +## 5 Gene5 245.794372332926 1 245.794372332926 +## 6 Gene6 17.7586005302078 1 17.7586005302078</code></pre> <div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb79-1" data-line-number="1"><span class="co"># Information about cells</span></a> <a class="sourceLine" id="cb79-2" data-line-number="2"><span class="kw">head</span>(<span class="kw">colData</span>(sim))</a></code></pre></div> <pre><code>## DataFrame with 6 rows and 3 columns -## Cell Batch ExpLibSize -## <factor> <character> <numeric> -## Cell1 Cell1 Batch1 759572.6 -## Cell2 Cell2 Batch1 173250.1 -## Cell3 Cell3 Batch1 173683.2 -## Cell4 Cell4 Batch1 310137.4 -## Cell5 Cell5 Batch1 581948.2 -## Cell6 Cell6 Batch1 191958.7</code></pre> +## Cell Batch ExpLibSize +## <factor> <character> <numeric> +## Cell1 Cell1 Batch1 819839.521777331 +## Cell2 Cell2 Batch1 658885.101984588 +## Cell3 Cell3 Batch1 440805.063929258 +## Cell4 Cell4 Batch1 458256.442717672 +## Cell5 Cell5 Batch1 419008.637502263 +## Cell6 Cell6 Batch1 341560.612672682</code></pre> <div class="sourceCode" id="cb81"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb81-1" data-line-number="1"><span class="co"># Gene by cell matrices</span></a> <a class="sourceLine" id="cb81-2" data-line-number="2"><span class="kw">names</span>(<span class="kw">assays</span>(sim))</a></code></pre></div> <pre><code>## [1] "BatchCellMeans" "BaseCellMeans" "BCV" "CellMeans" ## [5] "TrueCounts" "counts"</code></pre> <div class="sourceCode" id="cb83"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb83-1" data-line-number="1"><span class="co"># Example of cell means matrix</span></a> <a class="sourceLine" id="cb83-2" data-line-number="2"><span class="kw">assays</span>(sim)<span class="op">$</span>CellMeans[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">5</span>]</a></code></pre></div> -<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 8.5956994 9.648645e-09 7.852996e-03 1.810763e-10 3.232297e-09 -## Gene2 319.0032589 2.952430e-03 6.347924e+01 2.594855e-14 2.017484e-04 -## Gene3 922.5537934 7.184557e-01 9.681238e+01 8.432496e-01 4.545795e+00 -## Gene4 0.0520192 3.720615e-13 1.526374e-05 2.539425e-05 1.324239e-08 -## Gene5 10.6228213 1.550409e-06 6.657368e-01 1.943364e-02 1.079607e+02</code></pre> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 4.375231e-01 2.019127e-03 4.695107e-04 1.814947532 1.585570e-01 +## Gene2 2.185596e+02 1.311812e+04 1.629748e+04 30.992615936 5.170301e+00 +## Gene3 3.693554e+00 3.243744e-09 8.358921e-09 0.005179575 6.305009e-06 +## Gene4 3.921184e-08 2.002084e-05 1.213953e+01 0.061775849 1.712920e-05 +## Gene5 1.037909e-04 2.047324e+01 3.391620e-02 0.256579054 7.059271e+03</code></pre> <p>An additional (big) advantage of outputting a <code>SingleCellExperiment</code> is that we get immediate access to other analysis packages, such as the plotting functions in <code>scater</code>. For example we can make a PCA plot:</p> <div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb85-1" data-line-number="1"><span class="co"># Use scater to calculate logcounts</span></a> <a class="sourceLine" id="cb85-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/normalize">normalise</a></span>(sim)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> <div class="sourceCode" id="cb87"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb87-1" data-line-number="1"><span class="co"># Plot PCA</span></a> -<a class="sourceLine" id="cb87-2" data-line-number="2"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plotPCA">plotPCA</a></span>(sim)</a></code></pre></div> +<a class="sourceLine" id="cb87-2" data-line-number="2"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim)</a></code></pre></div> <p><img src="splatter_files/figure-html/pca-1.png" width="576" style="display: block; margin: auto;"></p> <p>(<strong>NOTE:</strong> Your values and plots may look different as the simulation is random and produces different results each time it is run.)</p> <p>For more details about the <code>SingleCellExperiment</code> object refer to the [vignette] <a href="https://bioconductor.org/packages/devel/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html">SCE-vignette</a>. For information about what you can do with <code>scater</code> refer to the <code>scater</code> documentation and <a href="https://bioconductor.org/packages/release/bioc/vignettes/scater/inst/doc/vignette.html">vignette</a>.</p> @@ -574,45 +600,62 @@ </li> </ul> <p>Values that have been added by Splatter are named using <code>UpperCamelCase</code> to separate them from the <code>underscore_naming</code> used by <code>scater</code> and other packages. For more information on the simulation see <code><a href="../reference/splatSimulate.html">?splatSimulate</a></code>.</p> -<section id="simulating-groups" class="level2"><h2>Simulating groups</h2> +<div id="simulating-groups" class="section level2"> +<h2 class="hasAnchor"> +<a href="#simulating-groups" class="anchor"></a>Simulating groups</h2> <p>So far we have only simulated a single population of cells but often we are interested in investigating a mixed population of cells and looking to see what cell types are present or what differences there are between them. Splatter is able to simulate these situations by changing the <code>method</code> argument Here we are going to simulate two groups, by specifying the <code>group.prob</code> parameter and setting the <code>method</code> parameter to <code>"groups"</code>:</p> <p>(<strong>NOTE:</strong> We have also set the <code>verbose</code> argument to <code>FALSE</code> to stop Splatter printing progress messages.)</p> <div class="sourceCode" id="cb88"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb88-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">group.prob =</span> <span class="kw">c</span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>), <span class="dt">method =</span> <span class="st">"groups"</span>,</a> <a class="sourceLine" id="cb88-2" data-line-number="2"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb88-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/normalize">normalise</a></span>(sim.groups)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb90"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb90-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plotPCA">plotPCA</a></span>(sim.groups, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb90"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb90-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> <p><img src="splatter_files/figure-html/groups-1.png" width="576" style="display: block; margin: auto;"></p> <p>As we have set both the group probabilites to 0.5 we should get approximately equal numbers of cells in each group (around 50 in this case). If we wanted uneven groups we could set <code>group.prob</code> to any set of probabilites that sum to 1.</p> -</section><section id="simulating-paths" class="level2"><h2>Simulating paths</h2> +</div> +<div id="simulating-paths" class="section level2"> +<h2 class="hasAnchor"> +<a href="#simulating-paths" class="anchor"></a>Simulating paths</h2> <p>The other situation that is often of interest is a differentiation process where one cell type is changing into another. Splatter approximates this process by simulating a series of steps between two groups and randomly assigning each cell to a step. We can create this kind of simulation using the <code>"paths"</code> method.</p> <div class="sourceCode" id="cb91"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb91-1" data-line-number="1">sim.paths <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">method =</span> <span class="st">"paths"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb91-2" data-line-number="2">sim.paths <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/normalize">normalise</a></span>(sim.paths)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb93"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb93-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plotPCA">plotPCA</a></span>(sim.paths, <span class="dt">colour_by =</span> <span class="st">"Step"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb93"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb93-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.paths, <span class="dt">colour_by =</span> <span class="st">"Step"</span>)</a></code></pre></div> <p><img src="splatter_files/figure-html/paths-1.png" width="576" style="display: block; margin: auto;"></p> <p>Here the colours represent the “step†of each cell or how far along the differentiation path it is. We can see that the cells with dark colours are more similar to the originating cell type and the light coloured cells are closer to the final, differentiated, cell type. By setting additional parameters it is possible to simulate more complex process (for example multiple mature cell types from a single progenitor).</p> -</section><section id="batch-effects" class="level2"><h2>Batch effects</h2> +</div> +<div id="batch-effects" class="section level2"> +<h2 class="hasAnchor"> +<a href="#batch-effects" class="anchor"></a>Batch effects</h2> <p>Another factor that is important in the analysis of any sequencing experiment are batch effects, technical variation that is common to a set of samples processed at the same time. We apply batch effects by telling Splatter how many cells are in each batch:</p> <div class="sourceCode" id="cb94"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb94-1" data-line-number="1">sim.batches <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw">c</span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb94-2" data-line-number="2">sim.batches <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/normalize">normalise</a></span>(sim.batches)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb96"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb96-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plotPCA">plotPCA</a></span>(sim.batches, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb96"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb96-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.batches, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a></code></pre></div> <p><img src="splatter_files/figure-html/batches-1.png" width="576" style="display: block; margin: auto;"></p> <p>This looks at lot like when we simulated groups and that is because the process is very similar. The difference is that batch effects are applied to all genes, not just those that are differentially expressed, and the effects are usually smaller. By combining groups and batches we can simulate both unwanted variation that we aren’t interested in (batch) and the wanted variation we are looking for (group):</p> <div class="sourceCode" id="cb97"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb97-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw">c</span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">group.prob =</span> <span class="kw">c</span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>),</a> <a class="sourceLine" id="cb97-2" data-line-number="2"> <span class="dt">method =</span> <span class="st">"groups"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb97-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/normalize">normalise</a></span>(sim.groups)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb99"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb99-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plotPCA">plotPCA</a></span>(sim.groups, <span class="dt">shape_by =</span> <span class="st">"Batch"</span>, <span class="dt">colour_by =</span> <span class="st">"Group"</span>,</a> +<div class="sourceCode" id="cb99"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb99-1" data-line-number="1"><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">shape_by =</span> <span class="st">"Batch"</span>, <span class="dt">colour_by =</span> <span class="st">"Group"</span>,</a> <a class="sourceLine" id="cb99-2" data-line-number="2"> <span class="dt">exprs_values =</span> <span class="st">"counts"</span>)</a></code></pre></div> +<pre><code>## Warning in .disambiguate_args(...): non-plotting arguments like +## 'exprs_values' should go in 'run_args'</code></pre> <p><img src="splatter_files/figure-html/batch-groups-1.png" width="576" style="display: block; margin: auto;"></p> <p>Here we see that the effects of the group (first component) are stronger than the batch effects (second component) but by adjusting the parameters we could made the batch effects dominate.</p> -</section><section id="convenience-functions" class="level2"><h2>Convenience functions</h2> +</div> +<div id="convenience-functions" class="section level2"> +<h2 class="hasAnchor"> +<a href="#convenience-functions" class="anchor"></a>Convenience functions</h2> <p>Each of the Splatter simulation methods has it’s own convenience function. To simulate a single population use <code><a href="../reference/splatSimulate.html">splatSimulateSingle()</a></code> (equivalent to <code><a href="../reference/splatSimulate.html">splatSimulate(method = "single")</a></code>), to simulate grops use <code><a href="../reference/splatSimulate.html">splatSimulateGroups()</a></code> (equivalent to <code><a href="../reference/splatSimulate.html">splatSimulate(method = "groups")</a></code>) or to simulate paths use <code><a href="../reference/splatSimulate.html">splatSimulatePaths()</a></code> (equivalent to <code><a href="../reference/splatSimulate.html">splatSimulate(method = "paths")</a></code>).</p> -</section></section><section id="other-simulations" class="level1"><h1>Other simulations</h1> +</div> +</div> +<div id="other-simulations" class="section level1"> +<h1 class="hasAnchor"> +<a href="#other-simulations" class="anchor"></a>Other simulations</h1> <p>As well as it’s own Splat simulation method the Splatter package contains implementations of other single-cell RNA-seq simulations that have been published or wrappers around simulations included in other packages. To see all the available simulations run the <code><a href="../reference/listSims.html">listSims()</a></code> function:</p> -<div class="sourceCode" id="cb100"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb100-1" data-line-number="1"><span class="kw"><a href="../reference/listSims.html">listSims</a></span>()</a></code></pre></div> +<div class="sourceCode" id="cb101"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb101-1" data-line-number="1"><span class="kw"><a href="../reference/listSims.html">listSims</a></span>()</a></code></pre></div> <pre><code>## Splatter currently contains 12 simulations ## ## Splat (splat) @@ -663,177 +706,192 @@ ## DOI: 10.1101/125112 GitHub: drisso/zinbwave ## The ZINB-WaVE simulation simulates counts from a sophisticated zero-inflated negative-binomial distribution including cell and gene-level covariates.</code></pre> <p>(or more conveniently for the vignette as a table)</p> -<div class="sourceCode" id="cb102"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb102-1" data-line-number="1">knitr<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/knitr/topics/kable">kable</a></span>(<span class="kw"><a href="../reference/listSims.html">listSims</a></span>(<span class="dt">print =</span> <span class="ot">FALSE</span>))</a></code></pre></div> +<div class="sourceCode" id="cb103"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb103-1" data-line-number="1">knitr<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/knitr/topics/kable">kable</a></span>(<span class="kw"><a href="../reference/listSims.html">listSims</a></span>(<span class="dt">print =</span> <span class="ot">FALSE</span>))</a></code></pre></div> <table class="table"> <thead><tr class="header"> -<th style="text-align: left;">Name</th> -<th style="text-align: left;">Prefix</th> -<th style="text-align: left;">DOI</th> -<th style="text-align: left;">GitHub</th> -<th style="text-align: left;">Description</th> +<th align="left">Name</th> +<th align="left">Prefix</th> +<th align="left">DOI</th> +<th align="left">GitHub</th> +<th align="left">Description</th> </tr></thead> <tbody> <tr class="odd"> -<td style="text-align: left;">Splat</td> -<td style="text-align: left;">splat</td> -<td style="text-align: left;">10.1186/s13059-017-1305-0</td> -<td style="text-align: left;">Oshlack/splatter</td> -<td style="text-align: left;">The Splat simulation generates means from a gamma distribution, adjusts them for BCV and generates counts from a gamma-poisson. Dropout and batch effects can be optionally added.</td> +<td align="left">Splat</td> +<td align="left">splat</td> +<td align="left">10.1186/s13059-017-1305-0</td> +<td align="left">Oshlack/splatter</td> +<td align="left">The Splat simulation generates means from a gamma distribution, adjusts them for BCV and generates counts from a gamma-poisson. Dropout and batch effects can be optionally added.</td> </tr> <tr class="even"> -<td style="text-align: left;">Splat Single</td> -<td style="text-align: left;">splatSingle</td> -<td style="text-align: left;">10.1186/s13059-017-1305-0</td> -<td style="text-align: left;">Oshlack/splatter</td> -<td style="text-align: left;">The Splat simulation with a single population.</td> +<td align="left">Splat Single</td> +<td align="left">splatSingle</td> +<td align="left">10.1186/s13059-017-1305-0</td> +<td align="left">Oshlack/splatter</td> +<td align="left">The Splat simulation with a single population.</td> </tr> <tr class="odd"> -<td style="text-align: left;">Splat Groups</td> -<td style="text-align: left;">splatGroups</td> -<td style="text-align: left;">10.1186/s13059-017-1305-0</td> -<td style="text-align: left;">Oshlack/splatter</td> -<td style="text-align: left;">The Splat simulation with multiple groups. Each group can have it’s own differential expression probability and fold change distribution.</td> +<td align="left">Splat Groups</td> +<td align="left">splatGroups</td> +<td align="left">10.1186/s13059-017-1305-0</td> +<td align="left">Oshlack/splatter</td> +<td align="left">The Splat simulation with multiple groups. Each group can have it’s own differential expression probability and fold change distribution.</td> </tr> <tr class="even"> -<td style="text-align: left;">Splat Paths</td> -<td style="text-align: left;">splatPaths</td> -<td style="text-align: left;">10.1186/s13059-017-1305-0</td> -<td style="text-align: left;">Oshlack/splatter</td> -<td style="text-align: left;">The Splat simulation with differentiation paths. Each path can have it’s own length, skew and probability. Genes can change in non-linear ways.</td> +<td align="left">Splat Paths</td> +<td align="left">splatPaths</td> +<td align="left">10.1186/s13059-017-1305-0</td> +<td align="left">Oshlack/splatter</td> +<td align="left">The Splat simulation with differentiation paths. Each path can have it’s own length, skew and probability. Genes can change in non-linear ways.</td> </tr> <tr class="odd"> -<td style="text-align: left;">Simple</td> -<td style="text-align: left;">simple</td> -<td style="text-align: left;">10.1186/s13059-017-1305-0</td> -<td style="text-align: left;">Oshlack/splatter</td> -<td style="text-align: left;">A simple simulation with gamma means and negative binomial counts.</td> +<td align="left">Simple</td> +<td align="left">simple</td> +<td align="left">10.1186/s13059-017-1305-0</td> +<td align="left">Oshlack/splatter</td> +<td align="left">A simple simulation with gamma means and negative binomial counts.</td> </tr> <tr class="even"> -<td style="text-align: left;">Lun</td> -<td style="text-align: left;">lun</td> -<td style="text-align: left;">10.1186/s13059-016-0947-7</td> -<td style="text-align: left;">MarioniLab/Deconvolution2016</td> -<td style="text-align: left;">Gamma distributed means and negative binomial counts. Cells are given a size factor and differential expression can be simulated with fixed fold changes.</td> +<td align="left">Lun</td> +<td align="left">lun</td> +<td align="left">10.1186/s13059-016-0947-7</td> +<td align="left">MarioniLab/Deconvolution2016</td> +<td align="left">Gamma distributed means and negative binomial counts. Cells are given a size factor and differential expression can be simulated with fixed fold changes.</td> </tr> <tr class="odd"> -<td style="text-align: left;">Lun 2</td> -<td style="text-align: left;">lun2</td> -<td style="text-align: left;">10.1093/biostatistics/kxw055</td> -<td style="text-align: left;">MarioniLab/PlateEffects2016</td> -<td style="text-align: left;">Negative binomial counts where the means and dispersions have been sampled from a real dataset. The core feature of the Lun 2 simulation is the addition of plate effects. Differential expression can be added between two groups of plates and optionally a zero-inflated negative-binomial can be used.</td> +<td align="left">Lun 2</td> +<td align="left">lun2</td> +<td align="left">10.1093/biostatistics/kxw055</td> +<td align="left">MarioniLab/PlateEffects2016</td> +<td align="left">Negative binomial counts where the means and dispersions have been sampled from a real dataset. The core feature of the Lun 2 simulation is the addition of plate effects. Differential expression can be added between two groups of plates and optionally a zero-inflated negative-binomial can be used.</td> </tr> <tr class="even"> -<td style="text-align: left;">scDD</td> -<td style="text-align: left;">scDD</td> -<td style="text-align: left;">10.1186/s13059-016-1077-y</td> -<td style="text-align: left;">kdkorthauer/scDD</td> -<td style="text-align: left;">The scDD simulation samples a given dataset and can simulate differentially expressed and differentially distributed genes between two conditions.</td> +<td align="left">scDD</td> +<td align="left">scDD</td> +<td align="left">10.1186/s13059-016-1077-y</td> +<td align="left">kdkorthauer/scDD</td> +<td align="left">The scDD simulation samples a given dataset and can simulate differentially expressed and differentially distributed genes between two conditions.</td> </tr> <tr class="odd"> -<td style="text-align: left;">BASiCS</td> -<td style="text-align: left;">BASiCS</td> -<td style="text-align: left;">10.1371/journal.pcbi.1004333</td> -<td style="text-align: left;">catavallejos/BASiCS</td> -<td style="text-align: left;">The BASiCS simulation is based on a bayesian model used to deconvolve biological and technical variation and includes spike-ins and batch effects.</td> +<td align="left">BASiCS</td> +<td align="left">BASiCS</td> +<td align="left">10.1371/journal.pcbi.1004333</td> +<td align="left">catavallejos/BASiCS</td> +<td align="left">The BASiCS simulation is based on a bayesian model used to deconvolve biological and technical variation and includes spike-ins and batch effects.</td> </tr> <tr class="even"> -<td style="text-align: left;">mfa</td> -<td style="text-align: left;">mfa</td> -<td style="text-align: left;">10.12688/wellcomeopenres.11087.1</td> -<td style="text-align: left;">kieranrcampbell/mfa</td> -<td style="text-align: left;">The mfa simulation produces a bifurcating pseudotime trajectory. This can optionally include genes with transient changes in expression and added dropout.</td> +<td align="left">mfa</td> +<td align="left">mfa</td> +<td align="left">10.12688/wellcomeopenres.11087.1</td> +<td align="left">kieranrcampbell/mfa</td> +<td align="left">The mfa simulation produces a bifurcating pseudotime trajectory. This can optionally include genes with transient changes in expression and added dropout.</td> </tr> <tr class="odd"> -<td style="text-align: left;">PhenoPath</td> -<td style="text-align: left;">pheno</td> -<td style="text-align: left;">10.1101/159913</td> -<td style="text-align: left;">kieranrcampbell/phenopath</td> -<td style="text-align: left;">The PhenoPath simulation produces a pseudotime trajectory with different types of genes.</td> +<td align="left">PhenoPath</td> +<td align="left">pheno</td> +<td align="left">10.1101/159913</td> +<td align="left">kieranrcampbell/phenopath</td> +<td align="left">The PhenoPath simulation produces a pseudotime trajectory with different types of genes.</td> </tr> <tr class="even"> -<td style="text-align: left;">ZINB-WaVE</td> -<td style="text-align: left;">zinb</td> -<td style="text-align: left;">10.1101/125112</td> -<td style="text-align: left;">drisso/zinbwave</td> -<td style="text-align: left;">The ZINB-WaVE simulation simulates counts from a sophisticated zero-inflated negative-binomial distribution including cell and gene-level covariates.</td> +<td align="left">ZINB-WaVE</td> +<td align="left">zinb</td> +<td align="left">10.1101/125112</td> +<td align="left">drisso/zinbwave</td> +<td align="left">The ZINB-WaVE simulation simulates counts from a sophisticated zero-inflated negative-binomial distribution including cell and gene-level covariates.</td> </tr> </tbody> </table> <p>Each simulation has it’s own prefix which gives the name of the functions associated with that simulation. For example the prefix for the simple simulation is <code>simple</code> so it would store it’s parameters in a <code>SimpleParams</code> object that can be created using <code><a href="../reference/newParams.html">newSimpleParams()</a></code> or estimated from real data using <code><a href="../reference/simpleEstimate.html">simpleEstimate()</a></code>. To simulate data using that simulation you would use <code><a href="../reference/simpleSimulate.html">simpleSimulate()</a></code>. Each simulation returns a <code>SingleCellExperiment</code> object with intermediate values similar to that returned by <code><a href="../reference/splatSimulate.html">splatSimulate()</a></code>. For more detailed information on each simulation see the appropriate help page (eg. <code><a href="../reference/simpleSimulate.html">?simpleSimulate</a></code> for information on how the simple simulation works or <code><a href="../reference/lun2Estimate.html">? lun2Estimate</a></code> for details of how the Lun 2 simulation estimates parameters) or refer to the appropriate paper or package.</p> -</section><section id="other-expression-values" class="level1"><h1>Other expression values</h1> +</div> +<div id="other-expression-values" class="section level1"> +<h1 class="hasAnchor"> +<a href="#other-expression-values" class="anchor"></a>Other expression values</h1> <p>Splatter is designed to simulate count data but some analysis methods expect other expression values, particularly length-normalised values such as TPM or FPKM. The <code>scater</code> package has functions for adding these values to a <code>SingleCellExperiment</code> object but they require a length for each gene. The <code>addGeneLengths</code> function can be used to simulate these lengths:</p> -<div class="sourceCode" id="cb103"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb103-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb103-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="../reference/addGeneLengths.html">addGeneLengths</a></span>(sim)</a> -<a class="sourceLine" id="cb103-3" data-line-number="3"><span class="kw">head</span>(<span class="kw">rowData</span>(sim))</a></code></pre></div> +<div class="sourceCode" id="cb104"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb104-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb104-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="../reference/addGeneLengths.html">addGeneLengths</a></span>(sim)</a> +<a class="sourceLine" id="cb104-3" data-line-number="3"><span class="kw">head</span>(<span class="kw">rowData</span>(sim))</a></code></pre></div> <pre><code>## DataFrame with 6 rows and 3 columns -## Gene GeneMean Length -## <factor> <numeric> <numeric> -## 1 Gene1 4.98592529 510 -## 2 Gene2 0.03299794 5590 -## 3 Gene3 0.03356105 7265 -## 4 Gene4 0.06417636 5095 -## 5 Gene5 0.25296758 5087 -## 6 Gene6 4.33791562 1087</code></pre> +## Gene GeneMean Length +## <factor> <numeric> <numeric> +## 1 Gene1 3.56323287578331 3147 +## 2 Gene2 2.01145135360206 1818 +## 3 Gene3 1.86585373979197 1706 +## 4 Gene4 0.604002851544031 2095 +## 5 Gene5 0.208358805273164 12058 +## 6 Gene6 0.00251242171935063 3166</code></pre> <p>We can then use <code>scater</code> to calculate TPM:</p> -<div class="sourceCode" id="cb105"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb105-1" data-line-number="1"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/calculateTPM">calculateTPM</a></span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length)</a> -<a class="sourceLine" id="cb105-2" data-line-number="2"><span class="kw">tpm</span>(sim)[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">5</span>]</a></code></pre></div> -<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 1.91425324 0.59834736 0.4419499 0.3010339 1.168873 -## Gene2 0.00000000 0.01364746 0.0000000 0.0000000 0.000000 -## Gene3 0.00000000 0.00000000 0.0000000 0.0000000 0.000000 -## Gene4 0.00000000 0.00000000 0.0000000 0.0000000 0.000000 -## Gene5 0.01476266 0.00000000 0.0000000 0.0000000 0.000000</code></pre> +<div class="sourceCode" id="cb106"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb106-1" data-line-number="1"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/scater/topics/calculateTPM">calculateTPM</a></span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length)</a> +<a class="sourceLine" id="cb106-2" data-line-number="2"><span class="kw">tpm</span>(sim)[<span class="dv">1</span><span class="op">:</span><span class="dv">5</span>, <span class="dv">1</span><span class="op">:</span><span class="dv">5</span>]</a></code></pre></div> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 0.04756574 0.04729671 0.11788209 0.145152470 0.04817510 +## Gene2 0.12350610 0.12280755 0.12243397 0.167508186 0.12508831 +## Gene3 0.04387145 0.13086994 0.08698122 0.133878905 0.04443348 +## Gene4 0.00000000 0.00000000 0.00000000 0.000000000 0.03618306 +## Gene5 0.00000000 0.00000000 0.00000000 0.006313856 0.00000000</code></pre> <p>The default method used by <code>addGeneLengths</code> to simulate lengths is to generate values from a log-normal distribution which are then rounded to give an integer length. The parameters for this distribution are based on human protein coding genes but can be adjusted if needed (for example for other species). Alternatively lengths can be sampled from a provided vector (see <code><a href="../reference/addGeneLengths.html">?addGeneLengths</a></code> for details and an example).</p> -</section><section id="comparing-simulations-and-real-data" class="level1"><h1>Comparing simulations and real data</h1> +</div> +<div id="comparing-simulations-and-real-data" class="section level1"> +<h1 class="hasAnchor"> +<a href="#comparing-simulations-and-real-data" class="anchor"></a>Comparing simulations and real data</h1> <p>One thing you might like to do after simulating data is to compare it to a real dataset, or compare simulations with different parameters or models. Splatter provides a function <code>compareSCEs</code> that aims to make these comparisons easier. As the name suggests this function takes a list of <code>SingleCellExperiment</code> objects, combines the datasets and produces some plots comparing them. Let’s make two small simulations and see how they compare.</p> -<div class="sourceCode" id="cb107"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb107-1" data-line-number="1">sim1 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">batchCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb107-2" data-line-number="2">sim2 <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">nCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb107-3" data-line-number="3">comparison <-<span class="st"> </span><span class="kw"><a href="../reference/compareSCEs.html">compareSCEs</a></span>(<span class="kw">list</span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2))</a></code></pre></div> +<div class="sourceCode" id="cb108"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb108-1" data-line-number="1">sim1 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">batchCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb108-2" data-line-number="2">sim2 <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">nCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb108-3" data-line-number="3">comparison <-<span class="st"> </span><span class="kw"><a href="../reference/compareSCEs.html">compareSCEs</a></span>(<span class="kw">list</span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2))</a></code></pre></div> <pre><code>## Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics. ## Old names are currently maintained for back-compatibility, but may be removed in future releases. ## Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics. ## Old names are currently maintained for back-compatibility, but may be removed in future releases.</code></pre> -<div class="sourceCode" id="cb109"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb109-1" data-line-number="1"><span class="kw">names</span>(comparison)</a></code></pre></div> +<div class="sourceCode" id="cb110"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb110-1" data-line-number="1"><span class="kw">names</span>(comparison)</a></code></pre></div> <pre><code>## [1] "FeatureData" "PhenoData" "Plots"</code></pre> -<div class="sourceCode" id="cb111"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb111-1" data-line-number="1"><span class="kw">names</span>(comparison<span class="op">$</span>Plots)</a></code></pre></div> +<div class="sourceCode" id="cb112"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb112-1" data-line-number="1"><span class="kw">names</span>(comparison<span class="op">$</span>Plots)</a></code></pre></div> <pre><code>## [1] "Means" "Variances" "MeanVar" "LibrarySizes" ## [5] "ZerosGene" "ZerosCell" "MeanZeros"</code></pre> <p>The returned list has three items. The first two are the combined datasets by gene (<code>FeatureData</code>) and by cell (<code>PhenoData</code>) and the third contains some comparison plots (produced using <code>ggplot2</code>), for example a plot of the distribution of means:</p> -<div class="sourceCode" id="cb113"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb113-1" data-line-number="1">comparison<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb114-1" data-line-number="1">comparison<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/comparison-means-1.png" width="576" style="display: block; margin: auto;"></p> <p>These are only a few of the plots you might want to consider but it should be easy to make more using the returned data. For example, we could plot the number of expressed genes against the library size:</p> -<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb114-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"ggplot2"</span>)</a> -<a class="sourceLine" id="cb114-2" data-line-number="2"><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(comparison<span class="op">$</span>PhenoData,</a> -<a class="sourceLine" id="cb114-3" data-line-number="3"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">x =</span> total_counts, <span class="dt">y =</span> total_features, <span class="dt">colour =</span> Dataset)) <span class="op">+</span></a> -<a class="sourceLine" id="cb114-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>()</a></code></pre></div> +<div class="sourceCode" id="cb115"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb115-1" data-line-number="1"><span class="kw">library</span>(<span class="st">"ggplot2"</span>)</a> +<a class="sourceLine" id="cb115-2" data-line-number="2"><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(comparison<span class="op">$</span>PhenoData,</a> +<a class="sourceLine" id="cb115-3" data-line-number="3"> <span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">x =</span> total_counts, <span class="dt">y =</span> total_features, <span class="dt">colour =</span> Dataset)) <span class="op">+</span></a> +<a class="sourceLine" id="cb115-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="http://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>()</a></code></pre></div> <p><img src="splatter_files/figure-html/comparison-libsize-features-1.png" width="576" style="display: block; margin: auto;"></p> -<section id="comparing-differences" class="level2"><h2>Comparing differences</h2> +<div id="comparing-differences" class="section level2"> +<h2 class="hasAnchor"> +<a href="#comparing-differences" class="anchor"></a>Comparing differences</h2> <p>Sometimes instead of visually comparing datasets it may be more interesting to look at the differences between them. We can do this using the <code>diffSCEs</code> function. Similar to <code>compareSCEs</code> this function takes a list of <code>SingleCellExperiment</code> objects but now we also specify one to be a reference. A series of similar plots are returned but instead of showing the overall distributions they demonstrate differences from the reference.</p> -<div class="sourceCode" id="cb115"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb115-1" data-line-number="1">difference <-<span class="st"> </span><span class="kw"><a href="../reference/diffSCEs.html">diffSCEs</a></span>(<span class="kw">list</span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2), <span class="dt">ref =</span> <span class="st">"Simple"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb116"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb116-1" data-line-number="1">difference <-<span class="st"> </span><span class="kw"><a href="../reference/diffSCEs.html">diffSCEs</a></span>(<span class="kw">list</span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2), <span class="dt">ref =</span> <span class="st">"Simple"</span>)</a></code></pre></div> <pre><code>## Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics. ## Old names are currently maintained for back-compatibility, but may be removed in future releases. ## Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics. ## Old names are currently maintained for back-compatibility, but may be removed in future releases.</code></pre> -<div class="sourceCode" id="cb117"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb117-1" data-line-number="1">difference<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb118"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb118-1" data-line-number="1">difference<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/difference-1.png" width="576" style="display: block; margin: auto;"></p> <p>We also get a series of Quantile-Quantile plot that can be used to compare distributions.</p> -<div class="sourceCode" id="cb118"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb118-1" data-line-number="1">difference<span class="op">$</span>QQPlots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb119"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb119-1" data-line-number="1">difference<span class="op">$</span>QQPlots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/difference-qq-1.png" width="576" style="display: block; margin: auto;"></p> -</section><section id="making-panels" class="level2"><h2>Making panels</h2> +</div> +<div id="making-panels" class="section level2"> +<h2 class="hasAnchor"> +<a href="#making-panels" class="anchor"></a>Making panels</h2> <p>Each of these comparisons makes several plots which can be a lot to look at. To make this easier, or to produce figures for publications, you can make use of the functions <code>makeCompPanel</code>, <code>makeDiffPanel</code> and <code>makeOverallPanel</code>.</p> <p>These functions combine the plots into a single panel using the <code>cowplot</code> package. The panels can be quite large and hard to view (for example in RStudio’s plot viewer) so it can be better to output the panels and view them separately. Luckily <code>cowplot</code> provides a convenient function for saving the images. Here are some suggested parameters for outputting each of the panels:</p> -<div class="sourceCode" id="cb119"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb119-1" data-line-number="1"><span class="co"># This code is just an example and is not run</span></a> -<a class="sourceLine" id="cb119-2" data-line-number="2">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeCompPanel.html">makeCompPanel</a></span>(comparison)</a> -<a class="sourceLine" id="cb119-3" data-line-number="3">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"comp_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">4</span>, <span class="dt">ncol =</span> <span class="dv">3</span>)</a> -<a class="sourceLine" id="cb119-4" data-line-number="4"></a> -<a class="sourceLine" id="cb119-5" data-line-number="5">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeDiffPanel.html">makeDiffPanel</a></span>(difference)</a> -<a class="sourceLine" id="cb119-6" data-line-number="6">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"diff_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">3</span>, <span class="dt">ncol =</span> <span class="dv">5</span>)</a> -<a class="sourceLine" id="cb119-7" data-line-number="7"></a> -<a class="sourceLine" id="cb119-8" data-line-number="8">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeOverallPanel.html">makeOverallPanel</a></span>(comparison, difference)</a> -<a class="sourceLine" id="cb119-9" data-line-number="9">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"overall_panel.png"</span>, panel, <span class="dt">ncol =</span> <span class="dv">4</span>, <span class="dt">nrow =</span> <span class="dv">7</span>)</a></code></pre></div> -</section></section><section id="citing-splatter" class="level1"><h1>Citing Splatter</h1> +<div class="sourceCode" id="cb120"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb120-1" data-line-number="1"><span class="co"># This code is just an example and is not run</span></a> +<a class="sourceLine" id="cb120-2" data-line-number="2">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeCompPanel.html">makeCompPanel</a></span>(comparison)</a> +<a class="sourceLine" id="cb120-3" data-line-number="3">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"comp_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">4</span>, <span class="dt">ncol =</span> <span class="dv">3</span>)</a> +<a class="sourceLine" id="cb120-4" data-line-number="4"></a> +<a class="sourceLine" id="cb120-5" data-line-number="5">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeDiffPanel.html">makeDiffPanel</a></span>(difference)</a> +<a class="sourceLine" id="cb120-6" data-line-number="6">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"diff_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">3</span>, <span class="dt">ncol =</span> <span class="dv">5</span>)</a> +<a class="sourceLine" id="cb120-7" data-line-number="7"></a> +<a class="sourceLine" id="cb120-8" data-line-number="8">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeOverallPanel.html">makeOverallPanel</a></span>(comparison, difference)</a> +<a class="sourceLine" id="cb120-9" data-line-number="9">cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"overall_panel.png"</span>, panel, <span class="dt">ncol =</span> <span class="dv">4</span>, <span class="dt">nrow =</span> <span class="dv">7</span>)</a></code></pre></div> +</div> +</div> +<div id="citing-splatter" class="section level1"> +<h1 class="hasAnchor"> +<a href="#citing-splatter" class="anchor"></a>Citing Splatter</h1> <p>If you use Splatter in your work please cite our paper:</p> -<div class="sourceCode" id="cb120"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb120-1" data-line-number="1"><span class="kw">citation</span>(<span class="st">"splatter"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb121"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb121-1" data-line-number="1"><span class="kw">citation</span>(<span class="st">"splatter"</span>)</a></code></pre></div> <pre><code>## ## Zappia L, Phipson B, Oshlack A. Splatter: Simulation of ## single-cell RNA sequencing data. Genome Biology. 2017; @@ -849,8 +907,11 @@ ## url = {http://dx.doi.org/10.1186/s13059-017-1305-0}, ## doi = {10.1186/s13059-017-1305-0}, ## }</code></pre> -</section><section id="session-information" class="level1 unnumbered"><h1>Session information</h1> -<div class="sourceCode" id="cb122"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb122-1" data-line-number="1"><span class="kw">sessionInfo</span>()</a></code></pre></div> +</div> +<div id="session-information" class="section level1 unnumbered"> +<h1 class="hasAnchor"> +<a href="#session-information" class="anchor"></a>Session information</h1> +<div class="sourceCode" id="cb123"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb123-1" data-line-number="1"><span class="kw">sessionInfo</span>()</a></code></pre></div> <pre><code>## R Under development (unstable) (2018-01-28 r74177) ## Platform: x86_64-apple-darwin16.7.0 (64-bit) ## Running under: macOS Sierra 10.12.6 @@ -867,57 +928,57 @@ ## [8] methods base ## ## other attached packages: -## [1] scater_1.7.4 ggplot2_2.2.1 -## [3] splatter_1.3.1 SingleCellExperiment_1.1.2 -## [5] SummarizedExperiment_1.9.12 DelayedArray_0.5.17 -## [7] BiocParallel_1.13.1 matrixStats_0.53.0 -## [9] Biobase_2.39.2 GenomicRanges_1.31.12 -## [11] GenomeInfoDb_1.15.2 IRanges_2.13.16 -## [13] S4Vectors_0.17.28 BiocGenerics_0.25.1 +## [1] scater_1.7.13 ggplot2_2.2.1 +## [3] splatter_1.3.2 SingleCellExperiment_1.1.2 +## [5] SummarizedExperiment_1.9.15 DelayedArray_0.5.22 +## [7] BiocParallel_1.13.3 matrixStats_0.53.1 +## [9] Biobase_2.39.2 GenomicRanges_1.31.22 +## [11] GenomeInfoDb_1.15.5 IRanges_2.13.28 +## [13] S4Vectors_0.17.37 BiocGenerics_0.25.3 ## ## loaded via a namespace (and not attached): -## [1] bitops_1.0-6 bit64_0.9-7 -## [3] progress_1.1.2 httr_1.3.1 -## [5] rprojroot_1.3-2 tools_3.5.0 -## [7] backports_1.1.2 R6_2.2.2 -## [9] vipor_0.4.5 DBI_0.7 -## [11] lazyeval_0.2.1 colorspace_1.3-2 -## [13] sp_1.2-7 gridExtra_2.3 -## [15] prettyunits_1.0.2 bit_1.1-12 -## [17] compiler_3.5.0 labeling_0.3 -## [19] scales_0.5.0 checkmate_1.8.5 -## [21] stringr_1.2.0 digest_0.6.15 -## [23] rmarkdown_1.8 XVector_0.19.8 -## [25] pkgconfig_2.0.1 htmltools_0.3.6 -## [27] akima_0.6-2 highr_0.6 -## [29] limma_3.35.6 rlang_0.1.6.9003 -## [31] RSQLite_2.0 shiny_1.0.5 -## [33] DelayedMatrixStats_1.1.8 bindr_0.1 -## [35] dplyr_0.7.4 RCurl_1.95-4.10 -## [37] magrittr_1.5 GenomeInfoDbData_1.1.0 -## [39] Matrix_1.2-12 Rcpp_0.12.15 -## [41] ggbeeswarm_0.6.0 munsell_0.4.3 -## [43] Rhdf5lib_1.1.5 viridis_0.4.1 -## [45] stringi_1.1.6 yaml_2.1.16 -## [47] edgeR_3.21.6 MASS_7.3-48 -## [49] zlibbioc_1.25.0 rhdf5_2.23.5 -## [51] plyr_1.8.4 grid_3.5.0 -## [53] blob_1.1.0 shinydashboard_0.6.1 -## [55] lattice_0.20-35 cowplot_0.9.2 -## [57] splines_3.5.0 locfit_1.5-9.1 -## [59] knitr_1.19 pillar_1.1.0 -## [61] rjson_0.2.15 reshape2_1.4.3 -## [63] biomaRt_2.35.10 XML_3.98-1.9 -## [65] glue_1.2.0 evaluate_0.10.1 -## [67] data.table_1.10.4-3 httpuv_1.3.5 -## [69] gtable_0.2.0 assertthat_0.2.0 -## [71] mime_0.5 xtable_1.8-2 -## [73] survival_2.41-3 viridisLite_0.2.0 -## [75] tibble_1.4.2 AnnotationDbi_1.41.4 -## [77] beeswarm_0.2.3 memoise_1.1.0 -## [79] tximport_1.7.4 bindrcpp_0.2 +## [1] bitops_1.0-6 bit64_0.9-7 +## [3] progress_1.1.2 httr_1.3.1 +## [5] rprojroot_1.3-2 tools_3.5.0 +## [7] backports_1.1.2 R6_2.2.2 +## [9] vipor_0.4.5 DBI_0.8 +## [11] lazyeval_0.2.1 colorspace_1.3-2 +## [13] sp_1.2-7 gridExtra_2.3 +## [15] prettyunits_1.0.2 bit_1.1-12 +## [17] compiler_3.5.0 labeling_0.3 +## [19] scales_0.5.0 checkmate_1.8.5 +## [21] stringr_1.3.0 digest_0.6.15 +## [23] rmarkdown_1.9 XVector_0.19.9 +## [25] pkgconfig_2.0.1 htmltools_0.3.6 +## [27] akima_0.6-2 highr_0.6 +## [29] limma_3.35.14 rlang_0.2.0 +## [31] RSQLite_2.0 shiny_1.0.5 +## [33] DelayedMatrixStats_1.1.10 bindr_0.1.1 +## [35] dplyr_0.7.4 RCurl_1.95-4.10 +## [37] magrittr_1.5 GenomeInfoDbData_1.1.0 +## [39] Matrix_1.2-12 Rcpp_0.12.16 +## [41] ggbeeswarm_0.6.0 munsell_0.4.3 +## [43] Rhdf5lib_1.1.5 viridis_0.5.0 +## [45] stringi_1.1.7 yaml_2.1.18 +## [47] edgeR_3.21.9 MASS_7.3-48 +## [49] zlibbioc_1.25.0 rhdf5_2.23.5 +## [51] plyr_1.8.4 grid_3.5.0 +## [53] blob_1.1.1 shinydashboard_0.7.0 +## [55] lattice_0.20-35 cowplot_0.9.2 +## [57] splines_3.5.0 locfit_1.5-9.1 +## [59] knitr_1.20 pillar_1.2.1 +## [61] rjson_0.2.15 reshape2_1.4.3 +## [63] biomaRt_2.35.12 XML_3.98-1.10 +## [65] glue_1.2.0 evaluate_0.10.1 +## [67] data.table_1.10.4-3 httpuv_1.3.6.2 +## [69] gtable_0.2.0 assertthat_0.2.0 +## [71] mime_0.5 xtable_1.8-2 +## [73] survival_2.41-3 viridisLite_0.3.0 +## [75] tibble_1.4.2 AnnotationDbi_1.41.4 +## [77] beeswarm_0.2.3 memoise_1.1.0 +## [79] tximport_1.7.13 bindrcpp_0.2 ## [81] fitdistrplus_1.0-9</code></pre> -</section> +</div> </div> </div> diff --git a/docs/articles/splatter_files/figure-html/batch-groups-1.png b/docs/articles/splatter_files/figure-html/batch-groups-1.png index ab358698cc42c607250d3ec6f68e1692e60cd63b..baadc002cbb46a612b2d55cc2553ba07a85748b6 100644 Binary files a/docs/articles/splatter_files/figure-html/batch-groups-1.png and b/docs/articles/splatter_files/figure-html/batch-groups-1.png differ diff --git a/docs/articles/splatter_files/figure-html/batches-1.png b/docs/articles/splatter_files/figure-html/batches-1.png index 3daede742eec86e3237378787ff0a5eccad24c08..ff71471ae93b8c66c59ddb21eb31bf1ba74a7c3d 100644 Binary files a/docs/articles/splatter_files/figure-html/batches-1.png and b/docs/articles/splatter_files/figure-html/batches-1.png differ diff --git a/docs/articles/splatter_files/figure-html/comparison-libsize-features-1.png b/docs/articles/splatter_files/figure-html/comparison-libsize-features-1.png index 9833e27df511699d412ed54fa1dc0048eb043ecd..744adc0e2ee1a74b21b13827f07ad8999c695d47 100644 Binary files a/docs/articles/splatter_files/figure-html/comparison-libsize-features-1.png and b/docs/articles/splatter_files/figure-html/comparison-libsize-features-1.png differ diff --git a/docs/articles/splatter_files/figure-html/comparison-means-1.png b/docs/articles/splatter_files/figure-html/comparison-means-1.png index b80a0830443aeeb8f38805fca9b866de6b41408f..bbe6b0213d36f5c20c10a47b556b18448173783e 100644 Binary files a/docs/articles/splatter_files/figure-html/comparison-means-1.png and b/docs/articles/splatter_files/figure-html/comparison-means-1.png differ diff --git a/docs/articles/splatter_files/figure-html/difference-1.png b/docs/articles/splatter_files/figure-html/difference-1.png index 9b3e1237b8f7b7cd901292c5ff4bd1230575fde0..937bffc92a016a115dc6435844b6017d5629bb3d 100644 Binary files a/docs/articles/splatter_files/figure-html/difference-1.png and b/docs/articles/splatter_files/figure-html/difference-1.png differ diff --git a/docs/articles/splatter_files/figure-html/difference-qq-1.png b/docs/articles/splatter_files/figure-html/difference-qq-1.png index 642045e1604447eef42372b4d752ba767e829a1c..39d95a5b6811e169edba43dc7f7dc571b25c3f57 100644 Binary files a/docs/articles/splatter_files/figure-html/difference-qq-1.png and b/docs/articles/splatter_files/figure-html/difference-qq-1.png differ diff --git a/docs/articles/splatter_files/figure-html/groups-1.png b/docs/articles/splatter_files/figure-html/groups-1.png index 9ea07ae65bec64804f1b8c1568b3b229846b6fb0..e9fc24effa5d25f1ab4eb35f2ea5ae31f4bdc83f 100644 Binary files a/docs/articles/splatter_files/figure-html/groups-1.png and b/docs/articles/splatter_files/figure-html/groups-1.png differ diff --git a/docs/articles/splatter_files/figure-html/paths-1.png b/docs/articles/splatter_files/figure-html/paths-1.png index b3c71dcc07d403e496c49469a8e0f472dfe42a54..6a7006c1b758445a6d519921ee1c14cbe4a5bb48 100644 Binary files a/docs/articles/splatter_files/figure-html/paths-1.png and b/docs/articles/splatter_files/figure-html/paths-1.png differ diff --git a/docs/articles/splatter_files/figure-html/pca-1.png b/docs/articles/splatter_files/figure-html/pca-1.png index c81a7a2e67db4c5b73a740cf79f58fec174354b0..c3944128d4bd96f609df48800032bb51febef38a 100644 Binary files a/docs/articles/splatter_files/figure-html/pca-1.png and b/docs/articles/splatter_files/figure-html/pca-1.png differ diff --git a/docs/index.html b/docs/index.html index 12d07cc5e41dc599f59b6deb45e7256ae5ea7550..e81b7e443dda4b88ed1dde5e6ad4bbea1b8642f1 100644 --- a/docs/index.html +++ b/docs/index.html @@ -84,8 +84,10 @@ </ul> <p>Splatter is built on top of <a href="https://github.com/davismcc/scater"><code>scater</code></a> and stores simulations in <a href="https://github.com/drisso/SingleCellExperiment"><code>SingleCellExperiment</code></a> objects. Splatter also has functions for comparing simulations and real datasets.</p> <p><strong>!Please note!</strong> This site provides documentation for the development version of Splatter. For details on the current release please refer to <a href="https://bioconductor.org/packages/splatter" class="uri">https://bioconductor.org/packages/splatter</a>.</p> -<section class="level2"><h2>Installation.</h2> -<section class="level3"><h3>Release version</h3> +<div class="section level2"> +<h2>Installation.</h2> +<div class="section level3"> +<h3>Release version</h3> <p>Splatter has been accepted into the latest version of <a href="https://bioconductor.org/packages/splatter">Bioconductor</a> and hence requires the latest version of R (>=3.4).</p> <p>If you have these installed Splatter can be installed from Bioconductor using <code>biocLite</code>:</p> <pre class="{r}"><code>source("https://bioconductor.org/biocLite.R") @@ -93,7 +95,9 @@ biocLite("splatter")</code></pre> <p>If you wish to build a local version of the vignette use:</p> <pre class="{r}"><code><a href="http://www.rdocumentation.org/packages/BiocInstaller/topics/biocLite">biocLite("splatter", build_vignettes=TRUE)</a></code></pre> <p>This will also build the vignette and install all suggested dependencies (which aren’t required for core functionality). Building the vignette may sometimes fail when run from the command line, if this happens try running the install command in RStudio.</p> -</section><section class="level3"><h3>Development version</h3> +</div> +<div class="section level3"> +<h3>Development version</h3> <p>If you want to try the <a href="https://bioconductor.org/packages/devel/bioc/html/splatter.html">development version</a> this can also be installed from Bioconductor:</p> <pre class="{r}"><code>library(BiocInstaller) useDevel() @@ -103,12 +107,16 @@ biocLite("splatter")</code></pre> <p>Depending on the current release cycle you may also need to install the development version of R. See <a href="https://www.bioconductor.org/developers/how-to/useDevel/">here</a> for more details.</p> <p>Alternatively the development version can be installed directly from <a href="https://github.com/Oshlack/splatter">Github</a>:</p> <pre class="{r}"><code><a href="http://www.rdocumentation.org/packages/devtools/topics/install">devtools::install("Oshlack/splatter")</a></code></pre> -</section></section> +</div> </div> + </div> + <div class="col-md-3" id="sidebar"> <h2>Links</h2> <ul class="list-unstyled"> +<li>Download from BIOC at <br><a href="https://www.bioconductor.org/packages/splatter">https://​www.bioconductor.org/​packages/​splatter</a> +</li> <li>Browse source code at <br><a href="https://github.com/Oshlack/splatter">https://​github.com/​Oshlack/​splatter</a> </li> <li>Report a bug at <br><a href="https://github.com/Oshlack/splatter/issues">https://​github.com/​Oshlack/​splatter/​issues</a> diff --git a/docs/news/index.html b/docs/news/index.html index 791dca4dfac1b5349430e71c784bee702e951aad..cf4257d1ef40d0939299f0dd55a6f7dcc2ca05cc 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -103,6 +103,355 @@ </div> <div class="contents"> + <div class="section level2"> +<h2>Version 1.3.3 (2018-03-27)</h2> +<ul> +<li>Fix parameter passing bug in scDDEstimate</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.3.2 (2018-01-31)</h2> +<ul> +<li>Fix QC names that have been changed in scater</li> +<li>Move scater to Imports and add scater version</li> +<li>Remove lingering references to SCESets</li> +<li>Add more tests</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.3.1 (2018-01-03)</h2> +<ul> +<li>Fix error in vignette caused by changes in scater</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.3.0 (2017-10-13)</h2> +<ul> +<li>Bioconductor 3.7 devel</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.2.2 (2018-03-27)</h2> +<ul> +<li>Fix parameter passing bug in scDDEstimate</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.2.1 (2017-11-23)</h2> +<ul> +<li>Fix zinbwave installation error</li> +</ul> +</div> + <div class="section level1"> +<h1>Version 1.2.0 (2017-10-30)</h1> +<ul> +<li>Bioconductor 3.6 release</li> +</ul> +<div class="section level2"> +<h2>Version 1.1.8 (2017-10-13)</h2> +<ul> +<li>Add BASiCS simulation</li> +<li>Update Splatter citation</li> +<li>Update Lun2 reference</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.7 (2017-10-05)</h2> +<ul> +<li>Add PhenoPath simulation</li> +<li>Add ZINB-WaVE simulation</li> +<li>Adjust mfaSimulate output</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.6 (2017-10-02)</h2> +<ul> +<li>Update scDD version</li> +<li>Add mfa simulation</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.5 (2017-09-13)</h2> +<ul> +<li>Convert to SingleCellExperiment</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.4 (2017-08-04)</h2> +<ul> +<li>Fix group factors bug</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.3 (2017-07-20)</h2> +<ul> +<li>Add verbose option to scDDEstimate</li> +<li>Change “mean-dropout†to “mean-zeros†in compareSCESets</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.2 (2017-07-16)</h2> +<ul> +<li>Update summariseDiff</li> +<li>Update scDDEstimate, now estimates gene types</li> +<li>Fix error in lun2Estimate</li> +<li>Import SummarizedExperiment to avoid warnings</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.1 (2017-07-07)</h2> +<ul> +<li>Add batch effects to Splat simulation</li> +<li>Make Splat group assignment probabilistic</li> +<li>Update SplatParams with new parameters</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.1.0 (2017-07-07)</h2> +<ul> +<li>Bioconductor 3.6 devel</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.0.3 (2017-05-26)</h2> +<ul> +<li>Update citation</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.0.2 (2017-05-15)</h2> +<ul> +<li>Fix error handling when fitting means</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 1.0.1 (2017-04-28)</h2> +<ul> +<li>Fix scales in some difference plots</li> +<li>Fix colours in difference plots</li> +<li>Fix panel legends</li> +</ul> +</div> +</div> + <div class="section level1"> +<h1>Version 1.0.0 (2017-04-28)</h1> +<ul> +<li>Bioconductor 3.5 release</li> +</ul> +<div class="section level2"> +<h2>Version 0.99.15 (2017-04-14)</h2> +<ul> +<li>Add summariseDiff function</li> +<li>Add BPPARAM argument to scDDSimulate</li> +<li>Adjust default Splat DE factor parameters</li> +<li>Add limits to zeros diff plots</li> +<li>Remove estimation of dropout.present</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.14 (2017-03-28)</h2> +<ul> +<li>Add functions for making comparison panels</li> +<li>Add panel section to vignette</li> +<li>Change variance plot scale (for consistency)</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.13 (2017-03-25)</h2> +<ul> +<li>Modify how Lun2Params stores gene paramters to use data.frame</li> +<li>Move sampling of genes/cells to lun2Simulate</li> +<li>Return to old Lun2 nGenes estimate</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.12 (2017-03-22)</h2> +<ul> +<li>Add diffSCESets function</li> +<li>Update compareSCESets plots</li> +<li>Modify Lun2 nGenes estimate</li> +<li>Modify how addFeatureStats names columns</li> +<li>Add infinte bcv.df warning to splatSimulate</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.11 (2017-03-20)</h2> +<ul> +<li>Add parallel option to lun2Estimate</li> +<li>Allow non-integer library sizes in Lun2Params</li> +<li>Adjust dropout eta value</li> +<li>Adjust comparison plots</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.10 (2017-03-07)</h2> +<ul> +<li>Improve Splat estimation procedure</li> +<li>Update default Splat parameters</li> +<li>Remove out.loProb Splat parameter</li> +<li>Add MeanZeros plot to compareSCESets</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.9 (2017-02-02)</h2> +<ul> +<li>Add addGeneLengths function</li> +<li>Update scDD reference</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.8 (2017-01-23)</h2> +<ul> +<li>Fix bug that meant non-linear path factors weren’t stored in output</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.7 (2017-01-10)</h2> +<ul> +<li>Small changes to avoid NOTEs and reduce check time</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.6 (2016-12-29)</h2> +<ul> +<li>Add installation to vignette</li> +<li>Add detail about counts matrix to vignette</li> +<li>Replace 1:x with seq_len/seq_along</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.5 (2016-12-28)</h2> +<ul> +<li>Set R_TESTS environment</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.4 (2016-12-23)</h2> +<ul> +<li>Version bump to start build</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.3 (2016-12-21)</h2> +<ul> +<li>Fix to match Bioconductor version of scDD</li> +<li>Add logo to repository</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.2 (2016-12-13)</h2> +<ul> +<li>Add rownames, colnames to matrices in splatSimulate, lunSimulate</li> +<li>Bump R version to 3.4</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.99.1 (2016-12-12)</h2> +<ul> +<li>Address Biocondutor build warnings, notes</li> +</ul> +</div> +</div> + <div class="section level1"> +<h1>Version 0.99.0 (2016-12-05)</h1> +<ul> +<li>Submit to Bioconductor</li> +</ul> +<div class="section level2"> +<h2>Version 0.12.1 (2016-11-25)</h2> +<ul> +<li>Fix bug in compareSCESets</li> +<li>Dataset order is now kept in plots</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.12.0 (2016-10-25)</h2> +<ul> +<li>Add compareSCESets function</li> +<li>Update vignette</li> +<li>Fix LunParams validity bug</li> +<li>Add logo</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.11.1 (2016-11-23)</h2> +<ul> +<li>Fix bug in splatSimulatePaths that caused NAs</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.11.0 (2016-11-22)</h2> +<ul> +<li>Make compatible with Bioconductor 3.4</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.10.1 (2016-10-17)</h2> +<ul> +<li>Fix error for SCESets in lun2Estimate, scDDEstimate</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.10.0 (2016-10-16)</h2> +<ul> +<li>Add listSims function</li> +<li>Add vignette</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.9.0 (2016-10-15)</h2> +<ul> +<li>Add scDD simulation</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.8.0 (2016-10-15)</h2> +<ul> +<li>Add Lun2 simulation</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.7.0 (2016-10-14)</h2> +<ul> +<li>Redesign how parameters are stored</li> +<li>Each simulation now has it’s own S4 Params class</li> +<li>Modify exisiting simulations to use new parameter objects</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.6.0 (2016-10-12)</h2> +<ul> +<li>Add Lun simulation</li> +<li>Modify splatParams to take Lun parameters</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.5.0 (2016-10-12)</h2> +<ul> +<li>Add simple simulation</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.4.0 (2016-10-12)</h2> +<ul> +<li>Add splatter simulations</li> +<li>Modify some parts of splatParams and fix bugs</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.3.0 (2016-10-06)</h2> +<ul> +<li>Added parameter estimation functions</li> +</ul> +</div> +<div class="section level2"> +<h2>Version 0.2.0 (2016-10-06)</h2> +<ul> +<li>Added splatParams object</li> +<li>Added functions for interacting with splatParams</li> +</ul> +</div> +</div> </div> </div> @@ -110,6 +459,15 @@ <div id="tocnav"> <h2>Contents</h2> <ul class="nav nav-pills nav-stacked"> + <li><a href="#NA">1.3.3</a></li> + <li><a href="#NA">1.3.2</a></li> + <li><a href="#NA">1.3.1</a></li> + <li><a href="#NA">1.3.0</a></li> + <li><a href="#NA">1.2.2</a></li> + <li><a href="#NA">1.2.1</a></li> + <li><a href="#NA">1.2.0</a></li> + <li><a href="#NA">1.0.0</a></li> + <li><a href="#NA">0.99.0</a></li> </ul> </div> </div> diff --git a/docs/reference/addGeneLengths.html b/docs/reference/addGeneLengths.html index 46c6a380fc153cf5b5350fb18fad08bb14dfb214..bba78ccbc52236f5400dbf43cf9db726d9c316a0 100644 --- a/docs/reference/addGeneLengths.html +++ b/docs/reference/addGeneLengths.html @@ -154,14 +154,14 @@ vector.</p> <pre class="examples"><div class='input'><span class='co'># Default generate method</span> <span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='simpleSimulate.html'>simpleSimulate</a></span>()</div><div class='output co'>#> <span class='message'>Simulating means...</span></div><div class='output co'>#> <span class='message'>Simulating counts...</span></div><div class='output co'>#> <span class='message'>Creating final dataset...</span></div><div class='input'><span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'>addGeneLengths</span>(<span class='no'>sce</span>) <span class='fu'>head</span>(<span class='fu'>rowData</span>(<span class='no'>sce</span>))</div><div class='output co'>#> DataFrame with 6 rows and 3 columns -#> Gene GeneMean Length -#> <factor> <numeric> <numeric> -#> 1 Gene1 2.81785069 5006 -#> 2 Gene2 0.47511411 3987 -#> 3 Gene3 0.05283592 5927 -#> 4 Gene4 1.89846584 3028 -#> 5 Gene5 0.13744696 1926 -#> 6 Gene6 4.97783720 2296</div><div class='input'># Sample method (human coding genes) +#> Gene GeneMean Length +#> <factor> <numeric> <numeric> +#> 1 Gene1 0.276285870265276 2787 +#> 2 Gene2 5.590079589556 3891 +#> 3 Gene3 0.0434982745624651 7065 +#> 4 Gene4 0.0157237897854258 774 +#> 5 Gene5 0.734831944235454 3313 +#> 6 Gene6 0.117382388691264 2806</div><div class='input'># Sample method (human coding genes) </div><span class='co'># NOT RUN {</span> <span class='fu'>library</span>(<span class='no'>TxDb.Hsapiens.UCSC.hg19.knownGene</span>) <span class='fu'>library</span>(<span class='no'>GenomicFeatures</span>) diff --git a/docs/reference/index.html b/docs/reference/index.html index f516a458ee137aa250f55419d0ec1a3aa7f87b49..d15069ebe980af8736752fc652793d11bf73be25 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -100,7 +100,7 @@ <div class="page-header"> <h1> Reference - <small>version 1.3.2</small> + <small>version 1.3.3</small> </h1> </div> diff --git a/docs/reference/lunEstimate.html b/docs/reference/lunEstimate.html index f81c7602ac7a124b334b3345b7dba2b8a5ad2ef3..d32f6aacf0f9104469d80674561d08d32b99cfc9 100644 --- a/docs/reference/lunEstimate.html +++ b/docs/reference/lunEstimate.html @@ -149,7 +149,7 @@ for more details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 490089 +#> 2000 40 578513 #> #> 9 additional parameters #> diff --git a/docs/reference/mfaEstimate.html b/docs/reference/mfaEstimate.html index 9503a6719cd9879afe59f3d212b1bcce17811242..20be7eeae8bd42af0f756896403723e5349a3294 100644 --- a/docs/reference/mfaEstimate.html +++ b/docs/reference/mfaEstimate.html @@ -150,7 +150,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 490089 +#> 2000 40 578513 #> #> 4 additional parameters #> diff --git a/docs/reference/phenoEstimate.html b/docs/reference/phenoEstimate.html index 1fc42da2c3a9152aac8ca4b0bcc0950c15484180..ef5af23fbadc8145125526e906d0883a1b94a09e 100644 --- a/docs/reference/phenoEstimate.html +++ b/docs/reference/phenoEstimate.html @@ -151,7 +151,7 @@ See <code><a href='PhenoParams.html'>PhenoParams</a></code> for more details on #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 490089 +#> 2000 40 578513 #> #> 4 additional parameters #> diff --git a/docs/reference/scDDEstimate.html b/docs/reference/scDDEstimate.html index 19c5dff2c095fbbd71b5471f878ee6df0a3c21b6..4007dc4c03471ba215318a0c58298da5f0a7773b 100644 --- a/docs/reference/scDDEstimate.html +++ b/docs/reference/scDDEstimate.html @@ -177,7 +177,7 @@ simulate. The output is then converted to a SCDDParams object. See <span class='fu'>data</span>(<span class='st'>"sc_example_counts"</span>) <span class='no'>conditions</span> <span class='kw'><-</span> <span class='fu'>sample</span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'>ncol</span>(<span class='no'>sc_example_counts</span>), <span class='kw'>replace</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>scDDEstimate</span>(<span class='no'>sc_example_counts</span>, <span class='no'>conditions</span>) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>scDDEstimate</span>(<span class='no'>sc_example_counts</span>, <span class='kw'>conditions</span> <span class='kw'>=</span> <span class='no'>conditions</span>) <span class='no'>params</span> <span class='co'># }</span></pre> </div> diff --git a/docs/reference/setParam.html b/docs/reference/setParam.html index 750924c6fae8feb7e7cf07f43e3c71eda6e86a17..bf50bcffccbf322475636060cde7a0e7915d5557 100644 --- a/docs/reference/setParam.html +++ b/docs/reference/setParam.html @@ -160,7 +160,7 @@ #> #> Global: #> (GENES) (Cells) [Seed] -#> 100 100 490089 +#> 100 100 578513 #> #> 3 additional parameters #> diff --git a/docs/reference/setParams.html b/docs/reference/setParams.html index 37528b742972794ecc867c737d69e8eeedee0566..1255ffb631c9495c0a22be1ca518e1bbc778ab79 100644 --- a/docs/reference/setParams.html +++ b/docs/reference/setParams.html @@ -146,7 +146,7 @@ them manually), see examples.</p> #> #> Global: #> (Genes) (Cells) [Seed] -#> 10000 100 490089 +#> 10000 100 578513 #> #> 3 additional parameters #> @@ -164,7 +164,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 490089 +#> 1000 50 578513 #> #> 3 additional parameters #> @@ -182,7 +182,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 490089 +#> 1000 50 578513 #> #> 3 additional parameters #> diff --git a/docs/reference/simpleEstimate.html b/docs/reference/simpleEstimate.html index ae8d50ae0a7b89f3ff1ced95b54847d6a0a544d8..edacd6f9a575767ae319c0e83f4c18e424710dd8 100644 --- a/docs/reference/simpleEstimate.html +++ b/docs/reference/simpleEstimate.html @@ -152,7 +152,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 490089 +#> 2000 40 578513 #> #> 3 additional parameters #> diff --git a/docs/reference/splatEstimate.html b/docs/reference/splatEstimate.html index 49dd92360f3b42a2a3774e42c736dfd42e9545be..9fa546e4bb95f1131c0bd08a15a417df51e77ec8 100644 --- a/docs/reference/splatEstimate.html +++ b/docs/reference/splatEstimate.html @@ -152,7 +152,7 @@ containing count data to estimate parameters from.</p></td> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 490089 +#> 2000 40 578513 #> #> 27 additional parameters #> diff --git a/docs/reference/summariseDiff.html b/docs/reference/summariseDiff.html index 5403c36ad58f6c17518612e4bee837c14f4d9deb..bd37d71e3c72ed36d7a5c23307614610bb1396bb 100644 --- a/docs/reference/summariseDiff.html +++ b/docs/reference/summariseDiff.html @@ -128,19 +128,19 @@ Error (RMSE) for the various properties and ranks them.</p> #> <span class='message'>Old names are currently maintained for back-compatibility, but may be removed in future releases.</span></div><div class='output co'>#> <span class='message'>Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics.</span> #> <span class='message'>Old names are currently maintained for back-compatibility, but may be removed in future releases.</span></div><div class='input'><span class='no'>summary</span> <span class='kw'><-</span> <span class='fu'>summariseDiff</span>(<span class='no'>difference</span>) <span class='fu'>head</span>(<span class='no'>summary</span>)</div><div class='output co'>#> Dataset Statistic MAD MADScaled MADRank MAE MAEScaled -#> 1 Splat Mean 3.321288e+00 NaN 1 2.979458e+00 NaN -#> 2 Splat Variance 8.683727e-02 NaN 1 1.405292e-01 NaN -#> 3 Splat ZerosGene 3.500000e+01 NaN 1 4.170500e+01 NaN -#> 4 Splat MeanVar 3.967063e-01 NaN 1 4.645264e-01 NaN -#> 5 Splat MeanZeros 4.500000e+01 NaN 1 4.350500e+01 NaN -#> 6 Splat LibSize 5.777350e+04 NaN 1 5.801215e+04 NaN +#> 1 Splat Mean 2.189448 NaN 1 2.413328 NaN +#> 2 Splat Variance 11.093339 NaN 1 9.715559 NaN +#> 3 Splat ZerosGene 30.000000 NaN 1 36.935000 NaN +#> 4 Splat MeanVar 10.378331 NaN 1 11.562988 NaN +#> 5 Splat MeanZeros 40.000000 NaN 1 41.485000 NaN +#> 6 Splat LibSize 63648.000000 NaN 1 64685.100000 NaN #> MAERank RMSE RMSEScaled RMSERank -#> 1 1 3.344893e+00 NaN 1 -#> 2 1 1.900083e-01 NaN 1 -#> 3 1 4.601331e+01 NaN 1 -#> 4 1 5.744173e-01 NaN 1 -#> 5 1 5.298561e+01 NaN 1 -#> 6 1 5.913981e+04 NaN 1</div></pre> +#> 1 1 2.985198 NaN 1 +#> 2 1 12.342547 NaN 1 +#> 3 1 41.914496 NaN 1 +#> 4 1 14.488452 NaN 1 +#> 5 1 51.422028 NaN 1 +#> 6 1 65468.891494 NaN 1</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2>