diff --git a/NAMESPACE b/NAMESPACE index 68e7c35a004fc8bb4750dc11960375271c33dbec..b598fdb63acf174b7ea7e6db3bd7b8c835306d7c 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -133,6 +133,7 @@ importFrom(locfit,locfit) importFrom(methods,"slot<-") importFrom(methods,as) importFrom(methods,callNextMethod) +importFrom(methods,is) importFrom(methods,new) importFrom(methods,show) importFrom(methods,slot) diff --git a/NEWS.md b/NEWS.md index 45eeeddbe25c1d37a51cee5c453130a28fc32d46..90be82e60dfcd02b302650d967504d46e4089e78 100644 --- a/NEWS.md +++ b/NEWS.md @@ -24,11 +24,11 @@ ### Version 1.9.7.9015 (2019-09-26) -* Add doublets to SplotchSimulate +* Add doublets to splotchSimulate ### Version 1.9.7.9014 (2019-09-24) -* Add ambient expression and empty cells to SplotchSimulate +* Add ambient expression and empty cells to splotchSimulate ### Version 1.9.7.9013 (2019-09-19) @@ -52,7 +52,7 @@ ### Version 1.9.4.9011 (2019-08-29) -* Add BCV adjustment to Splotch simualation +* Add BCV adjustment to Splotch simulation * Use new exponential correction for bcv.common ### Version 1.9.4.9010 (2019-08-22) diff --git a/R/compare.R b/R/compare.R index 6655fe72964c17c21093514ae9d6af6e8f9f1c5d..3243d8894a9063a8e89de186a4f18bafa9e03254 100644 --- a/R/compare.R +++ b/R/compare.R @@ -866,7 +866,7 @@ makeOverallPanel <- function(comp, diff, title = "Overall comparison", return(panel) } -#' Summarise diffSCESs +#' Summarise diffSCEs #' #' Summarise the results of \code{\link{diffSCEs}}. Calculates the Median #' Absolute Deviation (MAD), Mean Absolute Error (MAE), Root Mean Squared @@ -982,7 +982,7 @@ summariseStats <- function(data, split.col, stat.cols, #' Summarise KS #' -#' Summarise columns of a data.frame compared to a referenc using the KS test. +#' Summarise columns of a data.frame compared to a reference using the KS test. #' #' @param data The data.frame to summarise #' @param ref The reference data.frame diff --git a/R/kersplat-estimate.R b/R/kersplat-estimate.R index ab91f593b4f8f2b70926a18a43b314adff8fd22e..2bc5b81715a6edaacecc61c4b8c8509896e7117e 100644 --- a/R/kersplat-estimate.R +++ b/R/kersplat-estimate.R @@ -250,7 +250,7 @@ kersplatEstLib <- function(counts, params, verbose) { #' #' @param data The data to fit #' @param distr Name of the distribution to fit -#' @param weights Optional vector of weigths +#' @param weights Optional vector of weights #' @param verbose logical. Whether to print progress messages #' #' @details diff --git a/R/kersplat-simulate.R b/R/kersplat-simulate.R index 3ac82f8733e72f89a416f4ea92d9b732c5b2be21..1971042405f0faf50145ef5d44abdfaca5ccee01 100644 --- a/R/kersplat-simulate.R +++ b/R/kersplat-simulate.R @@ -289,7 +289,7 @@ kersplatGenNetwork <- function(params, verbose) { #' #' @details #' Regulators are randomly selected, weighted according to the difference -#' between their out degree and in degree. This is an arbitary weighting and +#' between their out degree and in degree. This is an arbitrary weighting and #' may be improved or replace in the future. #' #' @return KersplatParams object with gene regulators @@ -400,7 +400,7 @@ kersplatSimGeneMeans <- function(params, verbose) { #' in the environment (the programs) which are sensed by receptors (regulatory #' genes) and cause changes in expression downstream. For each path a random #' walk is generated for each program and the changes passed on to the -#' regulatory genes. At each step the changes progagate through the network +#' regulatory genes. At each step the changes propagate through the network #' according to the weights on edges between genes. This algorithm is fairly #' simple but should result in correlation relationships between genes. However #' it is likely to be improved and adjusted in the future. @@ -496,10 +496,10 @@ kersplatSimPaths <- function(params, verbose) { #' Simulate Kersplat library sizes #' -#' Generate library sizes for cells in the Kersplat simulatilon +#' Generate library sizes for cells in the Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. -#' @param params SplotParams object with simulation parameters. +#' @param params KersplatParams object with simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -561,17 +561,17 @@ kersplatSimLibSizes <- function(sim, params, verbose) { #' Simulate endogenous counts for each cell in a Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. -#' @param params SplotParams object with simulation parameters. +#' @param params KersplatParams object with simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details #' Cells are first assigned to a path and a step along that path. This is #' controlled by the \code{cells.design} parameter which is a \code{data.frame} #' with the columns "Path", "Probability", "Alpha" and "Beta". The Path field -#' is an ID for each path and the Probabilty field is the probability that a +#' is an ID for each path and the Probability field is the probability that a #' cell will come from that path (must sum to 1). The Alpha and Beta parameters #' control the density of cells along the path. After they are assigned to paths -#' the step for each cell is sampled from a Beta distribution with paramaters +#' the step for each cell is sampled from a Beta distribution with parameters #' shape1 equals Alpha and shape2 equals beta. This approach is very flexible #' and allows almost any distribution of cells along a path. The distribution #' can be viewed using \code{hist(rbeta(10000, Alpha, Beta), breaks = 100)}. @@ -741,7 +741,7 @@ kersplatSimCellMeans <- function(sim, params, verbose) { #' Simulate cell counts for the Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. -#' @param params SplotParams object with simulation parameters. +#' @param params KersplatParams object with simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -774,7 +774,7 @@ kersplatSimCellCounts <- function(sim, params, verbose) { #' Simulate Kersplat ambient counts #' #' @param sim SingleCellExperiment containing simulation. -#' @param params SplotParams object with simulation parameters. +#' @param params KersplatParams object with simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -819,7 +819,7 @@ kersplatSimAmbientCounts <- function(sim, params, verbose) { #' Simulate the final counts matrix for a Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. -#' @param params SplotParams object with simulation parameters. +#' @param params KersplatParams object with simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -894,7 +894,7 @@ getBetaStepProbs <- function(steps, alpha, beta) { #' Sample density #' -#' Sample from a density objet using rejection sampling +#' Sample from a density object using rejection sampling #' #' @param n Number of values to sample #' @param dens Density object to sample from diff --git a/docs/articles/splat_params.html b/docs/articles/splat_params.html index 63a931c1c86e209831306762de4b546df91efe01..de92495615ef07727693823dd6a7dcae375d422a 100644 --- a/docs/articles/splat_params.html +++ b/docs/articles/splat_params.html @@ -198,7 +198,7 @@ <a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co">#> </span></a> <a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co">#> Global: </span></a> <a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co">#> (Genes) (Cells) [Seed] </span></a> -<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co">#> 10000 100 518072 </span></a> +<a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co">#> 10000 100 955861 </span></a> <a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co">#> </span></a> <a class="sourceLine" id="cb2-11" data-line-number="11"><span class="co">#> 28 additional parameters </span></a> <a class="sourceLine" id="cb2-12" data-line-number="12"><span class="co">#> </span></a> diff --git a/docs/articles/splat_params_files/figure-html/batch-factors-1.png b/docs/articles/splat_params_files/figure-html/batch-factors-1.png index 508c0847800d89da547c11ac3b9ea1461635033b..2b68de288c52a725de60a1e7e5ce2e814a928a4e 100644 Binary files a/docs/articles/splat_params_files/figure-html/batch-factors-1.png and b/docs/articles/splat_params_files/figure-html/batch-factors-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/batch-factors-2.png b/docs/articles/splat_params_files/figure-html/batch-factors-2.png index 55574cdde80e7e03d4c84b2f4b76dab07b63140b..ef687bbe1dde681f4e683cb7d3d0c54cb896b9a1 100644 Binary files a/docs/articles/splat_params_files/figure-html/batch-factors-2.png and b/docs/articles/splat_params_files/figure-html/batch-factors-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/batches-1.png b/docs/articles/splat_params_files/figure-html/batches-1.png index 9743b67da9e0ef75718d94aaed8ede5c9e19cf4c..1fd467285baf657faa79657a5fba210601a4190a 100644 Binary files a/docs/articles/splat_params_files/figure-html/batches-1.png and b/docs/articles/splat_params_files/figure-html/batches-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/complex-de-1.png b/docs/articles/splat_params_files/figure-html/complex-de-1.png index 3e108131507e97672c0d9681f97c406b223f94a9..2a4fe3ef2537a84b531994e90a4825e5e8360dfe 100644 Binary files a/docs/articles/splat_params_files/figure-html/complex-de-1.png and b/docs/articles/splat_params_files/figure-html/complex-de-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/complex-de-2.png b/docs/articles/splat_params_files/figure-html/complex-de-2.png index 98b5460d6439af15605f15fed3a2441285966bee..950f97174e6087ba3b68ee3453de0dcf362c7f47 100644 Binary files a/docs/articles/splat_params_files/figure-html/complex-de-2.png and b/docs/articles/splat_params_files/figure-html/complex-de-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/complex-de-3.png b/docs/articles/splat_params_files/figure-html/complex-de-3.png index 4a9116ccfeeb2092e513769d675c93e3f869825a..7829df335afab905c2e4f094e461cc5c3c10480f 100644 Binary files a/docs/articles/splat_params_files/figure-html/complex-de-3.png and b/docs/articles/splat_params_files/figure-html/complex-de-3.png differ diff --git a/docs/articles/splat_params_files/figure-html/de-factors-1.png b/docs/articles/splat_params_files/figure-html/de-factors-1.png index e5ce7635aa6d2aefa35ed6b63224fd7c6ac2baba..7d095a738e94ec635c1f0145cc7b11ac33052dda 100644 Binary files a/docs/articles/splat_params_files/figure-html/de-factors-1.png and b/docs/articles/splat_params_files/figure-html/de-factors-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/de-factors-2.png b/docs/articles/splat_params_files/figure-html/de-factors-2.png index 4052ad846ee2f8408456ce802d69f6630d9fe863..17c9095d3e7b11618a906ef234218e4a1a79c15a 100644 Binary files a/docs/articles/splat_params_files/figure-html/de-factors-2.png and b/docs/articles/splat_params_files/figure-html/de-factors-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/de-prob-1.png b/docs/articles/splat_params_files/figure-html/de-prob-1.png index c209532e024e585142acb098c8c2bb6564e769c9..cad320d0e16d95f3d7f8bedafd6a477eeafdadb9 100644 Binary files a/docs/articles/splat_params_files/figure-html/de-prob-1.png and b/docs/articles/splat_params_files/figure-html/de-prob-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/de-prob-2.png b/docs/articles/splat_params_files/figure-html/de-prob-2.png index 3e970bbfa733075c12f7e768e182275c58195fb7..695b9255602c544d71ca05da75bfce69c96d1d64 100644 Binary files a/docs/articles/splat_params_files/figure-html/de-prob-2.png and b/docs/articles/splat_params_files/figure-html/de-prob-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/groups-1.png b/docs/articles/splat_params_files/figure-html/groups-1.png index f62811063a884291da2612eb5171287ea0ba717b..a9a1d42543b67f46d73381d8d81bb9ec7a620f2a 100644 Binary files a/docs/articles/splat_params_files/figure-html/groups-1.png and b/docs/articles/splat_params_files/figure-html/groups-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/groups-2.png b/docs/articles/splat_params_files/figure-html/groups-2.png index 78cef287c15197c85983515bc708bebbd9aa55a7..34fdb069c796adcf2241ca1842e5323a8b6066d5 100644 Binary files a/docs/articles/splat_params_files/figure-html/groups-2.png and b/docs/articles/splat_params_files/figure-html/groups-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/outlier-prob-1.png b/docs/articles/splat_params_files/figure-html/outlier-prob-1.png index 7dc83af250bf57d94cb8d4d4eb5852644ec24859..69b0defb163c0a0fb16861be87b9d6268122fc19 100644 Binary files a/docs/articles/splat_params_files/figure-html/outlier-prob-1.png and b/docs/articles/splat_params_files/figure-html/outlier-prob-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/outlier-prob-2.png b/docs/articles/splat_params_files/figure-html/outlier-prob-2.png index a9e4eb5ac8596ee63ba444a0a508fb7190d77bc3..4928eea2e2fcac690fbab4b36748b5634a6792e3 100644 Binary files a/docs/articles/splat_params_files/figure-html/outlier-prob-2.png and b/docs/articles/splat_params_files/figure-html/outlier-prob-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/paths-1.png b/docs/articles/splat_params_files/figure-html/paths-1.png index 89a7ed835c085913cea44ce915aa5b8fc7d97f4e..7c73dc68e32e1f4cee8487522b67a7373797a223 100644 Binary files a/docs/articles/splat_params_files/figure-html/paths-1.png and b/docs/articles/splat_params_files/figure-html/paths-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/paths-2.png b/docs/articles/splat_params_files/figure-html/paths-2.png index 5cd4aadb0cd0f8c8533fe5543f670f64880874f3..ca6e4616a0304e2037246dd97a97036e529950f6 100644 Binary files a/docs/articles/splat_params_files/figure-html/paths-2.png and b/docs/articles/splat_params_files/figure-html/paths-2.png differ diff --git a/docs/articles/splat_params_files/figure-html/paths-skew-1.png b/docs/articles/splat_params_files/figure-html/paths-skew-1.png index eece8e646c9e90adb5f97de4ab8e79ca3bf33875..fafb6dbdbcbd8b8a2a27e7361f1529f72f41e773 100644 Binary files a/docs/articles/splat_params_files/figure-html/paths-skew-1.png and b/docs/articles/splat_params_files/figure-html/paths-skew-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/paths-steps-1.png b/docs/articles/splat_params_files/figure-html/paths-steps-1.png index e870e8fb041a0f9ec03f060f65137305b548e912..fe555ac7d30fa917dc52c0de453b40a0b4761553 100644 Binary files a/docs/articles/splat_params_files/figure-html/paths-steps-1.png and b/docs/articles/splat_params_files/figure-html/paths-steps-1.png differ diff --git a/docs/articles/splat_params_files/figure-html/paths-steps-2.png b/docs/articles/splat_params_files/figure-html/paths-steps-2.png index ba15c9378fc035c95f5e216b6bc4bc3ee7913b2e..aba4ab9b21ea639a88da5f54f172df7857b9173b 100644 Binary files a/docs/articles/splat_params_files/figure-html/paths-steps-2.png and b/docs/articles/splat_params_files/figure-html/paths-steps-2.png differ diff --git a/docs/articles/splatter.html b/docs/articles/splatter.html index d2a8ebccb34071fb0eb0938df261a1d4fef1307d..85228f2dc3f4b610ad3d269cd7a95940161eaec2 100644 --- a/docs/articles/splatter.html +++ b/docs/articles/splatter.html @@ -122,7 +122,7 @@ <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 a mock dataset generted with the <code>scater</code> package:</p> +<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 a mock dataset generated with 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"><a href="https://rdrr.io/r/base/library.html">library</a></span>(splatter)</a></code></pre></div> <pre><code>## Loading required package: SingleCellExperiment</code></pre> @@ -230,7 +230,7 @@ ## ## Global: ## (Genes) (Cells) [Seed] -## 10000 100 518072 +## 10000 100 955861 ## ## 28 additional parameters ## @@ -304,7 +304,7 @@ ## ## Global: ## (GENES) (Cells) [Seed] -## 8000 100 518072 +## 8000 100 955861 ## ## 28 additional parameters ## @@ -420,45 +420,45 @@ <div class="sourceCode" id="cb86"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb86-1" data-line-number="1"><span class="co"># Access the counts</span></a> <a class="sourceLine" id="cb86-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 102 12 57 33 102 -## Gene2 33 109 43 5 23 -## Gene3 6 44 15 4 2 -## Gene4 19 16 62 3 29 -## Gene5 3 10 14 19 4</code></pre> +## Gene1 388 184 496 70 977 +## Gene2 115 24 30 62 30 +## Gene3 353 311 356 172 265 +## Gene4 0 0 0 0 0 +## Gene5 66 88 687 488 91</code></pre> <div class="sourceCode" id="cb88"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb88-1" data-line-number="1"><span class="co"># Information about genes</span></a> <a class="sourceLine" id="cb88-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></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> -## Gene1 Gene1 41.0999330107563 1 41.0999330107563 -## Gene2 Gene2 37.2361029998153 1 37.2361029998153 -## Gene3 Gene3 13.600109627926 1 13.600109627926 -## Gene4 Gene4 22.8815122546737 1 22.8815122546737 -## Gene5 Gene5 12.5123576361284 1 12.5123576361284 -## Gene6 Gene6 111.796211912861 1 111.796211912861</code></pre> +## Gene BaseGeneMean OutlierFactor GeneMean +## <factor> <numeric> <numeric> <numeric> +## Gene1 Gene1 182.541749248015 1 182.541749248015 +## Gene2 Gene2 45.4848226172007 1 45.4848226172007 +## Gene3 Gene3 247.661694059157 1 247.661694059157 +## Gene4 Gene4 0.133237587005808 1 0.133237587005808 +## Gene5 Gene5 170.361660833028 1 170.361660833028 +## Gene6 Gene6 281.100703006627 1 281.100703006627</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="co"># Information about cells</span></a> <a class="sourceLine" id="cb90-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></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 350286.032618518 -## Cell2 Cell2 Batch1 350094.837656396 -## Cell3 Cell3 Batch1 355358.860771151 -## Cell4 Cell4 Batch1 342892.196946322 -## Cell5 Cell5 Batch1 338225.807388697 -## Cell6 Cell6 Batch1 358642.15934235</code></pre> +## Cell1 Cell1 Batch1 347367.472875596 +## Cell2 Cell2 Batch1 357315.685032967 +## Cell3 Cell3 Batch1 344451.277578974 +## Cell4 Cell4 Batch1 348810.103710477 +## Cell5 Cell5 Batch1 356933.764212043 +## Cell6 Cell6 Batch1 343192.242624294</code></pre> <div class="sourceCode" id="cb92"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb92-1" data-line-number="1"><span class="co"># Gene by cell matrices</span></a> <a class="sourceLine" id="cb92-2" data-line-number="2"><span class="kw"><a href="https://rdrr.io/r/base/names.html">names</a></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="cb94"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb94-1" data-line-number="1"><span class="co"># Example of cell means matrix</span></a> <a class="sourceLine" id="cb94-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 96.494571 17.36514 55.647502 48.239029 114.144534 -## Gene2 25.088964 112.59364 32.337553 9.860382 28.532718 -## Gene3 10.550270 35.47949 9.248158 4.909377 3.134644 -## Gene4 17.900482 16.36628 62.567243 5.674419 30.102917 -## Gene5 7.072495 11.58369 11.899143 16.200757 5.585551</code></pre> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 390.52352662 198.5368335 530.58433564 8.478547e+01 1006.4132206 +## Gene2 123.88369156 18.7047056 33.40839148 5.484398e+01 28.5096579 +## Gene3 347.21277069 341.6968857 364.20100579 1.501884e+02 254.1098498 +## Gene4 0.02443122 0.0208686 0.01504628 7.542940e-04 0.5873028 +## Gene5 69.56325232 85.8830537 670.02282798 5.116404e+02 89.9774291</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="cb96"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb96-1" data-line-number="1"><span class="co"># Use scater to calculate logcounts</span></a> <a class="sourceLine" id="cb96-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/scater/man/normalize.html">normalize</a></span>(sim)</a></code></pre></div> @@ -652,23 +652,23 @@ <a class="sourceLine" id="cb123-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="cb123-3" data-line-number="3"><span class="kw"><a href="https://rdrr.io/r/utils/head.html">head</a></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> -## Gene1 Gene1 0.181175692302563 2332 -## Gene2 Gene2 0.172252884378792 2855 -## Gene3 Gene3 0.578071696079763 2934 -## Gene4 Gene4 0.0174946993560655 2627 -## Gene5 Gene5 0.00261097707580166 7475 -## Gene6 Gene6 0.0816858565262837 5117</code></pre> +## Gene GeneMean Length +## <factor> <numeric> <numeric> +## Gene1 Gene1 0.0792265397126071 1105 +## Gene2 Gene2 0.0306368911550198 2027 +## Gene3 Gene3 1.75797983978846 5541 +## Gene4 Gene4 0.000969198708564301 2476 +## Gene5 Gene5 0.0554598556966454 2845 +## Gene6 Gene6 2.21278105339233 3607</code></pre> <p>We can then use <code>scater</code> to calculate TPM:</p> <div class="sourceCode" id="cb125"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb125-1" data-line-number="1"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw"><a href="https://rdrr.io/pkg/scater/man/calculateTPM.html">calculateTPM</a></span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length)</a> <a class="sourceLine" id="cb125-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 0.0000 0.00000 0.00000 0 -## Gene2 0 0.0000 0.00000 0.00000 0 -## Gene3 0 53.3583 51.94609 53.28085 0 -## Gene4 0 0.0000 0.00000 0.00000 0 -## Gene5 0 0.0000 0.00000 0.00000 0</code></pre> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 0.00000 0.00000 0.00000 0.00000 0.0000 +## Gene2 0.00000 0.00000 0.00000 0.00000 0.0000 +## Gene3 28.33389 58.08241 28.72608 57.73984 112.7174 +## Gene4 0.00000 0.00000 0.00000 0.00000 0.0000 +## Gene5 0.00000 0.00000 0.00000 0.00000 0.0000</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> </div> <div id="comparing-simulations-and-real-data" class="section level1"> 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 4931ec6ced45474764926ced345964ba3fa6e66a..3921a513f2f0196e5deb78b6f65d39505ede04f6 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 87f3fbad89bbc5d0a2708b3b2043eb6cce25baf2..654ef860d46f27d04c411df69721ceaead88192f 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 e0a347b53af2f2cc26eced3087136e093f6e17a5..47cb468191eb4b4dcd5e651db6a9e8a75e2227f5 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 8c77f858450354da02535aa72b121eba6d14b75d..d8428503c87d873ccdbacf41e1d125c548221d86 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 0fc5d836e463fb8bcd0e271c8d3b0465c7bb59f8..313446c9728fa1ff19a1435ab78db566086fb801 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 e6aeb005e2bdd246f69121c72a313ac3c17500aa..b4fd23ec8e53f1c566930e530fa70f2572b74bf9 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 08f65c0069193c8ac036fae9df6d1eb416f95075..bbd2d385cf991ea0e7d448c6db5dc5063f9788c3 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 6bb31e4468dcaa6f986541b3ef8038eea1a140de..ecf24cf59835725ec9a345298985c0912f4722be 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 a504e705cbeb7a35982b183973cad4ae8c67803e..c30dd42f8399e4e55f4dbebe17678e14eacbcbf1 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/reference/addGeneLengths.html b/docs/reference/addGeneLengths.html index 6a2ae0519c4370f787cc8374fa1beed8f67483a1..149092850384742bebcd9bd16fe2dc34b5436d0b 100644 --- a/docs/reference/addGeneLengths.html +++ b/docs/reference/addGeneLengths.html @@ -191,14 +191,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'><a href='https://rdrr.io/r/utils/head.html'>head</a></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> -#> Gene1 Gene1 0.181175692302563 2332 -#> Gene2 Gene2 0.172252884378792 2855 -#> Gene3 Gene3 0.578071696079763 2934 -#> Gene4 Gene4 0.0174946993560655 2627 -#> Gene5 Gene5 0.00261097707580166 7475 -#> Gene6 Gene6 0.0816858565262837 5117</div><div class='input'><span class='co'># Sample method (human coding genes)</span> +#> Gene GeneMean Length +#> <factor> <numeric> <numeric> +#> Gene1 Gene1 0.0792265397126071 1105 +#> Gene2 Gene2 0.0306368911550198 2027 +#> Gene3 Gene3 1.75797983978846 5541 +#> Gene4 Gene4 0.000969198708564301 2476 +#> Gene5 Gene5 0.0554598556966454 2845 +#> Gene6 Gene6 2.21278105339233 3607</div><div class='input'><span class='co'># Sample method (human coding genes)</span> <span class='kw'>if</span> (<span class='fl'>FALSE</span>) { <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>TxDb.Hsapiens.UCSC.hg19.knownGene</span>) <span class='fu'><a href='https://rdrr.io/r/base/library.html'>library</a></span>(<span class='no'>GenomicFeatures</span>) diff --git a/docs/reference/index.html b/docs/reference/index.html index ccef3e0b35bc0a23ddc587e58963c046731f19c4..f40865b21772d16a71597b7b7b51378704376d18 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -528,7 +528,7 @@ <td> <p><code><a href="summariseDiff.html">summariseDiff()</a></code> </p> </td> - <td><p>Summarise diffSCESs</p></td> + <td><p>Summarise diffSCEs</p></td> </tr> </tbody><tbody> <tr> diff --git a/docs/reference/kersplatEstimate.html b/docs/reference/kersplatEstimate.html index 2e21692fea10ae87eb7588a4b4ac3eb5a6630d4b..6a29eef47861c47109ec911e0bd4e7e3f5e8baef 100644 --- a/docs/reference/kersplatEstimate.html +++ b/docs/reference/kersplatEstimate.html @@ -198,7 +198,7 @@ containing count data to estimate parameters from.</p></td> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 200 518072 +#> 2000 200 955861 #> #> 24 additional parameters #> diff --git a/docs/reference/kersplatSelectRegs.html b/docs/reference/kersplatSelectRegs.html index 4bce0a51004731f71b19ae623fb629d7da53f9fc..7696a43a4a3c2a15ed955903ced9dbb80b3ede98 100644 --- a/docs/reference/kersplatSelectRegs.html +++ b/docs/reference/kersplatSelectRegs.html @@ -165,7 +165,7 @@ <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> <p>Regulators are randomly selected, weighted according to the difference -between their out degree and in degree. This is an arbitary weighting and +between their out degree and in degree. This is an arbitrary weighting and may be improved or replace in the future.</p> </div> diff --git a/docs/reference/kersplatSimAmbientCounts.html b/docs/reference/kersplatSimAmbientCounts.html index ba85bfdafe53fe5703854d133a8a3a036d99c7aa..df8928bbcd97a12735805afc3b7145f3ba41befc 100644 --- a/docs/reference/kersplatSimAmbientCounts.html +++ b/docs/reference/kersplatSimAmbientCounts.html @@ -155,7 +155,7 @@ </tr> <tr> <th>params</th> - <td><p>SplotParams object with simulation parameters.</p></td> + <td><p>KersplatParams object with simulation parameters.</p></td> </tr> <tr> <th>verbose</th> diff --git a/docs/reference/kersplatSimCellCounts.html b/docs/reference/kersplatSimCellCounts.html index 8581fcbc428cab88e05429da69fa4cc127767236..4e08c86bf5ba082d14108784064db51b3cdd5cc2 100644 --- a/docs/reference/kersplatSimCellCounts.html +++ b/docs/reference/kersplatSimCellCounts.html @@ -155,7 +155,7 @@ </tr> <tr> <th>params</th> - <td><p>SplotParams object with simulation parameters.</p></td> + <td><p>KersplatParams object with simulation parameters.</p></td> </tr> <tr> <th>verbose</th> diff --git a/docs/reference/kersplatSimCellMeans.html b/docs/reference/kersplatSimCellMeans.html index e02c5f3268ef9054950c66863b118915ba49e544..8472592b783f3c50be13cbb3c1c4fd58e638e1e4 100644 --- a/docs/reference/kersplatSimCellMeans.html +++ b/docs/reference/kersplatSimCellMeans.html @@ -155,7 +155,7 @@ </tr> <tr> <th>params</th> - <td><p>SplotParams object with simulation parameters.</p></td> + <td><p>KersplatParams object with simulation parameters.</p></td> </tr> <tr> <th>verbose</th> @@ -171,10 +171,10 @@ <p>Cells are first assigned to a path and a step along that path. This is controlled by the <code>cells.design</code> parameter which is a <code>data.frame</code> with the columns "Path", "Probability", "Alpha" and "Beta". The Path field -is an ID for each path and the Probabilty field is the probability that a +is an ID for each path and the Probability field is the probability that a cell will come from that path (must sum to 1). The Alpha and Beta parameters control the density of cells along the path. After they are assigned to paths -the step for each cell is sampled from a Beta distribution with paramaters +the step for each cell is sampled from a Beta distribution with parameters shape1 equals Alpha and shape2 equals beta. This approach is very flexible and allows almost any distribution of cells along a path. The distribution can be viewed using <code><a href='https://rdrr.io/r/graphics/hist.html'>hist(rbeta(10000, Alpha, Beta), breaks = 100)</a></code>. diff --git a/docs/reference/kersplatSimCounts.html b/docs/reference/kersplatSimCounts.html index fa2097e8f6952be6975a737920593596d44a82a8..5c7ad9a679c9ca5b6c13629f2b377c2f94f4f042 100644 --- a/docs/reference/kersplatSimCounts.html +++ b/docs/reference/kersplatSimCounts.html @@ -155,7 +155,7 @@ </tr> <tr> <th>params</th> - <td><p>SplotParams object with simulation parameters.</p></td> + <td><p>KersplatParams object with simulation parameters.</p></td> </tr> <tr> <th>verbose</th> diff --git a/docs/reference/kersplatSimLibSizes.html b/docs/reference/kersplatSimLibSizes.html index 7b9417e00c0cbad46930ee1843602f2b86059b51..2ccf3711d84ddeb98bf75f46e86dae09c2a0cd83 100644 --- a/docs/reference/kersplatSimLibSizes.html +++ b/docs/reference/kersplatSimLibSizes.html @@ -38,7 +38,7 @@ <meta property="og:title" content="Simulate Kersplat library sizes — kersplatSimLibSizes" /> -<meta property="og:description" content="Generate library sizes for cells in the Kersplat simulatilon" /> +<meta property="og:description" content="Generate library sizes for cells in the Kersplat simulation" /> <meta name="twitter:card" content="summary" /> @@ -141,7 +141,7 @@ </div> <div class="ref-description"> - <p>Generate library sizes for cells in the Kersplat simulatilon</p> + <p>Generate library sizes for cells in the Kersplat simulation</p> </div> <pre class="usage"><span class='fu'>kersplatSimLibSizes</span>(<span class='no'>sim</span>, <span class='no'>params</span>, <span class='no'>verbose</span>)</pre> @@ -155,7 +155,7 @@ </tr> <tr> <th>params</th> - <td><p>SplotParams object with simulation parameters.</p></td> + <td><p>KersplatParams object with simulation parameters.</p></td> </tr> <tr> <th>verbose</th> diff --git a/docs/reference/kersplatSimPaths.html b/docs/reference/kersplatSimPaths.html index c5a171bb29a0d4fd38410a2079ba02e5e79c1ba9..66103d52608a6342003d20e37d26206d94d50f32 100644 --- a/docs/reference/kersplatSimPaths.html +++ b/docs/reference/kersplatSimPaths.html @@ -171,7 +171,7 @@ some association with each program. This is analogous to there being changes in the environment (the programs) which are sensed by receptors (regulatory genes) and cause changes in expression downstream. For each path a random walk is generated for each program and the changes passed on to the -regulatory genes. At each step the changes progagate through the network +regulatory genes. At each step the changes propagate through the network according to the weights on edges between genes. This algorithm is fairly simple but should result in correlation relationships between genes. However it is likely to be improved and adjusted in the future.</p> diff --git a/docs/reference/lunEstimate.html b/docs/reference/lunEstimate.html index 81daebe88f4a6c02e5aa62a8ea157ce44692a870..af1332c58340c460150a99da553cf4cb5b9545b2 100644 --- a/docs/reference/lunEstimate.html +++ b/docs/reference/lunEstimate.html @@ -189,7 +189,7 @@ for more details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 200 518072 +#> 2000 200 955861 #> #> 9 additional parameters #> diff --git a/docs/reference/mfaEstimate.html b/docs/reference/mfaEstimate.html index d47608d8dd67854cfa964807c212b9edcc568837..cb1e210d8f4ff5d29c5d36d4ccce36c9cb8bd256 100644 --- a/docs/reference/mfaEstimate.html +++ b/docs/reference/mfaEstimate.html @@ -192,7 +192,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 20 5 518072 +#> 20 5 955861 #> #> 4 additional parameters #> @@ -206,7 +206,7 @@ details on the parameters.</p> #> #> Dropout: #> [Present] (LAMBDA) -#> FALSE 0.311376024605253 +#> FALSE 0.264691247771788 #> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> diff --git a/docs/reference/phenoEstimate.html b/docs/reference/phenoEstimate.html index c9ea695f5818ceefd7f3942b7fe4754e11ebeab0..c9b2b839d20eaf118bbb8c95623df43c498a3e13 100644 --- a/docs/reference/phenoEstimate.html +++ b/docs/reference/phenoEstimate.html @@ -193,7 +193,7 @@ See <code><a href='PhenoParams.html'>PhenoParams</a></code> for more details on #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 200 518072 +#> 2000 200 955861 #> #> 4 additional parameters #> diff --git a/docs/reference/sampleDensity.html b/docs/reference/sampleDensity.html index 27130da59a6602d5f2c785a2fda043d1572c2403..a6fdbc2c33b13ab4c7061d42b6ecc11cfde93517 100644 --- a/docs/reference/sampleDensity.html +++ b/docs/reference/sampleDensity.html @@ -38,7 +38,7 @@ <meta property="og:title" content="Sample density — sampleDensity" /> -<meta property="og:description" content="Sample from a density objet using rejection sampling" /> +<meta property="og:description" content="Sample from a density object using rejection sampling" /> <meta name="twitter:card" content="summary" /> @@ -141,7 +141,7 @@ </div> <div class="ref-description"> - <p>Sample from a density objet using rejection sampling</p> + <p>Sample from a density object using rejection sampling</p> </div> <pre class="usage"><span class='fu'>sampleDensity</span>(<span class='no'>n</span>, <span class='no'>dens</span>, <span class='kw'>lower</span> <span class='kw'>=</span> <span class='fl'>0</span>)</pre> diff --git a/docs/reference/scDDEstimate.html b/docs/reference/scDDEstimate.html index 9fa04dd7f700fc4d8339eba1cb53c30a6bc40d0b..f7939e3dc74e0ce1ab1d242f8a449da795737f7d 100644 --- a/docs/reference/scDDEstimate.html +++ b/docs/reference/scDDEstimate.html @@ -225,7 +225,7 @@ simulate. The output is then converted to a SCDDParams object. See #> #> Global: #> (GENES) (CELLS) [Seed] -#> 100 10 518072 +#> 100 10 955861 #> #> 11 additional parameters #> diff --git a/docs/reference/selectFit.html b/docs/reference/selectFit.html index 3a8e2c6e698798d9d514b4921a9b378951317033..ce93fd9ed2d78978d30713879165216e27065f39 100644 --- a/docs/reference/selectFit.html +++ b/docs/reference/selectFit.html @@ -159,7 +159,7 @@ </tr> <tr> <th>weights</th> - <td><p>Optional vector of weigths</p></td> + <td><p>Optional vector of weights</p></td> </tr> <tr> <th>verbose</th> diff --git a/docs/reference/setParam.html b/docs/reference/setParam.html index b67fe85f1283ecb8b231c6be00da12eb263a6e83..8d3283b24e3265b0ffd2de2311c3d24fe51f20b0 100644 --- a/docs/reference/setParam.html +++ b/docs/reference/setParam.html @@ -202,7 +202,7 @@ #> #> Global: #> (GENES) (Cells) [Seed] -#> 100 100 518072 +#> 100 100 955861 #> #> 3 additional parameters #> diff --git a/docs/reference/setParams.html b/docs/reference/setParams.html index 56e856ab0adfef6c4be6c52a79fda4c9a673e304..343a2428a7465ddcc16ff0f494ab753e382b4a7e 100644 --- a/docs/reference/setParams.html +++ b/docs/reference/setParams.html @@ -193,7 +193,7 @@ them manually), see examples.</p> #> #> Global: #> (Genes) (Cells) [Seed] -#> 10000 100 518072 +#> 10000 100 955861 #> #> 3 additional parameters #> @@ -212,7 +212,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 518072 +#> 1000 50 955861 #> #> 3 additional parameters #> @@ -231,7 +231,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 518072 +#> 1000 50 955861 #> #> 3 additional parameters #> diff --git a/docs/reference/simpleEstimate.html b/docs/reference/simpleEstimate.html index fcb85885a2a0dbf3f4890ee98897ca4bcf40e476..ea36ff15c0b56b6b74490ad6004ad0f197d413b7 100644 --- a/docs/reference/simpleEstimate.html +++ b/docs/reference/simpleEstimate.html @@ -191,7 +191,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 200 518072 +#> 2000 200 955861 #> #> 3 additional parameters #> diff --git a/docs/reference/sparseDCEstimate.html b/docs/reference/sparseDCEstimate.html index 05ffc5512067298add5ff48b9abb428dd593611b..3da07e87ab34a681a5e3cc2082127834c6fb53f6 100644 --- a/docs/reference/sparseDCEstimate.html +++ b/docs/reference/sparseDCEstimate.html @@ -214,7 +214,7 @@ input data. The counts are preprocessed using #> #> Global: #> (GENES) (CELLS) [Seed] -#> 100 10 518072 +#> 100 10 955861 #> #> 7 additional parameters #> diff --git a/docs/reference/splatEstimate.html b/docs/reference/splatEstimate.html index a484aa3195d9b505f24d726b7d6ae751c2222eac..3fab8c36e9ed966d43cb3bc78327ff0008ec1961 100644 --- a/docs/reference/splatEstimate.html +++ b/docs/reference/splatEstimate.html @@ -192,7 +192,7 @@ containing count data to estimate parameters from.</p></td> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 200 518072 +#> 2000 200 955861 #> #> 28 additional parameters #> diff --git a/docs/reference/summariseDiff.html b/docs/reference/summariseDiff.html index cc1719c8df79d9a4997feac01d6b8ebd05403ea9..841f0d7628b386b25342c5c833e77deaa3a0511a 100644 --- a/docs/reference/summariseDiff.html +++ b/docs/reference/summariseDiff.html @@ -6,7 +6,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> -<title>Summarise diffSCESs — summariseDiff • Splatter</title> +<title>Summarise diffSCEs — summariseDiff • Splatter</title> <!-- jquery --> @@ -37,7 +37,7 @@ <link href="../extra.css" rel="stylesheet"> -<meta property="og:title" content="Summarise diffSCESs — summariseDiff" /> +<meta property="og:title" content="Summarise diffSCEs — summariseDiff" /> <meta property="og:description" content="Summarise the results of diffSCEs. Calculates the Median Absolute Deviation (MAD), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE) and Kolmogorov-Smirnov (KS) statistics for the various @@ -138,7 +138,7 @@ properties and ranks them." /> <div class="row"> <div class="col-md-9 contents"> <div class="page-header"> - <h1>Summarise diffSCESs</h1> + <h1>Summarise diffSCEs</h1> <small class="dont-index">Source: <a href='https://github.com/Oshlack/splatter/blob/master/R/compare.R'><code>R/compare.R</code></a></small> <div class="hidden name"><code>summariseDiff.Rd</code></div> </div> @@ -169,19 +169,19 @@ properties and ranks them.</p> <pre class="examples"><div class='input'><span class='no'>sim1</span> <span class='kw'><-</span> <span class='fu'><a href='splatSimulate.html'>splatSimulate</a></span>(<span class='kw'>nGenes</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>batchCells</span> <span class='kw'>=</span> <span class='fl'>20</span>)</div><div class='output co'>#> <span class='message'>Getting parameters...</span></div><div class='output co'>#> <span class='message'>Creating simulation object...</span></div><div class='output co'>#> <span class='message'>Simulating library sizes...</span></div><div class='output co'>#> <span class='message'>Simulating gene means...</span></div><div class='output co'>#> <span class='message'>Simulating BCV...</span></div><div class='output co'>#> <span class='message'>Simulating counts...</span></div><div class='output co'>#> <span class='message'>Simulating dropout (if needed)...</span></div><div class='output co'>#> <span class='message'>Done!</span></div><div class='input'><span class='no'>sim2</span> <span class='kw'><-</span> <span class='fu'><a href='simpleSimulate.html'>simpleSimulate</a></span>(<span class='kw'>nGenes</span> <span class='kw'>=</span> <span class='fl'>1000</span>, <span class='kw'>nCells</span> <span class='kw'>=</span> <span class='fl'>20</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'>difference</span> <span class='kw'><-</span> <span class='fu'><a href='diffSCEs.html'>diffSCEs</a></span>(<span class='fu'><a href='https://rdrr.io/r/base/list.html'>list</a></span>(<span class='kw'>Splat</span> <span class='kw'>=</span> <span class='no'>sim1</span>, <span class='kw'>Simple</span> <span class='kw'>=</span> <span class='no'>sim2</span>), <span class='kw'>ref</span> <span class='kw'>=</span> <span class='st'>"Simple"</span>) <span class='no'>summary</span> <span class='kw'><-</span> <span class='fu'>summariseDiff</span>(<span class='no'>difference</span>) <span class='fu'><a href='https://rdrr.io/r/utils/head.html'>head</a></span>(<span class='no'>summary</span>)</div><div class='output co'>#> Dataset Statistic MAD MADScaled MADRank MAE MAEScaled -#> 1 Splat Mean 2.683019 NaN 1 2.602391 NaN -#> 2 Splat Variance 11.623294 NaN 1 10.219845 NaN -#> 3 Splat ZerosGene 35.000000 NaN 1 41.350000 NaN -#> 4 Splat MeanVar 11.015375 NaN 1 12.074327 NaN -#> 5 Splat MeanZeros 45.000000 NaN 1 43.120000 NaN -#> 6 Splat LibSize 54405.500000 NaN 1 56675.650000 NaN +#> 1 Splat Mean 2.599964 NaN 1 2.584928 NaN +#> 2 Splat Variance 11.322961 NaN 1 10.470554 NaN +#> 3 Splat ZerosGene 40.000000 NaN 1 44.310000 NaN +#> 4 Splat MeanVar 11.115835 NaN 1 12.455595 NaN +#> 5 Splat MeanZeros 45.000000 NaN 1 43.525000 NaN +#> 6 Splat LibSize 57856.500000 NaN 1 59396.950000 NaN #> MAERank RMSE RMSEScaled RMSERank KS KSPVal KSRank -#> 1 1 3.167801 NaN 1 0.356 0.000000e+00 1 -#> 2 1 12.837182 NaN 1 0.575 0.000000e+00 1 -#> 3 1 45.394383 NaN 1 0.585 0.000000e+00 1 -#> 4 1 15.043488 NaN 1 NA NA NA -#> 5 1 52.669251 NaN 1 NA NA NA -#> 6 1 57288.345338 NaN 1 1.000 4.122307e-09 1</div></pre> +#> 1 1 3.128422 NaN 1 0.361 0.000000e+00 1 +#> 2 1 13.481762 NaN 1 0.557 0.000000e+00 1 +#> 3 1 48.107692 NaN 1 0.574 0.000000e+00 1 +#> 4 1 15.692918 NaN 1 NA NA NA +#> 5 1 53.139674 NaN 1 NA NA NA +#> 6 1 60130.247902 NaN 1 1.000 1.450928e-11 1</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/summariseKS.html b/docs/reference/summariseKS.html index 9b6a1582671a40a9d562bf5532c3f83e4bbffae3..9aab82fc877b85f2e9f51f24feb9d2cd07efdfd0 100644 --- a/docs/reference/summariseKS.html +++ b/docs/reference/summariseKS.html @@ -38,7 +38,7 @@ <meta property="og:title" content="Summarise KS — summariseKS" /> -<meta property="og:description" content="Summarise columns of a data.frame compared to a referenc using the KS test." /> +<meta property="og:description" content="Summarise columns of a data.frame compared to a reference using the KS test." /> <meta name="twitter:card" content="summary" /> @@ -141,7 +141,7 @@ </div> <div class="ref-description"> - <p>Summarise columns of a data.frame compared to a referenc using the KS test.</p> + <p>Summarise columns of a data.frame compared to a reference using the KS test.</p> </div> <pre class="usage"><span class='fu'>summariseKS</span>(<span class='no'>data</span>, <span class='no'>ref</span>, <span class='no'>split.col</span>, <span class='no'>stat.cols</span>)</pre> diff --git a/docs/reference/zinbEstimate.html b/docs/reference/zinbEstimate.html index 5ff03920005ac7fdb0a95f6d2785a344074482e9..8eaa6e888d68e98215cc88634c2b8ce2e0d2cf1d 100644 --- a/docs/reference/zinbEstimate.html +++ b/docs/reference/zinbEstimate.html @@ -236,18 +236,18 @@ the fitted model and inserts it into a <code><a href='ZINBParams.html'>ZINBParam <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>zinbEstimate</span>(<span class='no'>sce</span>) <span class='no'>params</span> }</div><div class='output co'>#> <span class='message'>Removing all zero genes...</span></div><div class='output co'>#> <span class='message'>Fitting model...</span></div><div class='output co'>#> <span class='message'>Create model:</span></div><div class='output co'>#> <span class='message'>ok</span></div><div class='output co'>#> <span class='message'>Initialize parameters:</span></div><div class='output co'>#> <span class='message'>ok</span></div><div class='output co'>#> <span class='message'>Optimize parameters:</span></div><div class='output co'>#> <span class='message'>Iteration 1</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9797.17396398215</span></div><div class='output co'>#> <span class='message'>After dispersion optimization = -9593.51924068794</span></div><div class='output co'>#> user system elapsed -#> 0.266 0.009 0.276 </div><div class='output co'>#> <span class='message'>After right optimization = -9289.80824341391</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9289.80824341391</span></div><div class='output co'>#> user system elapsed -#> 0.047 0.002 0.050 </div><div class='output co'>#> <span class='message'>After left optimization = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>Iteration 2</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>After dispersion optimization = -9235.11865883047</span></div><div class='output co'>#> user system elapsed -#> 0.191 0.003 0.197 </div><div class='output co'>#> <span class='message'>After right optimization = -9229.79015780275</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9229.79015780275</span></div><div class='output co'>#> user system elapsed -#> 0.070 0.007 0.077 </div><div class='output co'>#> <span class='message'>After left optimization = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>Iteration 3</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>After dispersion optimization = -9228.6543711739</span></div><div class='output co'>#> user system elapsed -#> 0.182 0.004 0.188 </div><div class='output co'>#> <span class='message'>After right optimization = -9228.44378457059</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9228.44378457059</span></div><div class='output co'>#> user system elapsed -#> 0.055 0.002 0.058 </div><div class='output co'>#> <span class='message'>After left optimization = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>Iteration 4</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>ok</span></div><div class='output co'>#> A Params object of class ZINBParams +#> 0.279 0.008 0.292 </div><div class='output co'>#> <span class='message'>After right optimization = -9289.80824341391</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9289.80824341391</span></div><div class='output co'>#> user system elapsed +#> 0.045 0.003 0.048 </div><div class='output co'>#> <span class='message'>After left optimization = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>Iteration 2</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9285.37100307917</span></div><div class='output co'>#> <span class='message'>After dispersion optimization = -9235.11865883047</span></div><div class='output co'>#> user system elapsed +#> 0.206 0.005 0.216 </div><div class='output co'>#> <span class='message'>After right optimization = -9229.79015780275</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9229.79015780275</span></div><div class='output co'>#> user system elapsed +#> 0.068 0.006 0.075 </div><div class='output co'>#> <span class='message'>After left optimization = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>Iteration 3</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9229.25013725032</span></div><div class='output co'>#> <span class='message'>After dispersion optimization = -9228.6543711739</span></div><div class='output co'>#> user system elapsed +#> 0.192 0.005 0.203 </div><div class='output co'>#> <span class='message'>After right optimization = -9228.44378457059</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9228.44378457059</span></div><div class='output co'>#> user system elapsed +#> 0.041 0.002 0.043 </div><div class='output co'>#> <span class='message'>After left optimization = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>After orthogonalization = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>Iteration 4</span></div><div class='output co'>#> <span class='message'>penalized log-likelihood = -9228.40710924322</span></div><div class='output co'>#> <span class='message'>ok</span></div><div class='output co'>#> A Params object of class ZINBParams #> Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' #> Secondary parameters are usually set during simulation #> #> Global: #> (Genes) (CELLS) [Seed] -#> 100 20 518072 +#> 100 20 955861 #> #> 1 additional parameters #> diff --git a/inst/WORDLIST b/inst/WORDLIST index c90a07c1acb75ab19822628bbea9cae3d6674a17..8c3439ae0093d36e1e09b40f8269d19a600e84af 100644 --- a/inst/WORDLIST +++ b/inst/WORDLIST @@ -5,6 +5,7 @@ AppVeyor BASiCS BASiCSEstimate BASiCSParams +BASiCSSimulate bcv BCV Bioc @@ -13,12 +14,13 @@ biocViews bioRxiv BPPARAM Chu +compareSCEs compareSCESets cpm cutoff df +diffSCEs diffSCESets -diffSCESs DM doi DP @@ -28,6 +30,7 @@ eg etc fpkm FPKM +gam getLNormFactors Github Gribkova @@ -35,6 +38,8 @@ ImmunoOncology ingroup JC KD +Kersplat +KersplatParams Korthauer KR len @@ -54,25 +59,30 @@ mfa MFA MFAParams mfaSimulate +mockSCE modeling nGenes nGroups NOTEs params Params +Parra Perraudeau PhenoParams PhenoPath PLoS poisson Poisson +PROSSTT pseudotime Quickstart +RG Risso RMSEs Roxygen RStudio RStudio's +sc scater scDD SCDD @@ -81,13 +91,16 @@ SCDDParams scDDSimulate SCE SCESets +scRNA sd sdlog +selectFit seq SimpleParams SingleCellExperiment SingleCellExperiments SNE +Söding SparseDC sparseDCEstimate SparseDCParams @@ -99,6 +112,9 @@ SplatParams splatSimulate splatSimulatePaths Splatter's +splotchEstimate +SplotchParams +splotchSimulate summariseDiff SummarizedExperiment th diff --git a/man/kersplatSelectRegs.Rd b/man/kersplatSelectRegs.Rd index b9a75e82180d6e31114a3efa51315f4b11ff0edb..ef727ae8a6f35a1ed75a26a7bf7f2aded3d04046 100644 --- a/man/kersplatSelectRegs.Rd +++ b/man/kersplatSelectRegs.Rd @@ -19,6 +19,6 @@ Select regulator genes in the gene network for a Kersplat simulation } \details{ Regulators are randomly selected, weighted according to the difference -between their out degree and in degree. This is an arbitary weighting and +between their out degree and in degree. This is an arbitrary weighting and may be improved or replace in the future. } diff --git a/man/kersplatSimAmbientCounts.Rd b/man/kersplatSimAmbientCounts.Rd index b056d7919adf105bbab0dd1a3299e48a3536166c..596501adf54e1f02a0c48c11858c1c7bc805e4cf 100644 --- a/man/kersplatSimAmbientCounts.Rd +++ b/man/kersplatSimAmbientCounts.Rd @@ -9,7 +9,7 @@ kersplatSimAmbientCounts(sim, params, verbose) \arguments{ \item{sim}{SingleCellExperiment containing simulation.} -\item{params}{SplotParams object with simulation parameters.} +\item{params}{KersplatParams object with simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } diff --git a/man/kersplatSimCellCounts.Rd b/man/kersplatSimCellCounts.Rd index fdc80b359e572561cf07ba0e6f79c3c4e60ee9a8..900468d717232ca892dfd697ab0360e2e0bd64d7 100644 --- a/man/kersplatSimCellCounts.Rd +++ b/man/kersplatSimCellCounts.Rd @@ -9,7 +9,7 @@ kersplatSimCellCounts(sim, params, verbose) \arguments{ \item{sim}{SingleCellExperiment containing simulation.} -\item{params}{SplotParams object with simulation parameters.} +\item{params}{KersplatParams object with simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } diff --git a/man/kersplatSimCellMeans.Rd b/man/kersplatSimCellMeans.Rd index a7e1bb273d071fbb7b229c1537d8d8221c70eb6c..dfceec9d5057d94f3d2f825a533db818ce28b377 100644 --- a/man/kersplatSimCellMeans.Rd +++ b/man/kersplatSimCellMeans.Rd @@ -9,7 +9,7 @@ kersplatSimCellMeans(sim, params, verbose) \arguments{ \item{sim}{SingleCellExperiment containing simulation.} -\item{params}{SplotParams object with simulation parameters.} +\item{params}{KersplatParams object with simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } @@ -23,10 +23,10 @@ Simulate endogenous counts for each cell in a Kersplat simulation Cells are first assigned to a path and a step along that path. This is controlled by the \code{cells.design} parameter which is a \code{data.frame} with the columns "Path", "Probability", "Alpha" and "Beta". The Path field -is an ID for each path and the Probabilty field is the probability that a +is an ID for each path and the Probability field is the probability that a cell will come from that path (must sum to 1). The Alpha and Beta parameters control the density of cells along the path. After they are assigned to paths -the step for each cell is sampled from a Beta distribution with paramaters +the step for each cell is sampled from a Beta distribution with parameters shape1 equals Alpha and shape2 equals beta. This approach is very flexible and allows almost any distribution of cells along a path. The distribution can be viewed using \code{hist(rbeta(10000, Alpha, Beta), breaks = 100)}. diff --git a/man/kersplatSimCounts.Rd b/man/kersplatSimCounts.Rd index 39efa92ed27c49c72174a153b9bfd4fcea701c3a..024e7ef38870e8cbf051fd3a7758eaf73369396d 100644 --- a/man/kersplatSimCounts.Rd +++ b/man/kersplatSimCounts.Rd @@ -9,7 +9,7 @@ kersplatSimCounts(sim, params, verbose) \arguments{ \item{sim}{SingleCellExperiment containing simulation.} -\item{params}{SplotParams object with simulation parameters.} +\item{params}{KersplatParams object with simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } diff --git a/man/kersplatSimLibSizes.Rd b/man/kersplatSimLibSizes.Rd index e62fd54256ea75dc130a53e24c2af527b28430dd..81eedf732939e30ac949388fc75c71566e84ffd3 100644 --- a/man/kersplatSimLibSizes.Rd +++ b/man/kersplatSimLibSizes.Rd @@ -9,7 +9,7 @@ kersplatSimLibSizes(sim, params, verbose) \arguments{ \item{sim}{SingleCellExperiment containing simulation.} -\item{params}{SplotParams object with simulation parameters.} +\item{params}{KersplatParams object with simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } @@ -17,7 +17,7 @@ kersplatSimLibSizes(sim, params, verbose) SingleCellExperiment with library sizes } \description{ -Generate library sizes for cells in the Kersplat simulatilon +Generate library sizes for cells in the Kersplat simulation } \details{ Library sizes are simulated in one of two ways depending on the value of the diff --git a/man/kersplatSimPaths.Rd b/man/kersplatSimPaths.Rd index 251c5c69a473a042800faef3df7aea9bd0328aca..af07653c321446c4337402b8611ed775466a8112 100644 --- a/man/kersplatSimPaths.Rd +++ b/man/kersplatSimPaths.Rd @@ -25,7 +25,7 @@ some association with each program. This is analogous to there being changes in the environment (the programs) which are sensed by receptors (regulatory genes) and cause changes in expression downstream. For each path a random walk is generated for each program and the changes passed on to the -regulatory genes. At each step the changes progagate through the network +regulatory genes. At each step the changes propagate through the network according to the weights on edges between genes. This algorithm is fairly simple but should result in correlation relationships between genes. However it is likely to be improved and adjusted in the future. diff --git a/man/sampleDensity.Rd b/man/sampleDensity.Rd index e8e7779674a02441432888a9d0cd437129c7cfa0..2efc5d7ebe6dea4615fd11185ace13a6e99225e5 100644 --- a/man/sampleDensity.Rd +++ b/man/sampleDensity.Rd @@ -17,7 +17,7 @@ sampleDensity(n, dens, lower = 0) Vector of sampled values } \description{ -Sample from a density objet using rejection sampling +Sample from a density object using rejection sampling } \details{ Random points (x and y) are generated inside the range of the density object. diff --git a/man/selectFit.Rd b/man/selectFit.Rd index 9bc87da92afac164b6885329d25048c3a07429df..20540c479c2a669acbb500ba41a11902091890f8 100644 --- a/man/selectFit.Rd +++ b/man/selectFit.Rd @@ -11,7 +11,7 @@ selectFit(data, distr, weights = NULL, verbose = TRUE) \item{distr}{Name of the distribution to fit} -\item{weights}{Optional vector of weigths} +\item{weights}{Optional vector of weights} \item{verbose}{logical. Whether to print progress messages} } diff --git a/man/summariseDiff.Rd b/man/summariseDiff.Rd index bcc11be13f32a63ec5ae38701145ea381afec393..fc13108955e63f56eaf8a848a1ba9067ab3138cb 100644 --- a/man/summariseDiff.Rd +++ b/man/summariseDiff.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/compare.R \name{summariseDiff} \alias{summariseDiff} -\title{Summarise diffSCESs} +\title{Summarise diffSCEs} \usage{ summariseDiff(diff) } diff --git a/man/summariseKS.Rd b/man/summariseKS.Rd index f424f42aede6f35c03ea24e6bbcbb52873f50518..7e8f43a1ac47e5247bb2dedc11f6a9911ecee419 100644 --- a/man/summariseKS.Rd +++ b/man/summariseKS.Rd @@ -20,5 +20,5 @@ those names will be used in the output.} data.frame with the summarised measure, scaled and ranked } \description{ -Summarise columns of a data.frame compared to a referenc using the KS test. +Summarise columns of a data.frame compared to a reference using the KS test. } diff --git a/vignettes/splatter.Rmd b/vignettes/splatter.Rmd index 44255b4be91fd927777156da55980da210045a24..8bb64af30582846ec389c7dd34195d3a7a69b371 100644 --- a/vignettes/splatter.Rmd +++ b/vignettes/splatter.Rmd @@ -45,7 +45,7 @@ BiocManager::install("Oshlack/splatter", dependencies = TRUE, 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 a mock dataset generted with the `scater` package: +Splatter. Here is an example a mock dataset generated with the `scater` package: ```{r quickstart} # Load package