diff --git a/DESCRIPTION b/DESCRIPTION index f67bea7680a8ef7e976dad98373cf8c596a02897..0a61b2b2042deafb3ed7a4bf98faa568e75ed2e6 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: splatter Type: Package Title: Simple Simulation of Single-cell RNA Sequencing Data -Version: 1.3.5 -Date: 2018-04-25 +Version: 1.3.6 +Date: 2018-04-30 Author: Luke Zappia Authors@R: c(person("Luke", "Zappia", role = c("aut", "cre"), diff --git a/NEWS.md b/NEWS.md index 7f7748bddcaa72974bc6044c4211b47615a59e67..0ef87197162ba24e3d534c625f4167e4f5ba23c7 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -## Version 1.3.4 (2018-04-25) +## Version 1.3.6 (2018-04-30) + +* Set seed in sparseDCEstimate tests + +## Version 1.3.5 (2018-04-25) * Replace dropout.present with dropout.type in SplatParams * Allows users to set dropout by experiment, batch, group or cell diff --git a/R/sparseDC-estimate.R b/R/sparseDC-estimate.R index 1439bcf8623f5bc747518f8df45665933e52f8cc..0c0f793f38b6c71d0e8ec68ae034063e36c78eca 100644 --- a/R/sparseDC-estimate.R +++ b/R/sparseDC-estimate.R @@ -28,6 +28,7 @@ #' library(scater) #' data("sc_example_counts") #' +#' set.seed(1) #' conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) #' #' params <- sparseDCEstimate(sc_example_counts[1:500, ], conditions, diff --git a/docs/articles/index.html b/docs/articles/index.html index 088ab52f0cea0b8d22450a42a0b6a9a80616136b..b16f949f96fd2f4b10f4fc579557bfad55cfc70f 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -96,7 +96,7 @@ </header> <div class="page-header"> - <h1>Articles <small>version 1.3.5</small></h1> + <h1>Articles <small>version 1.3.6</small></h1> </div> <div class="row"> diff --git a/docs/articles/splatter.html b/docs/articles/splatter.html index 7602e9346bd996ab2c0f23b14a0c72a68e27efee..0887fa9e91ec538ac96f290b6aa46c0a1cfb696c 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">2018-04-25</h4> + <h4 class="date">2018-04-30</h4> </div> diff --git a/docs/news/index.html b/docs/news/index.html index b7ebc7ec88621fe2edcd08cbcbd6a8a4ed0a2ea9..642f9d0892a5b6f1bb75bd03f6cb265f97301471 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -104,7 +104,13 @@ <div class="contents"> <div class="section level2"> -<h2>Version 1.3.4 (2018-04-25)</h2> +<h2>Version 1.3.6 (2018-04-30)</h2> +<ul> +<li>Set seed in sparseDCEstimate tests</li> +</ul> +</div> + <div class="section level2"> +<h2>Version 1.3.5 (2018-04-25)</h2> <ul> <li>Replace dropout.present with dropout.type in SplatParams <ul> @@ -498,7 +504,8 @@ <div id="tocnav"> <h2>Contents</h2> <ul class="nav nav-pills nav-stacked"> - <li><a href="#NA">1.3.4</a></li> + <li><a href="#NA">1.3.6</a></li> + <li><a href="#NA">1.3.5</a></li> <li><a href="#NA">1.3.4</a></li> <li><a href="#NA">1.3.3</a></li> <li><a href="#NA">1.3.2</a></li> diff --git a/docs/reference/addGeneLengths.html b/docs/reference/addGeneLengths.html index b43634746f849c4c71de9876f98d2261b0cbc780..f87091d73845c86c7943094de09c036bbaa690e0 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 3.19721697566766 428 -#> 2 Gene2 0.316692135258865 2948 -#> 3 Gene3 2.90867080625693 1507 -#> 4 Gene4 7.5357203351493 6034 -#> 5 Gene5 5.92953185619191 1713 -#> 6 Gene6 3.78237895789214 2926</div><div class='input'># Sample method (human coding genes) +#> Gene GeneMean Length +#> <factor> <numeric> <numeric> +#> 1 Gene1 0.734025020368755 8478 +#> 2 Gene2 1.72488562332675 4683 +#> 3 Gene3 0.602236437812367 3861 +#> 4 Gene4 0.279058870872173 1711 +#> 5 Gene5 0.00808100968671002 3209 +#> 6 Gene6 4.60422371602675 1349</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 37647c51c2c57d024a4992825c4e0ac146c83a31..f0a5f140d85cd9949a3e9cd3e4d85b633fd67751 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -100,7 +100,7 @@ <div class="page-header"> <h1> Reference - <small>version 1.3.5</small> + <small>version 1.3.6</small> </h1> </div> diff --git a/docs/reference/lunEstimate.html b/docs/reference/lunEstimate.html index 797828822a980d4dcad7c8486bb48fd169391ec1..9e3f6bb3c88b4eb509a48f64f2fa6199d5b1cad9 100644 --- a/docs/reference/lunEstimate.html +++ b/docs/reference/lunEstimate.html @@ -149,7 +149,7 @@ for more details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 33804 +#> 2000 40 239255 #> #> 9 additional parameters #> diff --git a/docs/reference/mfaEstimate.html b/docs/reference/mfaEstimate.html index df646e1540d457182a1f2e52462d3f39853b936e..806172e1400834cc304469ca27592253b3c6a04a 100644 --- a/docs/reference/mfaEstimate.html +++ b/docs/reference/mfaEstimate.html @@ -150,7 +150,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 33804 +#> 2000 40 239255 #> #> 4 additional parameters #> diff --git a/docs/reference/phenoEstimate.html b/docs/reference/phenoEstimate.html index b19c0960da87d610ce9b234b593019f1696d6a38..c426f249136f1315a8033bd3f33a11324b301b9a 100644 --- a/docs/reference/phenoEstimate.html +++ b/docs/reference/phenoEstimate.html @@ -151,7 +151,7 @@ See <code><a href='PhenoParams.html'>PhenoParams</a></code> for more details on #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 33804 +#> 2000 40 239255 #> #> 4 additional parameters #> diff --git a/docs/reference/setParam.html b/docs/reference/setParam.html index 7b675e5a1c4a0f200b12a690b81991ccc7aadf61..c744aff2fe91ab9ffe0f58204636dbf5b585c910 100644 --- a/docs/reference/setParam.html +++ b/docs/reference/setParam.html @@ -160,7 +160,7 @@ #> #> Global: #> (GENES) (Cells) [Seed] -#> 100 100 33804 +#> 100 100 239255 #> #> 3 additional parameters #> diff --git a/docs/reference/setParams.html b/docs/reference/setParams.html index 24447c4954327481e77dfdb45aa700c56d22d346..b1dd65fb7a6af30b047ca0dfb2ff9ca581fa838d 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 33804 +#> 10000 100 239255 #> #> 3 additional parameters #> @@ -164,7 +164,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 33804 +#> 1000 50 239255 #> #> 3 additional parameters #> @@ -182,7 +182,7 @@ them manually), see examples.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 1000 50 33804 +#> 1000 50 239255 #> #> 3 additional parameters #> diff --git a/docs/reference/simpleEstimate.html b/docs/reference/simpleEstimate.html index 548b300cb20ce4389f0e8882d7388b9adb581165..cde8accc8304e4ce376036958e7a3cf252f12800 100644 --- a/docs/reference/simpleEstimate.html +++ b/docs/reference/simpleEstimate.html @@ -152,7 +152,7 @@ details on the parameters.</p> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 33804 +#> 2000 40 239255 #> #> 3 additional parameters #> diff --git a/docs/reference/sparseDCEstimate.html b/docs/reference/sparseDCEstimate.html index 3ab9bb0b43468bb761df4c22b0c76d24e90f0c85..cb9edf34370a7e524e10a8414666632c680ca94a 100644 --- a/docs/reference/sparseDCEstimate.html +++ b/docs/reference/sparseDCEstimate.html @@ -164,6 +164,7 @@ input data. The counts are preprocessed using <span class='fu'>library</span>(<span class='no'>scater</span>) <span class='fu'>data</span>(<span class='st'>"sc_example_counts"</span>) +<span class='fu'>set.seed</span>(<span class='fl'>1</span>) <span class='no'>conditions</span> <span class='kw'><-</span> <span class='fu'>sample</span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'>ncol</span>(<span class='no'>sc_example_counts</span>), <span class='kw'>replace</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>sparseDCEstimate</span>(<span class='no'>sc_example_counts</span>[<span class='fl'>1</span>:<span class='fl'>500</span>, ], <span class='no'>conditions</span>, @@ -173,7 +174,7 @@ input data. The counts are preprocessed using #> #> Global: #> (GENES) (CELLS) [Seed] -#> 500 20 33804 +#> 500 20 239255 #> #> 7 additional parameters #> diff --git a/docs/reference/splatEstimate.html b/docs/reference/splatEstimate.html index 4699daf5afff0f0a90af25b00419c0b99c2ad381..ea70708fbbe60cade26d484c8bc82ef405eb9879 100644 --- a/docs/reference/splatEstimate.html +++ b/docs/reference/splatEstimate.html @@ -151,7 +151,7 @@ containing count data to estimate parameters from.</p></td> #> #> Global: #> (GENES) (CELLS) [Seed] -#> 2000 40 33804 +#> 2000 40 239255 #> #> 28 additional parameters #> diff --git a/docs/reference/summariseDiff.html b/docs/reference/summariseDiff.html index a1d0f606ff5d9b1146e7e826c1d8250437c5450d..35b7468d66a336eec08dc06cf8db9e695211e090 100644 --- a/docs/reference/summariseDiff.html +++ b/docs/reference/summariseDiff.html @@ -128,19 +128,19 @@ Error (RMSE) for the various properties and ranks them.</p> #> <span class='message'>Old names are currently maintained for back-compatibility, but may be removed in future releases.</span></div><div class='output co'>#> <span class='message'>Note that the names of some metrics have changed, see 'Renamed metrics' in ?calculateQCMetrics.</span> #> <span class='message'>Old names are currently maintained for back-compatibility, but may be removed in future releases.</span></div><div class='input'><span class='no'>summary</span> <span class='kw'><-</span> <span class='fu'>summariseDiff</span>(<span class='no'>difference</span>) <span class='fu'>head</span>(<span class='no'>summary</span>)</div><div class='output co'>#> Dataset Statistic MAD MADScaled MADRank MAE MAEScaled -#> 1 Splat Mean 2.578921 NaN 1 2.526951 NaN -#> 2 Splat Variance 11.923672 NaN 1 10.771444 NaN -#> 3 Splat ZerosGene 35.000000 NaN 1 41.210000 NaN -#> 4 Splat MeanVar 11.687919 NaN 1 12.429719 NaN -#> 5 Splat MeanZeros 45.000000 NaN 1 42.440000 NaN -#> 6 Splat LibSize 53750.500000 NaN 1 57352.550000 NaN +#> 1 Splat Mean 2.747262 NaN 1 2.687708 NaN +#> 2 Splat Variance 12.048614 NaN 1 10.964929 NaN +#> 3 Splat ZerosGene 40.000000 NaN 1 44.560000 NaN +#> 4 Splat MeanVar 11.536097 NaN 1 12.817781 NaN +#> 5 Splat MeanZeros 45.000000 NaN 1 44.735000 NaN +#> 6 Splat LibSize 60309.000000 NaN 1 62775.150000 NaN #> MAERank RMSE RMSEScaled RMSERank -#> 1 1 3.056807 NaN 1 -#> 2 1 13.346501 NaN 1 -#> 3 1 45.518677 NaN 1 -#> 4 1 15.389141 NaN 1 -#> 5 1 51.924946 NaN 1 -#> 6 1 58750.990661 NaN 1</div></pre> +#> 1 1 3.224377 NaN 1 +#> 2 1 13.890753 NaN 1 +#> 3 1 48.064020 NaN 1 +#> 4 1 15.970356 NaN 1 +#> 5 1 54.010879 NaN 1 +#> 6 1 63881.558662 NaN 1</div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/man/sparseDCEstimate.Rd b/man/sparseDCEstimate.Rd index 274d0747dc602f4ed7a6146f9f6ae2e62d665c15..4d19581d40821da96be2b7d5d750e24b9bdf0cfd 100644 --- a/man/sparseDCEstimate.Rd +++ b/man/sparseDCEstimate.Rd @@ -50,6 +50,7 @@ See \code{\link{SparseDCParams}} for more details on the parameters. library(scater) data("sc_example_counts") +set.seed(1) conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) params <- sparseDCEstimate(sc_example_counts[1:500, ], conditions, diff --git a/tests/testthat/test-sparseDCEstimate.R b/tests/testthat/test-sparseDCEstimate.R index a34ac481b581aa9f21a5c49701a8c0b50d93ac9a..3bdc50b7962a008a1a8db7630144d7560192d7ac 100644 --- a/tests/testthat/test-sparseDCEstimate.R +++ b/tests/testthat/test-sparseDCEstimate.R @@ -4,8 +4,8 @@ library(scater) data("sc_example_counts") test_that("sparseDCEstimate works", { + set.seed(1) conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) - params <- sparseDCEstimate(sc_example_counts, conditions, nclusters = 3) expect_true(validObject(params))