diff --git a/DESCRIPTION b/DESCRIPTION index 68a958e1298e8906a3c0f8da5ee1c9ef9eaa5e20..37176877b37d73708279f5ad00866223e512572d 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: splatter Type: Package Title: Simple Simulation of Single-cell RNA Sequencing Data -Version: 1.1.5 -Date: 2017-09-13 +Version: 1.1.6 +Date: 2017-10-02 Author: Luke Zappia Authors@R: c(person("Luke", "Zappia", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 14f74259dae2dd0f534002fbff235bf363003665..cef16188426f0dbc0e04c451e242d5358ef872d7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +## Version 1.1.6 (2017-10-02) + +* Update scDD version +* Add mfa simulation + ## Version 1.1.5 (2017-09-13) * Convert to SingleCellExperiment diff --git a/docs/articles/index.html b/docs/articles/index.html index b9833997e39a259790b9ca84af74b9e34a920eb2..35e1b8d093308f4710b79893b79f3cd3c30aa4c5 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.1.5</small></h1> + <h1>Articles <small>version 1.1.6</small></h1> </div> <div class="row"> diff --git a/docs/articles/splatter.html b/docs/articles/splatter.html index a2ba076e3dde0657e8e82841529e0f05ec4d2d45..fa8212094a6c15b5dbaa1e53cd87c3d1eacaf790 100644 --- a/docs/articles/splatter.html +++ b/docs/articles/splatter.html @@ -76,7 +76,7 @@ <h1>Introduction to Splatter</h1> <h4 class="author">Luke Zappia</h4> - <h4 class="date">2017-09-13</h4> + <h4 class="date">2017-10-02</h4> </div> @@ -317,7 +317,7 @@ params</code></pre></div> ## ## Global: ## (Genes) (Cells) [Seed] -## 10000 100 918851 +## 10000 100 395011 ## ## 27 additional parameters ## @@ -390,7 +390,7 @@ params</code></pre></div> ## ## Global: ## (GENES) (Cells) [Seed] -## 8000 100 918851 +## 8000 100 395011 ## ## 27 additional parameters ## @@ -501,45 +501,45 @@ sc_example_counts[<span class="dv">1</span><span class="op">:</span><span class= <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Access the counts</span> <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>]</code></pre></div> <pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 94 0 0 0 102 -## Gene2 0 80 0 28 7 -## Gene3 0 1 321 4 0 -## Gene4 0 1 375 0 0 -## Gene5 0 0 42 1 0</code></pre> +## Gene1 0 402 19 311 0 +## Gene2 0 12 25 252 0 +## Gene3 0 0 0 3 0 +## Gene4 0 0 0 14 3 +## Gene5 0 95 0 7 0</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Information about genes</span> <span class="kw">head</span>(<span class="kw">rowData</span>(sim))</code></pre></div> <pre><code>## DataFrame with 6 rows and 4 columns -## Gene BaseGeneMean OutlierFactor GeneMean -## <factor> <numeric> <numeric> <numeric> -## 1 Gene1 20.190793 1 20.190793 -## 2 Gene2 315.498092 1 315.498092 -## 3 Gene3 40.235698 1 40.235698 -## 4 Gene4 3.595814 1 3.595814 -## 5 Gene5 1.504027 1 1.504027 -## 6 Gene6 41.998472 1 41.998472</code></pre> +## Gene BaseGeneMean OutlierFactor GeneMean +## <factor> <numeric> <numeric> <numeric> +## 1 Gene1 210.1089973 1 210.1089973 +## 2 Gene2 45.3776510 1 45.3776510 +## 3 Gene3 0.6516767 1 0.6516767 +## 4 Gene4 74.2508364 1 74.2508364 +## 5 Gene5 13.9862181 1 13.9862181 +## 6 Gene6 6.9628144 1 6.9628144</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Information about cells</span> <span class="kw">head</span>(<span class="kw">colData</span>(sim))</code></pre></div> <pre><code>## DataFrame with 6 rows and 3 columns ## Cell Batch ExpLibSize ## <factor> <character> <numeric> -## Cell1 Cell1 Batch1 285352.9 -## Cell2 Cell2 Batch1 237166.0 -## Cell3 Cell3 Batch1 133623.1 -## Cell4 Cell4 Batch1 278033.4 -## Cell5 Cell5 Batch1 272639.2 -## Cell6 Cell6 Batch1 302447.6</code></pre> +## Cell1 Cell1 Batch1 1187108.5 +## Cell2 Cell2 Batch1 600191.4 +## Cell3 Cell3 Batch1 688730.7 +## Cell4 Cell4 Batch1 256123.3 +## Cell5 Cell5 Batch1 278401.4 +## Cell6 Cell6 Batch1 385774.4</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Gene by cell matrices</span> <span class="kw">names</span>(<span class="kw">assays</span>(sim))</code></pre></div> <pre><code>## [1] "BatchCellMeans" "BaseCellMeans" "BCV" "CellMeans" ## [5] "TrueCounts" "counts"</code></pre> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="co"># Example of cell means matrix</span> <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>]</code></pre></div> -<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 1.002071e+02 6.778755e-01 7.599324e-08 1.081554e-02 8.680064e+01 -## Gene2 2.358624e-03 8.386664e+01 6.321106e-02 2.583823e+01 8.731474e+00 -## Gene3 1.987226e-03 2.589992e-02 3.039511e+02 3.982977e+00 1.096817e-13 -## Gene4 1.173995e-08 2.266400e-01 3.745064e+02 2.686863e-32 1.253940e-01 -## Gene5 2.008658e-06 8.487400e-30 4.619085e+01 9.285997e-02 1.383831e-13</code></pre> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 8.281664e-05 4.086520e+02 1.480335e+01 306.253250 1.453613e-02 +## Gene2 2.394664e-13 1.278677e+01 2.171332e+01 278.515526 3.609326e-11 +## Gene3 7.817149e-21 5.174676e-13 3.583580e-01 2.217521 9.095013e-52 +## Gene4 1.737589e-08 4.257554e-11 1.005446e-07 16.146507 3.822216e+00 +## Gene5 2.822351e-22 1.094278e+02 9.679284e-05 8.000741 1.988529e-05</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"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">plotPCA</span>(sim, <span class="dt">exprs_values =</span> <span class="st">"counts"</span>)</code></pre></div> <p><img src="splatter_files/figure-html/pca-1.png" width="576" style="display: block; margin: auto;"></p> @@ -754,21 +754,21 @@ sim <-<span class="st"> </span><span class="kw"><a href="../reference/addGene <pre><code>## DataFrame with 6 rows and 3 columns ## Gene GeneMean Length ## <factor> <numeric> <numeric> -## 1 Gene1 0.486083183 1855 -## 2 Gene2 0.004635796 3158 -## 3 Gene3 0.401665079 1432 -## 4 Gene4 5.293414031 3396 -## 5 Gene5 0.022507485 2581 -## 6 Gene6 0.138698311 6003</code></pre> +## 1 Gene1 10.53439855 5193 +## 2 Gene2 2.10971396 4499 +## 3 Gene3 4.47004567 5511 +## 4 Gene4 0.19267026 3381 +## 5 Gene5 0.06672189 2570 +## 6 Gene6 0.87920676 806</code></pre> <p>We can then use <code>scater</code> to calculate TPM:</p> <div class="sourceCode"><pre class="sourceCode r"><code class="sourceCode r"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw">calculateTPM</span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length) <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>]</code></pre></div> -<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 -## Gene1 0.0000 82.60394 0.00000 0.00000 0.0000 -## Gene2 0.0000 0.00000 0.00000 0.00000 0.0000 -## Gene3 109.2362 0.00000 0.00000 105.56843 0.0000 -## Gene4 184.2476 315.84573 88.83347 44.51531 314.0713 -## Gene5 0.0000 0.00000 0.00000 0.00000 0.0000</code></pre> +<pre><code>## Cell1 Cell2 Cell3 Cell4 Cell5 +## Gene1 0.22854912 0.16875798 0.23480191 0.20342087 0.21439203 +## Gene2 0.04946331 0.01623250 0.03387770 0.03354284 0.03299512 +## Gene3 0.05384030 0.07951009 0.02765665 0.04107491 0.02693613 +## Gene4 0.00000000 0.00000000 0.00000000 0.00000000 0.00000000 +## Gene5 0.00000000 0.00000000 0.00000000 0.02935977 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> </div> <div id="comparing-simulations-and-real-data" class="section level1"> @@ -861,33 +861,33 @@ cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumenta ## [8] methods base ## ## other attached packages: -## [1] splatter_1.1.4 scater_1.5.12 -## [3] SingleCellExperiment_0.99.3 SummarizedExperiment_1.7.6 -## [5] DelayedArray_0.3.19 matrixStats_0.52.2 -## [7] GenomicRanges_1.29.13 GenomeInfoDb_1.13.4 -## [9] IRanges_2.11.15 S4Vectors_0.15.7 -## [11] ggplot2_2.2.1 Biobase_2.37.2 -## [13] BiocGenerics_0.23.1 +## [1] splatter_1.1.5 scater_1.5.16 +## [3] SingleCellExperiment_0.99.4 SummarizedExperiment_1.7.10 +## [5] DelayedArray_0.3.21 matrixStats_0.52.2 +## [7] GenomicRanges_1.29.14 GenomeInfoDb_1.13.4 +## [9] IRanges_2.11.17 S4Vectors_0.15.10 +## [11] ggplot2_2.2.1.9000 Biobase_2.37.2 +## [13] BiocGenerics_0.23.2 ## ## loaded via a namespace (and not attached): -## [1] viridis_0.4.0 edgeR_3.19.3 +## [1] viridis_0.4.0 edgeR_3.19.6 ## [3] splines_3.4.1 bit64_0.9-7 ## [5] viridisLite_0.2.0 shiny_1.0.5 ## [7] assertthat_0.2.0 highr_0.6 ## [9] sp_1.2-5 blob_1.1.0 ## [11] GenomeInfoDbData_0.99.1 vipor_0.4.5 ## [13] yaml_2.1.14 progress_1.1.2 -## [15] RSQLite_2.0 backports_1.1.0 +## [15] RSQLite_2.0 backports_1.1.1 ## [17] lattice_0.20-35 glue_1.1.1 -## [19] limma_3.33.9 digest_0.6.12 -## [21] checkmate_1.8.3 XVector_0.17.1 +## [19] limma_3.33.12 digest_0.6.12 +## [21] checkmate_1.8.4 XVector_0.17.1 ## [23] colorspace_1.3-2 cowplot_0.8.0 ## [25] htmltools_0.3.6 httpuv_1.3.5 ## [27] Matrix_1.2-11 plyr_1.8.4 ## [29] XML_3.98-1.9 pkgconfig_2.0.1 ## [31] biomaRt_2.33.4 zlibbioc_1.23.0 -## [33] xtable_1.8-2 scales_0.5.0 -## [35] BiocParallel_1.11.8 tibble_1.3.4 +## [33] xtable_1.8-2 scales_0.5.0.9000 +## [35] BiocParallel_1.11.9 tibble_1.3.4 ## [37] lazyeval_0.2.0 survival_2.41-3 ## [39] magrittr_1.5 mime_0.5 ## [41] memoise_1.1.0 evaluate_0.10.1 @@ -898,17 +898,17 @@ cowplot<span class="op">::</span><span class="kw"><a href="http://www.rdocumenta ## [51] munsell_0.4.3 locfit_1.5-9.1 ## [53] AnnotationDbi_1.39.3 bindrcpp_0.2 ## [55] akima_0.6-2 compiler_3.4.1 -## [57] rlang_0.1.2 rhdf5_2.21.4 +## [57] rlang_0.1.2 rhdf5_2.21.6 ## [59] grid_3.4.1 RCurl_1.95-4.8 ## [61] tximport_1.5.0 rjson_0.2.15 ## [63] labeling_0.3 bitops_1.0-6 ## [65] rmarkdown_1.6 gtable_0.2.0 ## [67] DBI_0.7 reshape2_1.4.2 ## [69] R6_2.2.2 gridExtra_2.3 -## [71] knitr_1.17 dplyr_0.7.3 +## [71] knitr_1.17 dplyr_0.7.4 ## [73] bit_1.1-12 bindr_0.1 ## [75] rprojroot_1.2 stringi_1.1.5 -## [77] ggbeeswarm_0.6.0 Rcpp_0.12.12</code></pre> +## [77] ggbeeswarm_0.6.0 Rcpp_0.12.13</code></pre> </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 e890d1c52f807c0b70161a7892cc3d968588a56b..47201d4b770edcfd0b4f2d932baccff8d08533d9 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 5afcdb8cd66638b2fc4a4aa0eb40546957bf1b80..29cb1e2ba0e985b60e24c566827f07e2613833ee 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 2fac9027f0c069f12087f4e62d7051a09ec91495..6079e05e5c640f1eafef977cf7ade0990c0af9d8 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 6994491e4310c9f4705cb46602ee2adc3af172da..f0a864ce59f2fcb7a15f49d1e994da88903ab372 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 4e86dcefc009ccaf1eb6daef4506e00bd55193b1..e30d2b989a5e7ea93c92d7ebb03dafe361bb0bb6 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 5cd450726c890036858b0ddeb731b0eb779b9a11..c3b4767465d21da1f78f06056dfbc5bf924f3280 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 d48db37b602189c11c358fd80e997115276d0f66..ff20b71da700841bb3be835edf916b3ffe3767d7 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 c7cb71596f692a9a1154fb2e2a3070fd8d23b4d2..49505f4af1116899167599f9d00fbbe436c27c8d 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 4d6e05f3720ea81c41433324595d801d626f00e9..f675f283e8d71b9efeef2465c4e05e5e9cae394c 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 42288e4534d83fa81bf8aa40f8630c57bdba6bb7..a0cd79fa1741025aee2fc52ee0ad95dc3e664daa 100644 --- a/docs/index.html +++ b/docs/index.html @@ -101,7 +101,7 @@ biocLite("splatter")</code></pre> <div id="development-version" class="section level3"> <h3 class="hasAnchor"> <a href="#development-version" class="anchor"></a>Development version</h3> -<p>If you want to try the [development version][deve] this can also be installed from Bioconductor:</p> +<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() biocValid() # checks for out of date packages diff --git a/docs/news/index.html b/docs/news/index.html index 902964d1f41499ba48844ea3c3518cdd7e814286..8c92674a484b15ac19a70e12947eee4d8eb62938 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -103,6 +103,14 @@ </div> <div class="contents"> + <div id="version-1-1-6-2017-10-02" class="section level2"> +<h2 class="hasAnchor"> +<a href="#version-1-1-6-2017-10-02" class="anchor"></a>Version 1.1.6 (2017-10-02)</h2> +<ul> +<li>Update scDD version</li> +<li>Add mfa simulation</li> +</ul> +</div> <div id="version-1-1-5-2017-09-13" class="section level2"> <h2 class="hasAnchor"> <a href="#version-1-1-5-2017-09-13" class="anchor"></a>Version 1.1.5 (2017-09-13)</h2> @@ -431,6 +439,7 @@ <div id="tocnav"> <h2>Contents</h2> <ul class="nav nav-pills nav-stacked"> + <li><a href="#version-1-1-6-2017-10-02">1.1.6</a></li> <li><a href="#version-1-1-5-2017-09-13">1.1.5</a></li> <li><a href="#version-1-1-4-2017-08-04">1.1.4</a></li> <li><a href="#version-1-1-3-2017-07-20">1.1.3</a></li> diff --git a/docs/reference/MFAParams.html b/docs/reference/MFAParams.html new file mode 100644 index 0000000000000000000000000000000000000000..0038585a753d6c7dbff932a21cf636aadb211748 --- /dev/null +++ b/docs/reference/MFAParams.html @@ -0,0 +1,155 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<title>The MFAParams class — MFAParams • Splatter</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script> +<script src="../pkgdown.js"></script> + <link href="../extra.css" rel="stylesheet"> + +<!-- mathjax --> +<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> + +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> +<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> +<![endif]--> + + +<!-- Google analytics --> +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-52309538-4', 'auto'); + ga('send', 'pageview'); + +</script> + + </head> + + <body> + <div class="container template-reference-topic"> + <header> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="../index.html">splatter</a> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li> + <a href="..//index.html"> + <span class="fa fa-home fa-lg"></span> + + </a> +</li> +<li> + <a href="../articles/splatter.html">Get Started</a> +</li> +<li> + <a href="../reference/index.html">Reference</a> +</li> +<li> + <a href="../news/index.html">News</a> +</li> + </ul> + + <ul class="nav navbar-nav navbar-right"> + <li> + <a href="https://github.com/Oshlack/splatter"> + <span class="fa fa-github fa-lg"></span> + + </a> +</li> + </ul> + </div><!--/.nav-collapse --> + </div><!--/.container --> +</div><!--/.navbar --> + + + </header> + + <div class="row"> + <div class="col-md-9 contents"> + <div class="page-header"> + <h1>The MFAParams class</h1> + </div> + + + <p>S4 class that holds parameters for the mfa simulation.</p> + + + + <h2 class="hasAnchor" id="parameters"><a class="anchor" href="#parameters"></a>Parameters</h2> + + + <p>The mfa simulation uses the following parameters:</p><dl class='dl-horizontal'> + <dt><code>nGenes</code></dt><dd><p>The number of genes to simulate.</p></dd> + <dt><code>nCells</code></dt><dd><p>The number of cells to simulate.</p></dd> + <dt><code>[seed]</code></dt><dd><p>Seed to use for generating random numbers.</p></dd> + <dt><code>[trans.prop]</code></dt><dd><p>Proportion of genes that show transient + expression. These genes are briefly up or down-regulated before returning + to their initial state</p></dd> + <dt><code>[zero.neg]</code></dt><dd><p>Logical. Whether to set negative expression + values to zero. This will zero-inflate the data.</p></dd> + <dt><code>[dropout.present]</code></dt><dd><p>Logical. Whether to simulate dropout.</p></dd> + <dt><code>dropout.lambda</code></dt><dd><p>Lambda parameter for the exponential + dropout function.</p></dd> +</dl> + <p>The parameters not shown in brackets can be estimated from real data using +<code><a href='mfaEstimate.html'>mfaEstimate</a></code>. See <code><a href='http://www.rdocumentation.org/packages/mfa/topics/create_synthetic'>create_synthetic</a></code> for more +details about the parameters. For details of the Splatter implementation of +the mfa simulation see <code><a href='mfaSimulate.html'>mfaSimulate</a></code>.</p> + + + </div> + <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> + <h2>Contents</h2> + <ul class="nav nav-pills nav-stacked"> + + <li><a href="#parameters">Parameters</a></li> + </ul> + + </div> +</div> + + <footer> + <div class="copyright"> + <p>Developed by Luke Zappia, Belinda Phipson, Alicia Oshlack.</p> +</div> + +<div class="pkgdown"> + <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> +</div> + + </footer> + </div> + + </body> +</html> diff --git a/docs/reference/Params.html b/docs/reference/Params.html index 46b9953219369bad302f5cdedc15c0d1f7e8dcce..219c8cd2239ac9e15df1b1ece80087a794775bf8 100644 --- a/docs/reference/Params.html +++ b/docs/reference/Params.html @@ -110,11 +110,11 @@ <p>The Params class defines the following parameters:</p><dl class='dl-horizontal'> - <dt><code>[nGenes]</code></dt><dd><p>The number of genes to simulate.</p></dd> - <dt><code>[nCells]</code></dt><dd><p>The number of cells to simulate.</p></dd> - <dt><code>seed</code></dt><dd><p>Seed to use for generating random numbers.</p></dd> + <dt><code>nGenes</code></dt><dd><p>The number of genes to simulate.</p></dd> + <dt><code>nCells</code></dt><dd><p>The number of cells to simulate.</p></dd> + <dt><code>[seed]</code></dt><dd><p>Seed to use for generating random numbers.</p></dd> </dl> - <p>The parameters shown in brackets can be estimated from real data.</p> + <p>The parameters not shown in brackets can be estimated from real data.</p> </div> diff --git a/docs/reference/SCDDParams.html b/docs/reference/SCDDParams.html index febb1a879fe2c0145f6b84b389e8c084099c4041..e819d63d8f52a377b0609803c50ae8d54471b996 100644 --- a/docs/reference/SCDDParams.html +++ b/docs/reference/SCDDParams.html @@ -113,7 +113,7 @@ <dt><code>nGenes</code></dt><dd><p>The number of genes to simulate (not used).</p></dd> <dt><code>nCells</code></dt><dd><p>The number of cells to simulate in each condition.</p></dd> <dt><code>[seed]</code></dt><dd><p>Seed to use for generating random numbers.</p></dd> - <dt><code>SCdat</code></dt><dd><p><code><a href='http://www.rdocumentation.org/packages/SummarizedExperiment/topics/RangedSummarizedExperiment-class'>SummarizedExperiment</a></code> containing real + <dt><code>SCdat</code></dt><dd><p><code><a href='http://www.rdocumentation.org/packages/SingleCellExperiment/topics/SingleCellExperiment'>SingleCellExperiment</a></code> containing real data.</p></dd> <dt><code>nDE</code></dt><dd><p>Number of DE genes to simulate.</p></dd> <dt><code>nDP</code></dt><dd><p>Number of DP genes to simulate.</p></dd> @@ -130,8 +130,8 @@ </dl> <p>The parameters not shown in brackets can be estimated from real data using <code><a href='scDDEstimate.html'>scDDEstimate</a></code>. See <code><a href='http://www.rdocumentation.org/packages/scDD/topics/simulateSet'>simulateSet</a></code> for more -details of the parameters. For details of the Splatter implementation of the -scDD simulation see <code><a href='scDDSimulate.html'>scDDSimulate</a></code>.</p> +details about the parameters. For details of the Splatter implementation of +the scDD simulation see <code><a href='scDDSimulate.html'>scDDSimulate</a></code>.</p> </div> diff --git a/docs/reference/addGeneLengths.html b/docs/reference/addGeneLengths.html index 3b4debec392a45d1d97171a7b84aeac0dd3ef6b0..7e1c743953665b18c481918dedb2e09ca5a0aafb 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.485591385 4195 -#> 2 Gene2 0.967616022 1996 -#> 3 Gene3 0.001658903 1683 -#> 4 Gene4 2.214911463 3711 -#> 5 Gene5 0.151852999 4320 -#> 6 Gene6 2.629906140 4458</div><div class='input'># Sample method (human coding genes) +#> Gene GeneMean Length +#> <factor> <numeric> <numeric> +#> 1 Gene1 0.02190272 2415 +#> 2 Gene2 0.42347583 4759 +#> 3 Gene3 0.09714480 5381 +#> 4 Gene4 0.77350851 4799 +#> 5 Gene5 1.78755781 4590 +#> 6 Gene6 0.06988693 925</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 62a16a533cd706bbe1d2ea19445f8948794f97fb..aeeac57b4384d872ff84283a807598ade777c55e 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -100,7 +100,7 @@ <div class="page-header"> <h1> Reference - <small>version 1.1.5</small> + <small>version 1.1.6</small> </h1> </div> @@ -146,7 +146,13 @@ </tr><tr> <!-- --> <td> - <p><code><a href="newParams.html">newLun2Params</a></code> <code><a href="newParams.html">newLunParams</a></code> <code><a href="newParams.html">newSCDDParams</a></code> <code><a href="newParams.html">newSimpleParams</a></code> <code><a href="newParams.html">newSplatParams</a></code> </p> + <p></p> + </td> + <td><p>The MFAParams class</p></td> + </tr><tr> + <!-- --> + <td> + <p><code><a href="newParams.html">newLun2Params</a></code> <code><a href="newParams.html">newLunParams</a></code> <code><a href="newParams.html">newMFAParams</a></code> <code><a href="newParams.html">newSCDDParams</a></code> <code><a href="newParams.html">newSimpleParams</a></code> <code><a href="newParams.html">newSplatParams</a></code> </p> </td> <td><p>New Params</p></td> </tr><tr> @@ -205,6 +211,12 @@ <p><code><a href="lunEstimate.html">lunEstimate</a></code> </p> </td> <td><p>Estimate Lun simulation parameters</p></td> + </tr><tr> + <!-- --> + <td> + <p><code><a href="mfaEstimate.html">mfaEstimate</a></code> </p> + </td> + <td><p>Estimate mfa simulation parameters</p></td> </tr><tr> <!-- --> <td> @@ -273,6 +285,12 @@ <p><code><a href="lunSimulate.html">lunSimulate</a></code> </p> </td> <td><p>Lun simulation</p></td> + </tr><tr> + <!-- --> + <td> + <p><code><a href="mfaSimulate.html">mfaSimulate</a></code> </p> + </td> + <td><p>MFA simulation</p></td> </tr><tr> <!-- --> <td> diff --git a/docs/reference/listSims.html b/docs/reference/listSims.html index 9493cc353309815e0a171b640093545f92a3fb57..5cbb9a4142bf6233f69ec2a324f2db153048b682 100644 --- a/docs/reference/listSims.html +++ b/docs/reference/listSims.html @@ -124,39 +124,43 @@ displayed.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><div class='input'><span class='fu'>listSims</span>()</div><div class='output co'>#> Splatter currently contains 8 simulations + <pre class="examples"><div class='input'><span class='fu'>listSims</span>()</div><div class='output co'>#> Splatter currently contains 9 simulations #> #> Splat (splat) -#> DOI: Github: -#> The Splat simulation generates means from a gamma distribution, adjusts them for BCV and generates counts from a gamma-poisson. Dropout can be optionally added. +#> DOI: GitHub: +#> 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. #> #> Splat Single (splatSingle) -#> DOI: Github: +#> DOI: GitHub: #> The Splat simulation with a single population. #> #> Splat Groups (splatGroups) -#> DOI: Github: +#> DOI: GitHub: #> The Splat simulation with multiple groups. Each group can have it's own differential expression probability and fold change distribution. #> #> Splat Paths (splatPaths) -#> DOI: Github: +#> DOI: GitHub: #> The Splat simulation with differentiation paths. Each path can have it's own length, skew and probability. Genes can change in non-linear ways. #> #> Simple (simple) -#> DOI: Github: +#> DOI: GitHub: #> A simple simulation with gamma means and negative binomial counts. #> #> Lun (lun) -#> DOI: 10.1186/s13059-016-0947-7 Github: MarioniLab/Deconvolution2016 +#> DOI: 10.1186/s13059-016-0947-7 GitHub: MarioniLab/Deconvolution2016 #> Gamma distributed means and negative binomial counts. Cells are given a size factor and differential expression can be simulated with fixed fold changes. #> #> Lun 2 (lun2) -#> DOI: 10.1101/073973 Github: MarioniLab/PlateEffects2016 +#> DOI: 10.1101/073973 GitHub: MarioniLab/PlateEffects2016 #> 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. #> #> scDD (scDD) -#> DOI: 10.1186/s13059-016-1077-y Github: kdkorthauer/scDD +#> DOI: 10.1186/s13059-016-1077-y GitHub: kdkorthauer/scDD #> The scDD simulation samples a given dataset and can simulate differentially expressed and differentially distributed genes between two conditions. +#> +#> mfa (mfa) +#> DOI: 10.12688/wellcomeopenres.11087.1 GitHub: kieranrcampbell/mfa +#> The mfa simulation produces a bifurcating pseudotime trajectory. This can optionally include genes with transient changes in expression and added dropout. #> </div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> diff --git a/docs/reference/lunEstimate.html b/docs/reference/lunEstimate.html index 2461f07283d958ff6927bde2bf8a4d5f3737dac4..dacfa9b7c5500d613942dc015e7ca9423671fd57 100644 --- a/docs/reference/lunEstimate.html +++ b/docs/reference/lunEstimate.html @@ -146,7 +146,7 @@ for more details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 833962 +#> 2000 40 116529 #> #> 9 additional parameters #> diff --git a/docs/reference/mfaEstimate.html b/docs/reference/mfaEstimate.html new file mode 100644 index 0000000000000000000000000000000000000000..92b8c0e31fff2175d299737aae38e27481b22000 --- /dev/null +++ b/docs/reference/mfaEstimate.html @@ -0,0 +1,195 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<title>Estimate mfa simulation parameters — mfaEstimate • Splatter</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script> +<script src="../pkgdown.js"></script> + <link href="../extra.css" rel="stylesheet"> + +<!-- mathjax --> +<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> + +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> +<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> +<![endif]--> + + +<!-- Google analytics --> +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-52309538-4', 'auto'); + ga('send', 'pageview'); + +</script> + + </head> + + <body> + <div class="container template-reference-topic"> + <header> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="../index.html">splatter</a> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li> + <a href="..//index.html"> + <span class="fa fa-home fa-lg"></span> + + </a> +</li> +<li> + <a href="../articles/splatter.html">Get Started</a> +</li> +<li> + <a href="../reference/index.html">Reference</a> +</li> +<li> + <a href="../news/index.html">News</a> +</li> + </ul> + + <ul class="nav navbar-nav navbar-right"> + <li> + <a href="https://github.com/Oshlack/splatter"> + <span class="fa fa-github fa-lg"></span> + + </a> +</li> + </ul> + </div><!--/.nav-collapse --> + </div><!--/.container --> +</div><!--/.navbar --> + + + </header> + + <div class="row"> + <div class="col-md-9 contents"> + <div class="page-header"> + <h1>Estimate mfa simulation parameters</h1> + </div> + + + <p>Estimate simulation parameters for the mfa simulation from a real dataset.</p> + + + <pre class="usage"><span class='fu'>mfaEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newMFAParams</a></span>()) + +<span class='co'># S3 method for SingleCellExperiment</span> +<span class='fu'>mfaEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newMFAParams</a></span>()) + +<span class='co'># S3 method for matrix</span> +<span class='fu'>mfaEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newMFAParams</a></span>())</pre> + + <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2> + <table class="ref-arguments"> + <colgroup><col class="name" /><col class="desc" /></colgroup> + <tr> + <th>counts</th> + <td><p>either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.</p></td> + </tr> + <tr> + <th>params</th> + <td><p>MFAParams object to store estimated values in.</p></td> + </tr> + </table> + + <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + + <p>MFAParams object containing the estimated parameters.</p> + + <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> + + <p>The <code>nGenes</code> and <code>nCells</code> parameters are taken from the size of the +input data. The dropout lambda parameter is estimate using +<code><a href='http://www.rdocumentation.org/packages/mfa/topics/empirical_lambda'>empirical_lambda</a></code>. See <code><a href='MFAParams.html'>MFAParams</a></code> for more +details on the parameters.</p> + + + <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> + <pre class="examples"><div class='input'><span class='fu'>data</span>(<span class='st'>"sc_example_counts"</span>) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>mfaEstimate</span>(<span class='no'>sc_example_counts</span>) +<span class='no'>params</span></div><div class='output co'>#> A Params object of class MFAParams +#> Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT'. +#> +#> Global: +#> (GENES) (CELLS) [Seed] +#> 2000 40 116529 +#> +#> 4 additional parameters +#> +#> Transient: +#> [Proportion] +#> 0 +#> +#> Negative: +#> [Zero] +#> TRUE +#> +#> Dropout: +#> [Present] (LAMBDA) +#> FALSE 0.00352186231063193 +#> </div></pre> + </div> + <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> + <h2>Contents</h2> + <ul class="nav nav-pills nav-stacked"> + <li><a href="#arguments">Arguments</a></li> + + <li><a href="#value">Value</a></li> + + <li><a href="#details">Details</a></li> + + <li><a href="#examples">Examples</a></li> + </ul> + + </div> +</div> + + <footer> + <div class="copyright"> + <p>Developed by Luke Zappia, Belinda Phipson, Alicia Oshlack.</p> +</div> + +<div class="pkgdown"> + <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> +</div> + + </footer> + </div> + + </body> +</html> diff --git a/docs/reference/mfaSimulate.html b/docs/reference/mfaSimulate.html new file mode 100644 index 0000000000000000000000000000000000000000..317790982e28c307d4ad3876179e68d20a05777e --- /dev/null +++ b/docs/reference/mfaSimulate.html @@ -0,0 +1,182 @@ +<!-- Generated by pkgdown: do not edit by hand --> +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> +<meta http-equiv="X-UA-Compatible" content="IE=edge"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> + +<title>MFA simulation — mfaSimulate • Splatter</title> + +<!-- jquery --> +<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script> +<!-- Bootstrap --> +<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.7/cosmo/bootstrap.min.css" rel="stylesheet" crossorigin="anonymous"> + +<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> + +<!-- Font Awesome icons --> +<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous"> + + +<!-- pkgdown --> +<link href="../pkgdown.css" rel="stylesheet"> +<script src="../jquery.sticky-kit.min.js"></script> +<script src="../pkgdown.js"></script> + <link href="../extra.css" rel="stylesheet"> + +<!-- mathjax --> +<script src='https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script> + +<!--[if lt IE 9]> +<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script> +<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> +<![endif]--> + + +<!-- Google analytics --> +<script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); + + ga('create', 'UA-52309538-4', 'auto'); + ga('send', 'pageview'); + +</script> + + </head> + + <body> + <div class="container template-reference-topic"> + <header> + <div class="navbar navbar-default navbar-fixed-top" role="navigation"> + <div class="container"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="../index.html">splatter</a> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <ul class="nav navbar-nav"> + <li> + <a href="..//index.html"> + <span class="fa fa-home fa-lg"></span> + + </a> +</li> +<li> + <a href="../articles/splatter.html">Get Started</a> +</li> +<li> + <a href="../reference/index.html">Reference</a> +</li> +<li> + <a href="../news/index.html">News</a> +</li> + </ul> + + <ul class="nav navbar-nav navbar-right"> + <li> + <a href="https://github.com/Oshlack/splatter"> + <span class="fa fa-github fa-lg"></span> + + </a> +</li> + </ul> + </div><!--/.nav-collapse --> + </div><!--/.container --> +</div><!--/.navbar --> + + + </header> + + <div class="row"> + <div class="col-md-9 contents"> + <div class="page-header"> + <h1>MFA simulation</h1> + </div> + + + <p>Simulate a bifurcating pseudotime path using the mfa method.</p> + + + <pre class="usage"><span class='fu'>mfaSimulate</span>(<span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newMFAParams</a></span>(), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='no'>...</span>)</pre> + + <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2> + <table class="ref-arguments"> + <colgroup><col class="name" /><col class="desc" /></colgroup> + <tr> + <th>params</th> + <td><p>MFAParams object containing simulation parameters.</p></td> + </tr> + <tr> + <th>verbose</th> + <td><p>Logical. Whether to print progress messages.</p></td> + </tr> + <tr> + <th>...</th> + <td><p>any additional parameter settings to override what is provided in +<code>params</code>.</p></td> + </tr> + </table> + + <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2> + + <p>SingleCellExperiment containing simulated counts</p> + + <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2> + + <p>This function is just a wrapper around <code><a href='http://www.rdocumentation.org/packages/mfa/topics/create_synthetic'>create_synthetic</a></code> +that takes a <code><a href='MFAParams.html'>MFAParams</a></code>, runs the simulation then converts the +output to a <code><a href='http://www.rdocumentation.org/packages/SingleCellExperiment/topics/SingleCellExperiment'>SingleCellExperiment</a></code> object. +See <code><a href='http://www.rdocumentation.org/packages/mfa/topics/create_synthetic'>create_synthetic</a></code> and the mfa paper for more details +about how the simulation works.</p> + + <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2> + + <p>Campbell KR, Yau C. Probabilistic modeling of bifurcations in single-cell +gene expression data using a Bayesian mixture of factor analyzers. Wellcome +Open Research (2017).</p> +<p>Paper: <a href='10.12688/wellcomeopenres.11087.1'>10.12688/wellcomeopenres.11087.1</a></p> +<p>Code: <a href='https://github.com/kieranrcampbell/mfa'>https://github.com/kieranrcampbell/mfa</a></p> + + + <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> + <pre class="examples"><div class='input'><span class='no'>sim</span> <span class='kw'><-</span> <span class='fu'>mfaSimulate</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></pre> + </div> + <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> + <h2>Contents</h2> + <ul class="nav nav-pills nav-stacked"> + <li><a href="#arguments">Arguments</a></li> + + <li><a href="#value">Value</a></li> + + <li><a href="#details">Details</a></li> + + <li><a href="#references">References</a></li> + + <li><a href="#examples">Examples</a></li> + </ul> + + </div> +</div> + + <footer> + <div class="copyright"> + <p>Developed by Luke Zappia, Belinda Phipson, Alicia Oshlack.</p> +</div> + +<div class="pkgdown"> + <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p> +</div> + + </footer> + </div> + + </body> +</html> diff --git a/docs/reference/newParams.html b/docs/reference/newParams.html index e7e24261eed902665f735b8546bddb332bc31a5f..466518a4a390c0141791e48be6842c3bd0ef8e85 100644 --- a/docs/reference/newParams.html +++ b/docs/reference/newParams.html @@ -110,6 +110,8 @@ Params subtypes.</p> <span class='fu'>newLunParams</span>(<span class='no'>...</span>) +<span class='fu'>newMFAParams</span>(<span class='no'>...</span>) + <span class='fu'>newSCDDParams</span>(<span class='no'>...</span>) <span class='fu'>newSimpleParams</span>(<span class='no'>...</span>) diff --git a/docs/reference/scDDEstimate.html b/docs/reference/scDDEstimate.html index 7aa9f16e76fce71d06249c6185a66b9e3e25ef52..19ec722e1ad62bedf9456f9952e507c87b8d4f66 100644 --- a/docs/reference/scDDEstimate.html +++ b/docs/reference/scDDEstimate.html @@ -105,16 +105,20 @@ <p>Estimate simulation parameters for the scDD simulation from a real dataset.</p> - <pre class="usage"><span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='no'>conditions</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, - <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>()) + <pre class="usage"><span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, + <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>(), <span class='no'>...</span>) + +<span class='co'># S3 method for matrix</span> +<span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), + <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>(), <span class='no'>conditions</span>, <span class='no'>...</span>) <span class='co'># S3 method for SingleCellExperiment</span> -<span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='no'>conditions</span>, - <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>()) +<span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), + <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>(), <span class='kw'>condition</span> <span class='kw'>=</span> <span class='st'>"condition"</span>, <span class='no'>...</span>) -<span class='co'># S3 method for matrix</span> -<span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='no'>conditions</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), - <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>())</pre> +<span class='co'># S3 method for default</span> +<span class='fu'>scDDEstimate</span>(<span class='no'>counts</span>, <span class='kw'>params</span> <span class='kw'>=</span> <span class='fu'><a href='newParams.html'>newSCDDParams</a></span>(), + <span class='kw'>verbose</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, <span class='kw'>BPPARAM</span> <span class='kw'>=</span> <span class='fu'>SerialParam</span>(), <span class='no'>condition</span>, <span class='no'>...</span>)</pre> <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2> <table class="ref-arguments"> @@ -123,11 +127,6 @@ <th>counts</th> <td><p>either a counts matrix or a SingleCellExperiment object containing count data to estimate parameters from.</p></td> - </tr> - <tr> - <th>conditions</th> - <td><p>Vector giving the condition that each cell belongs to. -Conditions can be 1 or 2.</p></td> </tr> <tr> <th>params</th> @@ -142,6 +141,20 @@ Conditions can be 1 or 2.</p></td> <td><p>A <code><a href='http://www.rdocumentation.org/packages/BiocParallel/topics/BiocParallelParam-class'>BiocParallelParam</a></code> instance giving the parallel back-end to be used. Default is <code><a href='http://www.rdocumentation.org/packages/BiocParallel/topics/SerialParam-class'>SerialParam</a></code> which uses a single core.</p></td> + </tr> + <tr> + <th>...</th> + <td><p>further arguments passed to or from other methods.</p></td> + </tr> + <tr> + <th>conditions</th> + <td><p>Vector giving the condition that each cell belongs to. +Conditions can be 1 or 2.</p></td> + </tr> + <tr> + <th>condition</th> + <td><p>String giving the column that represents biological group of +interest.</p></td> </tr> </table> diff --git a/docs/reference/setParam.html b/docs/reference/setParam.html index 7ce40137c31ab5d3a8a1726600ff994c0bee5b9d..92e0d87fd12b02dce1085e34d77af3c21c35c64d 100644 --- a/docs/reference/setParam.html +++ b/docs/reference/setParam.html @@ -151,7 +151,7 @@ #> #> Global: #> (GENES) (Cells) [Seed] -#> 100 100 833962 +#> 100 100 116529 #> #> 3 additional parameters #> diff --git a/docs/reference/setParams.html b/docs/reference/setParams.html index de23be96fef4c87aa80f6361d7a88555d079aea2..572eb144908524870a3f6732525831787b8ddcbb 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 833962 +#> 10000 100 116529 #> #> 3 additional parameters #> @@ -164,7 +164,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 833962 +#> 1000 50 116529 #> #> 3 additional parameters #> @@ -182,7 +182,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 833962 +#> 1000 50 116529 #> #> 3 additional parameters #> diff --git a/docs/reference/simpleEstimate.html b/docs/reference/simpleEstimate.html index eea549fc2491b5268eeae84e689582e3cc659b9d..0b41b8ca6ac6acfbc01d7f7e4cd00ed3bb1c5df7 100644 --- a/docs/reference/simpleEstimate.html +++ b/docs/reference/simpleEstimate.html @@ -149,7 +149,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 833962 +#> 2000 40 116529 #> #> 3 additional parameters #> diff --git a/docs/reference/splatEstimate.html b/docs/reference/splatEstimate.html index 81af1b9307fd377cc464084cb34209bf11272f09..8c1698417321424ba4e47c26df98b5c377f26c30 100644 --- a/docs/reference/splatEstimate.html +++ b/docs/reference/splatEstimate.html @@ -149,7 +149,7 @@ containing count data to estimate parameters from.</p></td> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 833962 +#> 2000 40 116529 #> #> 27 additional parameters #> diff --git a/docs/reference/summariseDiff.html b/docs/reference/summariseDiff.html index 3e8fc8bf155b76fdd5fd2f025a19895b53aeb227..3367151b4f4f74cdbead6edee6a4ed17f0de9b06 100644 --- a/docs/reference/summariseDiff.html +++ b/docs/reference/summariseDiff.html @@ -127,19 +127,19 @@ Error (RMSE) for the various 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'>list</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'>head</span>(<span class='no'>summary</span>)</div><div class='output co'>#> Dataset Statistic MAD MADScaled MADRank MAE MAEScaled -#> 1 Splat Mean 2.434959 NaN 1 2.372109 NaN -#> 2 Splat Variance 11.529400 NaN 1 10.235263 NaN -#> 3 Splat ZerosGene 30.000000 NaN 1 37.590000 NaN -#> 4 Splat MeanVar 10.907122 NaN 1 12.107674 NaN -#> 5 Splat MeanZeros 45.000000 NaN 1 41.375000 NaN -#> 6 Splat LibSize 62644.500000 NaN 1 61051.350000 NaN +#> 1 Splat Mean 2.288457 NaN 1 2.361992 NaN +#> 2 Splat Variance 9.864920 NaN 1 9.885907 NaN +#> 3 Splat ZerosGene 30.000000 NaN 1 38.245000 NaN +#> 4 Splat MeanVar 9.311683 NaN 1 11.773079 NaN +#> 5 Splat MeanZeros 40.000000 NaN 1 41.455000 NaN +#> 6 Splat LibSize 59924.000000 NaN 1 60889.500000 NaN #> MAERank RMSE RMSEScaled RMSERank -#> 1 1 2.909392 NaN 1 -#> 2 1 12.895348 NaN 1 -#> 3 1 42.376880 NaN 1 -#> 4 1 15.083543 NaN 1 -#> 5 1 50.717600 NaN 1 -#> 6 1 61731.822271 NaN 1</div></pre> +#> 1 1 2.911241 NaN 1 +#> 2 1 12.576504 NaN 1 +#> 3 1 43.466366 NaN 1 +#> 4 1 14.872900 NaN 1 +#> 5 1 51.016909 NaN 1 +#> 6 1 62360.840953 NaN 1</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/index.md b/index.md index 1af5f09510e7ee44f909cb5bae4556e3303aa941..24e894f7a1b4da355ce2c483c692121cf395e223 100644 --- a/index.md +++ b/index.md @@ -51,7 +51,7 @@ command in RStudio. ### Development version -If you want to try the [development version][deve] this can also be installed +If you want to try the [development version][devel] this can also be installed from Bioconductor: ```{r}