diff --git a/DESCRIPTION b/DESCRIPTION index a64f3c8c184299488d6b3cf24566e55e5e3d4586..888d745a0525cac9401d8c44f67fdcda85dc895b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: splatter Type: Package Title: Simple Simulation of Single-cell RNA Sequencing Data -Version: 1.9.3.9008 +Version: 1.9.4.9008 Date: 2019-08-20 Author: Luke Zappia Authors@R: diff --git a/NEWS.md b/NEWS.md index 5b71bdc45865846aeb2fa9a084d4a0b4912f7d15..18d91bda9d4959827ec47d5f52e050629851eacd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,15 @@ +### Version 1.9.4.9008 (2019-08-20) + +* Merge master into splotch branch + +## Version 1.9.4 (2019-08-20) + +* Fix deprecated column name in diffSCEs QQ plots +* Fix bugs where parameters were not being passed correctly in BASiCSEstimate + and sparseDCEstimate +* Replace the sc_example_counts dataset from scater with the mockSCE function +* Tidy and improve estimation function examples + ### Version 1.9.3.9008 (2019-08-20) * Add expression outliers to Splotch diff --git a/R/BASiCS-estimate.R b/R/BASiCS-estimate.R index f3148eda55932c2113611772f2a272329bfc5449..229cddfd4785daef7ac1421a736e4bf7550f9749 100644 --- a/R/BASiCS-estimate.R +++ b/R/BASiCS-estimate.R @@ -35,13 +35,13 @@ #' \dontrun{ #' # Load example data #' library(scater) -#' data("sc_example_counts") +#' set.seed(1) +#' sce <- mockSCE() #' -#' spike.info <- data.frame(Name = rownames(sc_example_counts)[1:10], +#' spike.info <- data.frame(Name = rownames(sce)[1:10], #' Input = rnorm(10, 500, 200), #' stringsAsFactors = FALSE) -#' params <- BASiCSEstimate(sc_example_counts[1:100, 1:30], -#' spike.info) +#' params <- BASiCSEstimate(sce[1:100, 1:30], spike.info) #' params #' } #' @export @@ -63,7 +63,8 @@ BASiCSEstimate.SingleCellExperiment <- function(counts, spike.info = NULL, verbose = TRUE, progress = TRUE, ...) { counts <- BiocGenerics::counts(counts) - BASiCSEstimate(counts, params) + BASiCSEstimate(counts, spike.info, batch, n, thin, burn, regression, + params, verbose, progress, ...) } #' @rdname BASiCSEstimate diff --git a/R/compare.R b/R/compare.R index 07bd63b36ee5861b72e4912c4676a7cc261a18c5..dba07d35a4f4c65458856f0c508dff84f06aaaf1 100644 --- a/R/compare.R +++ b/R/compare.R @@ -508,7 +508,7 @@ diffSCEs <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, theme_minimal() libs.qq <- ggplot(cells, - aes_string(x = "RefRankLibSize", y = "total_counts", + aes_string(x = "RefRankLibSize", y = "sum", colour = "Dataset")) + geom_abline(intercept = 0, slope = 1, colour = "red") + geom_point(size = point.size, alpha = point.alpha) + diff --git a/R/lun-estimate.R b/R/lun-estimate.R index 298c84ba27f35cfb6b09c83c7191ec2434a09735..a014402e78e56259dcbe3301fe10e3bddc0c4d25 100644 --- a/R/lun-estimate.R +++ b/R/lun-estimate.R @@ -16,9 +16,10 @@ #' @examples #' # Load example data #' library(scater) -#' data("sc_example_counts") +#' set.seed(1) +#' sce <- mockSCE() #' -#' params <- lunEstimate(sc_example_counts) +#' params <- lunEstimate(sce) #' params #' @export lunEstimate <- function(counts, params = newLunParams()) { diff --git a/R/lun2-estimate.R b/R/lun2-estimate.R index aaedad7852ef48ac0d8f66e1fc21c2957d263b70..0bcc212d98e14da2fb6b36672ce418ea7313cba4 100644 --- a/R/lun2-estimate.R +++ b/R/lun2-estimate.R @@ -22,11 +22,11 @@ #' \dontrun{ #' # Load example data #' library(scater) -#' data("sc_example_counts") -#' data("sc_example_cell_info") +#' set.seed(1) +#' sce <- mockSCE() #' -#' plates <- factor(sc_example_cell_info$Mutation_Status) -#' params <- lun2Estimate(sc_example_counts, plates, min.size = 20) +#' plates <- as.numeric(factor(colData(sce)$Mutation_Status)) +#' params <- lun2Estimate(sce, plates, min.size = 20) #' params #' } #' @importFrom BiocParallel bplapply SerialParam @@ -44,7 +44,8 @@ lun2Estimate.SingleCellExperiment <- function(counts, plates, min.size = 200, verbose = TRUE, BPPARAM = SerialParam()) { counts <- BiocGenerics::counts(counts) - lun2Estimate(counts, plates, params, min.size = min.size, verbose = verbose) + lun2Estimate(counts, plates, params, min.size = min.size, verbose = verbose, + BPPARAM = BPPARAM) } #' @rdname lun2Estimate diff --git a/R/mfa-estimate.R b/R/mfa-estimate.R index 1ff363c85d517e44118d6c1a08f21bafb371e484..c05f1749d44a15ffcb8bb752b8e6ce81878b466c 100644 --- a/R/mfa-estimate.R +++ b/R/mfa-estimate.R @@ -17,10 +17,11 @@ #' @examples #' # Load example data #' if (requireNamespace("mfa", quietly = TRUE)) { -#' library(scater) -#' data("sc_example_counts") +#' library(mfa) +#' synth <- create_synthetic(C = 20, G = 5, zero_negative = TRUE, +#' model_dropout = TRUE) #' -#' params <- mfaEstimate(sc_example_counts) +#' params <- mfaEstimate(synth$X) #' params #' } #' @export diff --git a/R/pheno-estimate.R b/R/pheno-estimate.R index b7ee6e8dcbe442a51e938e1eab13c82bfffdf398..76b95e619bbc2c4f0d9f4c047b7ddfd3eb0653d8 100644 --- a/R/pheno-estimate.R +++ b/R/pheno-estimate.R @@ -18,9 +18,10 @@ #' if (requireNamespace("phenopath", quietly = TRUE)) { #' # Load example data #' library(scater) -#' data("sc_example_counts") +#' set.seed(1) +#' sce <- mockSCE() #' -#' params <- phenoEstimate(sc_example_counts) +#' params <- phenoEstimate(sce) #' params #' } #' @export diff --git a/R/scDD-estimate.R b/R/scDD-estimate.R index e8e1ccc8b4020eca5d7bb186e750a92ec8eed8a2..87ecaa0ebdfaf44fba2d6b3b1d269b3bde31b261 100644 --- a/R/scDD-estimate.R +++ b/R/scDD-estimate.R @@ -24,15 +24,16 @@ #' @return SCDDParams object containing the estimated parameters. #' #' @examples -#' \dontrun{ -#' # Load example data -#' library(scater) -#' data("sc_example_counts") +#' if (requireNamespace("scDD", quietly = TRUE)) { +#' library(scater) +#' set.seed(1) +#' sce <- mockSCE(ncells = 20, ngenes = 100) #' -#' conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) -#' params <- scDDEstimate(sc_example_counts, conditions = conditions) -#' params +#' colData(sce)$condition <- sample(1:2, ncol(sce), replace = TRUE) +#' params <- scDDEstimate(sce, condition = "condition") +#' params #' } +#' #' @importFrom BiocParallel SerialParam #' @export scDDEstimate <- function(counts, #conditions, condition, @@ -72,6 +73,7 @@ scDDEstimate.SingleCellExperiment <- function(counts, verbose = TRUE, BPPARAM = SerialParam(), condition = "condition", ...) { + scDDEstimate.default(counts, params, verbose, BPPARAM, condition = condition) } diff --git a/R/simple-estimate.R b/R/simple-estimate.R index 1f9e6cc653bbfa215e695d09a2d3268eb7372152..5bb2fb377ce67d87b83c71269552d9706bf9f371 100644 --- a/R/simple-estimate.R +++ b/R/simple-estimate.R @@ -18,9 +18,10 @@ #' @examples #' # Load example data #' library(scater) -#' data("sc_example_counts") +#' set.seed(1) +#' sce <- mockSCE() #' -#' params <- simpleEstimate(sc_example_counts) +#' params <- simpleEstimate(sce) #' params #' @export simpleEstimate <- function(counts, params = newSimpleParams()) { diff --git a/R/sparseDC-estimate.R b/R/sparseDC-estimate.R index 99c8b7c3e61cf24eb41f274eea6675925b8edc19..a0784bec61cc872490d85f9d72ae08e6b9a62096 100644 --- a/R/sparseDC-estimate.R +++ b/R/sparseDC-estimate.R @@ -27,13 +27,12 @@ #' if (requireNamespace("SparseDC", quietly = TRUE)) { #' # Load example data #' library(scater) -#' data("sc_example_counts") -#' #' set.seed(1) -#' conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) +#' sce <- mockSCE(ncells = 20, ngenes = 100) +#' +#' conditions <- sample(1:2, ncol(sce), replace = TRUE) #' -#' params <- sparseDCEstimate(sc_example_counts[1:500, ], conditions, -#' nclusters = 3) +#' params <- sparseDCEstimate(sce, conditions, nclusters = 3) #' params #' } #' @export @@ -48,7 +47,7 @@ sparseDCEstimate.SingleCellExperiment <- function(counts, conditions, nclusters, norm = TRUE, params = newSparseDCParams()) { counts <- BiocGenerics::counts(counts) - sparseDCEstimate(counts, params) + sparseDCEstimate(counts, conditions, nclusters, norm, params) } #' @rdname sparseDCEstimate diff --git a/R/splat-estimate.R b/R/splat-estimate.R index 0af1ceda491b3fecd84b28a77dbc5fe15a539eed..0d7201359f38694097948a3acb2660776a437fdf 100644 --- a/R/splat-estimate.R +++ b/R/splat-estimate.R @@ -18,9 +18,10 @@ #' @examples #' # Load example data #' library(scater) -#' data("sc_example_counts") +#' set.seed(1) +#' sce <- mockSCE() #' -#' params <- splatEstimate(sc_example_counts) +#' params <- splatEstimate(sce) #' params #' @export splatEstimate <- function(counts, params = newSplatParams()) { diff --git a/R/zinb-estimate.R b/R/zinb-estimate.R index 524b2c4e648266fb18104f70e1f3d502428f2d37..38d3acb143521f9bb891b76e6218142c8ded818d 100644 --- a/R/zinb-estimate.R +++ b/R/zinb-estimate.R @@ -28,14 +28,15 @@ #' @return ZINBParams object containing the estimated parameters. #' #' @examples -#' \dontrun{ -#' # Load example data -#' library(scater) -#' data("sc_example_counts") +#' if (requireNamespace("zinbwave", quietly = TRUE)) { +#' library(scater) +#' set.seed(1) +#' sce <- mockSCE(ncells = 20, ngenes = 100) #' -#' params <- zinbEstimate(sc_example_counts) -#' params +#' params <- zinbEstimate(sce) +#' params #' } +#' #' @importFrom BiocParallel SerialParam #' @export zinbEstimate <- function(counts, design.samples = NULL, design.genes = NULL, diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index bb38d29801e2edbbe148b0def4ff1719ceb85f50..7dee99d299c98497b5e0eaa9c352a24003b9ef47 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/articles/index.html b/docs/articles/index.html index f756321e8a8989320bd88996cbabba2d8e276ecb..dc87dfc3d2ccb8c0dfbe1ac187b040e2cab16484 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/articles/splat_params.html b/docs/articles/splat_params.html index 054323ebc909ce25312cf5968bfff7f1827abab6..66f02796940c5d8570c08697c5c8f122cd96ee20 100644 --- a/docs/articles/splat_params.html +++ b/docs/articles/splat_params.html @@ -37,7 +37,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -103,69 +103,70 @@ <p>This vignette describes the Splat simulation model and the parameters it uses in more detail.</p> <div class="sourceCode" id="cb1"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb1-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"splatter"</span>)</a> -<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co">#> Loading required package: SingleCellExperiment</span></a> -<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co">#> Loading required package: SummarizedExperiment</span></a> -<a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co">#> Loading required package: GenomicRanges</span></a> -<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co">#> Loading required package: stats4</span></a> -<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co">#> Loading required package: BiocGenerics</span></a> -<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co">#> Loading required package: parallel</span></a> -<a class="sourceLine" id="cb1-8" data-line-number="8"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co">#> Attaching package: 'BiocGenerics'</span></a> -<a class="sourceLine" id="cb1-10" data-line-number="10"><span class="co">#> The following objects are masked from 'package:parallel':</span></a> +<a class="sourceLine" id="cb1-2" data-line-number="2"><span class="co">#> Warning: package 'splatter' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-3" data-line-number="3"><span class="co">#> Loading required package: SingleCellExperiment</span></a> +<a class="sourceLine" id="cb1-4" data-line-number="4"><span class="co">#> Warning: package 'SingleCellExperiment' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-5" data-line-number="5"><span class="co">#> Loading required package: SummarizedExperiment</span></a> +<a class="sourceLine" id="cb1-6" data-line-number="6"><span class="co">#> Warning: package 'SummarizedExperiment' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-7" data-line-number="7"><span class="co">#> Loading required package: GenomicRanges</span></a> +<a class="sourceLine" id="cb1-8" data-line-number="8"><span class="co">#> Loading required package: stats4</span></a> +<a class="sourceLine" id="cb1-9" data-line-number="9"><span class="co">#> Loading required package: BiocGenerics</span></a> +<a class="sourceLine" id="cb1-10" data-line-number="10"><span class="co">#> Loading required package: parallel</span></a> <a class="sourceLine" id="cb1-11" data-line-number="11"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-12" data-line-number="12"><span class="co">#> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,</span></a> -<a class="sourceLine" id="cb1-13" data-line-number="13"><span class="co">#> clusterExport, clusterMap, parApply, parCapply, parLapply,</span></a> -<a class="sourceLine" id="cb1-14" data-line-number="14"><span class="co">#> parLapplyLB, parRapply, parSapply, parSapplyLB</span></a> -<a class="sourceLine" id="cb1-15" data-line-number="15"><span class="co">#> The following objects are masked from 'package:stats':</span></a> -<a class="sourceLine" id="cb1-16" data-line-number="16"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-17" data-line-number="17"><span class="co">#> IQR, mad, sd, var, xtabs</span></a> -<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co">#> The following objects are masked from 'package:base':</span></a> +<a class="sourceLine" id="cb1-12" data-line-number="12"><span class="co">#> Attaching package: 'BiocGenerics'</span></a> +<a class="sourceLine" id="cb1-13" data-line-number="13"><span class="co">#> The following objects are masked from 'package:parallel':</span></a> +<a class="sourceLine" id="cb1-14" data-line-number="14"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-15" data-line-number="15"><span class="co">#> clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,</span></a> +<a class="sourceLine" id="cb1-16" data-line-number="16"><span class="co">#> clusterExport, clusterMap, parApply, parCapply, parLapply,</span></a> +<a class="sourceLine" id="cb1-17" data-line-number="17"><span class="co">#> parLapplyLB, parRapply, parSapply, parSapplyLB</span></a> +<a class="sourceLine" id="cb1-18" data-line-number="18"><span class="co">#> The following objects are masked from 'package:stats':</span></a> <a class="sourceLine" id="cb1-19" data-line-number="19"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-20" data-line-number="20"><span class="co">#> anyDuplicated, append, as.data.frame, basename, cbind,</span></a> -<a class="sourceLine" id="cb1-21" data-line-number="21"><span class="co">#> colnames, dirname, do.call, duplicated, eval, evalq, Filter,</span></a> -<a class="sourceLine" id="cb1-22" data-line-number="22"><span class="co">#> Find, get, grep, grepl, intersect, is.unsorted, lapply, Map,</span></a> -<a class="sourceLine" id="cb1-23" data-line-number="23"><span class="co">#> mapply, match, mget, order, paste, pmax, pmax.int, pmin,</span></a> -<a class="sourceLine" id="cb1-24" data-line-number="24"><span class="co">#> pmin.int, Position, rank, rbind, Reduce, rownames, sapply,</span></a> -<a class="sourceLine" id="cb1-25" data-line-number="25"><span class="co">#> setdiff, sort, table, tapply, union, unique, unsplit, which,</span></a> -<a class="sourceLine" id="cb1-26" data-line-number="26"><span class="co">#> which.max, which.min</span></a> -<a class="sourceLine" id="cb1-27" data-line-number="27"><span class="co">#> Loading required package: S4Vectors</span></a> -<a class="sourceLine" id="cb1-28" data-line-number="28"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-29" data-line-number="29"><span class="co">#> Attaching package: 'S4Vectors'</span></a> -<a class="sourceLine" id="cb1-30" data-line-number="30"><span class="co">#> The following object is masked from 'package:base':</span></a> -<a class="sourceLine" id="cb1-31" data-line-number="31"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-32" data-line-number="32"><span class="co">#> expand.grid</span></a> -<a class="sourceLine" id="cb1-33" data-line-number="33"><span class="co">#> Loading required package: IRanges</span></a> -<a class="sourceLine" id="cb1-34" data-line-number="34"><span class="co">#> Loading required package: GenomeInfoDb</span></a> -<a class="sourceLine" id="cb1-35" data-line-number="35"><span class="co">#> Loading required package: Biobase</span></a> -<a class="sourceLine" id="cb1-36" data-line-number="36"><span class="co">#> Welcome to Bioconductor</span></a> -<a class="sourceLine" id="cb1-37" data-line-number="37"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-38" data-line-number="38"><span class="co">#> Vignettes contain introductory material; view with</span></a> -<a class="sourceLine" id="cb1-39" data-line-number="39"><span class="co">#> 'browseVignettes()'. To cite Bioconductor, see</span></a> -<a class="sourceLine" id="cb1-40" data-line-number="40"><span class="co">#> 'citation("Biobase")', and for packages 'citation("pkgname")'.</span></a> -<a class="sourceLine" id="cb1-41" data-line-number="41"><span class="co">#> Loading required package: DelayedArray</span></a> -<a class="sourceLine" id="cb1-42" data-line-number="42"><span class="co">#> Loading required package: matrixStats</span></a> -<a class="sourceLine" id="cb1-43" data-line-number="43"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-44" data-line-number="44"><span class="co">#> Attaching package: 'matrixStats'</span></a> -<a class="sourceLine" id="cb1-45" data-line-number="45"><span class="co">#> The following objects are masked from 'package:Biobase':</span></a> -<a class="sourceLine" id="cb1-46" data-line-number="46"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-47" data-line-number="47"><span class="co">#> anyMissing, rowMedians</span></a> -<a class="sourceLine" id="cb1-48" data-line-number="48"><span class="co">#> Loading required package: BiocParallel</span></a> -<a class="sourceLine" id="cb1-49" data-line-number="49"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-50" data-line-number="50"><span class="co">#> Attaching package: 'DelayedArray'</span></a> -<a class="sourceLine" id="cb1-51" data-line-number="51"><span class="co">#> The following objects are masked from 'package:matrixStats':</span></a> -<a class="sourceLine" id="cb1-52" data-line-number="52"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-53" data-line-number="53"><span class="co">#> colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges</span></a> -<a class="sourceLine" id="cb1-54" data-line-number="54"><span class="co">#> The following objects are masked from 'package:base':</span></a> -<a class="sourceLine" id="cb1-55" data-line-number="55"><span class="co">#> </span></a> -<a class="sourceLine" id="cb1-56" data-line-number="56"><span class="co">#> aperm, apply, rowsum</span></a> -<a class="sourceLine" id="cb1-57" data-line-number="57"><span class="co">#> Registered S3 methods overwritten by 'ggplot2':</span></a> -<a class="sourceLine" id="cb1-58" data-line-number="58"><span class="co">#> method from </span></a> -<a class="sourceLine" id="cb1-59" data-line-number="59"><span class="co">#> [.quosures rlang</span></a> -<a class="sourceLine" id="cb1-60" data-line-number="60"><span class="co">#> c.quosures rlang</span></a> -<a class="sourceLine" id="cb1-61" data-line-number="61"><span class="co">#> print.quosures rlang</span></a> +<a class="sourceLine" id="cb1-20" data-line-number="20"><span class="co">#> IQR, mad, sd, var, xtabs</span></a> +<a class="sourceLine" id="cb1-21" data-line-number="21"><span class="co">#> The following objects are masked from 'package:base':</span></a> +<a class="sourceLine" id="cb1-22" data-line-number="22"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-23" data-line-number="23"><span class="co">#> anyDuplicated, append, as.data.frame, basename, cbind,</span></a> +<a class="sourceLine" id="cb1-24" data-line-number="24"><span class="co">#> colnames, dirname, do.call, duplicated, eval, evalq, Filter,</span></a> +<a class="sourceLine" id="cb1-25" data-line-number="25"><span class="co">#> Find, get, grep, grepl, intersect, is.unsorted, lapply, Map,</span></a> +<a class="sourceLine" id="cb1-26" data-line-number="26"><span class="co">#> mapply, match, mget, order, paste, pmax, pmax.int, pmin,</span></a> +<a class="sourceLine" id="cb1-27" data-line-number="27"><span class="co">#> pmin.int, Position, rank, rbind, Reduce, rownames, sapply,</span></a> +<a class="sourceLine" id="cb1-28" data-line-number="28"><span class="co">#> setdiff, sort, table, tapply, union, unique, unsplit, which,</span></a> +<a class="sourceLine" id="cb1-29" data-line-number="29"><span class="co">#> which.max, which.min</span></a> +<a class="sourceLine" id="cb1-30" data-line-number="30"><span class="co">#> Loading required package: S4Vectors</span></a> +<a class="sourceLine" id="cb1-31" data-line-number="31"><span class="co">#> Warning: package 'S4Vectors' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-32" data-line-number="32"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-33" data-line-number="33"><span class="co">#> Attaching package: 'S4Vectors'</span></a> +<a class="sourceLine" id="cb1-34" data-line-number="34"><span class="co">#> The following object is masked from 'package:base':</span></a> +<a class="sourceLine" id="cb1-35" data-line-number="35"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-36" data-line-number="36"><span class="co">#> expand.grid</span></a> +<a class="sourceLine" id="cb1-37" data-line-number="37"><span class="co">#> Loading required package: IRanges</span></a> +<a class="sourceLine" id="cb1-38" data-line-number="38"><span class="co">#> Loading required package: GenomeInfoDb</span></a> +<a class="sourceLine" id="cb1-39" data-line-number="39"><span class="co">#> Loading required package: Biobase</span></a> +<a class="sourceLine" id="cb1-40" data-line-number="40"><span class="co">#> Welcome to Bioconductor</span></a> +<a class="sourceLine" id="cb1-41" data-line-number="41"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-42" data-line-number="42"><span class="co">#> Vignettes contain introductory material; view with</span></a> +<a class="sourceLine" id="cb1-43" data-line-number="43"><span class="co">#> 'browseVignettes()'. To cite Bioconductor, see</span></a> +<a class="sourceLine" id="cb1-44" data-line-number="44"><span class="co">#> 'citation("Biobase")', and for packages 'citation("pkgname")'.</span></a> +<a class="sourceLine" id="cb1-45" data-line-number="45"><span class="co">#> Loading required package: DelayedArray</span></a> +<a class="sourceLine" id="cb1-46" data-line-number="46"><span class="co">#> Loading required package: matrixStats</span></a> +<a class="sourceLine" id="cb1-47" data-line-number="47"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-48" data-line-number="48"><span class="co">#> Attaching package: 'matrixStats'</span></a> +<a class="sourceLine" id="cb1-49" data-line-number="49"><span class="co">#> The following objects are masked from 'package:Biobase':</span></a> +<a class="sourceLine" id="cb1-50" data-line-number="50"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-51" data-line-number="51"><span class="co">#> anyMissing, rowMedians</span></a> +<a class="sourceLine" id="cb1-52" data-line-number="52"><span class="co">#> Loading required package: BiocParallel</span></a> +<a class="sourceLine" id="cb1-53" data-line-number="53"><span class="co">#> Warning: package 'BiocParallel' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-54" data-line-number="54"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-55" data-line-number="55"><span class="co">#> Attaching package: 'DelayedArray'</span></a> +<a class="sourceLine" id="cb1-56" data-line-number="56"><span class="co">#> The following objects are masked from 'package:matrixStats':</span></a> +<a class="sourceLine" id="cb1-57" data-line-number="57"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-58" data-line-number="58"><span class="co">#> colMaxs, colMins, colRanges, rowMaxs, rowMins, rowRanges</span></a> +<a class="sourceLine" id="cb1-59" data-line-number="59"><span class="co">#> The following objects are masked from 'package:base':</span></a> +<a class="sourceLine" id="cb1-60" data-line-number="60"><span class="co">#> </span></a> +<a class="sourceLine" id="cb1-61" data-line-number="61"><span class="co">#> aperm, apply, rowsum</span></a> <a class="sourceLine" id="cb1-62" data-line-number="62"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"scater"</span>)</a> -<a class="sourceLine" id="cb1-63" data-line-number="63"><span class="co">#> Loading required package: ggplot2</span></a> -<a class="sourceLine" id="cb1-64" data-line-number="64"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"ggplot2"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb1-63" data-line-number="63"><span class="co">#> Warning: package 'scater' was built under R version 3.6.1</span></a> +<a class="sourceLine" id="cb1-64" data-line-number="64"><span class="co">#> Loading required package: ggplot2</span></a> +<a class="sourceLine" id="cb1-65" data-line-number="65"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"ggplot2"</span>)</a></code></pre></div> <div id="the-base-splat-model" class="section level1"> <h1 class="hasAnchor"> <a href="#the-base-splat-model" class="anchor"></a>The base Splat model</h1> @@ -189,7 +190,7 @@ <a class="sourceLine" id="cb2-5" data-line-number="5"><span class="co">#> </span></a> <a class="sourceLine" id="cb2-6" data-line-number="6"><span class="co">#> Global: </span></a> <a class="sourceLine" id="cb2-7" data-line-number="7"><span class="co">#> (Genes) (Cells) [Seed] </span></a> -<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co">#> 10000 100 243223 </span></a> +<a class="sourceLine" id="cb2-8" data-line-number="8"><span class="co">#> 10000 100 575939 </span></a> <a class="sourceLine" id="cb2-9" data-line-number="9"><span class="co">#> </span></a> <a class="sourceLine" id="cb2-10" data-line-number="10"><span class="co">#> 28 additional parameters </span></a> <a class="sourceLine" id="cb2-11" data-line-number="11"><span class="co">#> </span></a> @@ -277,7 +278,10 @@ <a class="sourceLine" id="cb4-4" data-line-number="4"><span class="co"># PCA plot using scater</span></a> <a class="sourceLine" id="cb4-5" data-line-number="5">sim <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim)</a> <a class="sourceLine" id="cb4-6" data-line-number="6"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb4-7" data-line-number="7"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb4-8" data-line-number="8"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb4-9" data-line-number="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a> +<a class="sourceLine" id="cb4-10" data-line-number="10"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/batches-1.png" width="700"></p> </div> <div id="batch-facloc---batch-factor-location-and-batch-facscale---batch-factor-scale" class="section level3"> @@ -290,7 +294,10 @@ <a class="sourceLine" id="cb5-4" data-line-number="4"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb5-5" data-line-number="5">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb5-6" data-line-number="6"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Small batch effects"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb5-7" data-line-number="7"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb5-8" data-line-number="8"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb5-9" data-line-number="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Small batch effects"</span>)</a> +<a class="sourceLine" id="cb5-10" data-line-number="10"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/batch-factors-1.png" width="700"></p> <div class="sourceCode" id="cb6"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb6-1" data-line-number="1"></a> <a class="sourceLine" id="cb6-2" data-line-number="2"><span class="co"># Simulation with big batch effects</span></a> @@ -299,7 +306,11 @@ <a class="sourceLine" id="cb6-5" data-line-number="5"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb6-6" data-line-number="6">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb6-7" data-line-number="7"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb6-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Big batch effects"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb6-8" data-line-number="8"></a> +<a class="sourceLine" id="cb6-9" data-line-number="9"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb6-10" data-line-number="10"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb6-11" data-line-number="11"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Big batch effects"</span>)</a> +<a class="sourceLine" id="cb6-12" data-line-number="12"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/batch-factors-2.png" width="700"></p> </div> </div> @@ -338,18 +349,18 @@ <p>This parameter controls the probability that genes will be selected to be expression outliers. Higher values will results in more outlier genes.</p> <div class="sourceCode" id="cb7"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb7-1" data-line-number="1"><span class="co"># Few outliers</span></a> <a class="sourceLine" id="cb7-2" data-line-number="2">sim1 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">out.prob =</span> <span class="fl">0.001</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb7-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/as.data.frame">as.data.frame</a></span>(<span class="kw">rowData</span>(sim1)),</a> -<a class="sourceLine" id="cb7-4" data-line-number="4"> <span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">x =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Log">log10</a></span>(GeneMean), <span class="dt">fill =</span> OutlierFactor <span class="op">!=</span><span class="st"> </span><span class="dv">1</span>)) <span class="op">+</span></a> -<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/geom_histogram">geom_histogram</a></span>(<span class="dt">bins =</span> <span class="dv">100</span>) <span class="op">+</span></a> -<a class="sourceLine" id="cb7-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Few outliers"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb7-3" data-line-number="3"><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/as.data.frame">as.data.frame</a></span>(<span class="kw">rowData</span>(sim1)),</a> +<a class="sourceLine" id="cb7-4" data-line-number="4"> <span class="kw"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="dt">x =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Log">log10</a></span>(GeneMean), <span class="dt">fill =</span> OutlierFactor <span class="op">!=</span><span class="st"> </span><span class="dv">1</span>)) <span class="op">+</span></a> +<a class="sourceLine" id="cb7-5" data-line-number="5"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/geom_histogram.html">geom_histogram</a></span>(<span class="dt">bins =</span> <span class="dv">100</span>) <span class="op">+</span></a> +<a class="sourceLine" id="cb7-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Few outliers"</span>)</a></code></pre></div> <p><img src="splat_params_files/figure-html/outlier-prob-1.png" width="700"></p> <div class="sourceCode" id="cb8"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb8-1" data-line-number="1"></a> <a class="sourceLine" id="cb8-2" data-line-number="2"><span class="co"># Lots of outliers</span></a> <a class="sourceLine" id="cb8-3" data-line-number="3">sim2 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">out.prob =</span> <span class="fl">0.2</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/as.data.frame">as.data.frame</a></span>(<span class="kw">rowData</span>(sim2)),</a> -<a class="sourceLine" id="cb8-5" data-line-number="5"> <span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">x =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Log">log10</a></span>(GeneMean), <span class="dt">fill =</span> OutlierFactor <span class="op">!=</span><span class="st"> </span><span class="dv">1</span>)) <span class="op">+</span></a> -<a class="sourceLine" id="cb8-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/geom_histogram">geom_histogram</a></span>(<span class="dt">bins =</span> <span class="dv">100</span>) <span class="op">+</span></a> -<a class="sourceLine" id="cb8-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Lots of outliers"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb8-4" data-line-number="4"><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/as.data.frame">as.data.frame</a></span>(<span class="kw">rowData</span>(sim2)),</a> +<a class="sourceLine" id="cb8-5" data-line-number="5"> <span class="kw"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="dt">x =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Log">log10</a></span>(GeneMean), <span class="dt">fill =</span> OutlierFactor <span class="op">!=</span><span class="st"> </span><span class="dv">1</span>)) <span class="op">+</span></a> +<a class="sourceLine" id="cb8-6" data-line-number="6"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/geom_histogram.html">geom_histogram</a></span>(<span class="dt">bins =</span> <span class="dv">100</span>) <span class="op">+</span></a> +<a class="sourceLine" id="cb8-7" data-line-number="7"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Lots of outliers"</span>)</a></code></pre></div> <p><img src="splat_params_files/figure-html/outlier-prob-2.png" width="700"></p> </div> <div id="out-facloc---expression-outlier-factor-location-and-out-facscale---expression-outlier-factor-scale" class="section level3"> @@ -378,7 +389,10 @@ <a class="sourceLine" id="cb9-5" data-line-number="5"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb9-6" data-line-number="6">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb9-7" data-line-number="7"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb9-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"One small group, one big group"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb9-8" data-line-number="8"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb9-9" data-line-number="9"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb9-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"One small group, one big group"</span>)</a> +<a class="sourceLine" id="cb9-11" data-line-number="11"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/groups-1.png" width="700"></p> <div class="sourceCode" id="cb10"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb10-1" data-line-number="1"></a> <a class="sourceLine" id="cb10-2" data-line-number="2"><span class="co"># Five groups</span></a> @@ -387,7 +401,11 @@ <a class="sourceLine" id="cb10-5" data-line-number="5"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb10-6" data-line-number="6">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb10-7" data-line-number="7"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb10-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Five groups"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb10-8" data-line-number="8"></a> +<a class="sourceLine" id="cb10-9" data-line-number="9"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb10-10" data-line-number="10"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb10-11" data-line-number="11"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Five groups"</span>)</a> +<a class="sourceLine" id="cb10-12" data-line-number="12"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/groups-2.png" width="700"></p> <p><strong>Note:</strong> Once there are more than three or four groups it becomes difficult to properly view them in PCA space. We use PCA here for simplicity but generally a non-linear dimensionality reduction such as t-SNE or UMAP is a more useful way to visualise the groups.</p> </div> @@ -405,7 +423,10 @@ <a class="sourceLine" id="cb11-3" data-line-number="3"> <span class="dt">de.prob =</span> <span class="fl">0.01</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb11-4" data-line-number="4">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb11-5" data-line-number="5"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb11-6" data-line-number="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Few DE genes"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb11-6" data-line-number="6"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb11-7" data-line-number="7"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb11-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Few DE genes"</span>)</a> +<a class="sourceLine" id="cb11-9" data-line-number="9"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/de-prob-1.png" width="700"></p> <div class="sourceCode" id="cb12"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb12-1" data-line-number="1"></a> <a class="sourceLine" id="cb12-2" data-line-number="2"><span class="co"># Lots of DE genes</span></a> @@ -413,7 +434,11 @@ <a class="sourceLine" id="cb12-4" data-line-number="4"> <span class="dt">de.prob =</span> <span class="fl">0.3</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb12-5" data-line-number="5">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb12-6" data-line-number="6"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb12-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Lots of DE genes"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb12-7" data-line-number="7"></a> +<a class="sourceLine" id="cb12-8" data-line-number="8"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb12-9" data-line-number="9"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb12-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Lots of DE genes"</span>)</a> +<a class="sourceLine" id="cb12-11" data-line-number="11"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/de-prob-2.png" width="700"></p> </div> <div id="de-downprob---down-regulation-probability" class="section level3"> @@ -430,7 +455,10 @@ <a class="sourceLine" id="cb13-3" data-line-number="3"> <span class="dt">de.facLoc =</span> <span class="fl">0.01</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb13-4" data-line-number="4">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb13-5" data-line-number="5"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Small DE factors"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb13-6" data-line-number="6"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb13-7" data-line-number="7"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb13-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Small DE factors"</span>)</a> +<a class="sourceLine" id="cb13-9" data-line-number="9"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/de-factors-1.png" width="700"></p> <div class="sourceCode" id="cb14"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb14-1" data-line-number="1"></a> <a class="sourceLine" id="cb14-2" data-line-number="2"><span class="co"># Big DE factors</span></a> @@ -438,7 +466,11 @@ <a class="sourceLine" id="cb14-4" data-line-number="4"> <span class="dt">de.facLoc =</span> <span class="fl">0.3</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb14-5" data-line-number="5">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb14-6" data-line-number="6"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb14-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Big DE factors"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb14-7" data-line-number="7"></a> +<a class="sourceLine" id="cb14-8" data-line-number="8"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb14-9" data-line-number="9"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb14-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Big DE factors"</span>)</a> +<a class="sourceLine" id="cb14-11" data-line-number="11"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/de-factors-2.png" width="700"></p> <p>Just looking at the PCA plots this effect seems similar to adjusting <code>de.prob</code> but the effect is achieved in a different way. A higher <code>de.prob</code> means that more genes are differentially expressed but changing the DE factors changes the level of DE for the same number of genes.</p> </div> @@ -453,11 +485,14 @@ <a class="sourceLine" id="cb15-5" data-line-number="5"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb15-6" data-line-number="6">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb15-7" data-line-number="7"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb15-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> -<a class="sourceLine" id="cb15-9" data-line-number="9"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE probabilities"</span>,</a> -<a class="sourceLine" id="cb15-10" data-line-number="10"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Groups 1 and 2 have very few DE genes,"</span>,</a> -<a class="sourceLine" id="cb15-11" data-line-number="11"> <span class="st">"Groups 3 and 4 have the default number,"</span>,</a> -<a class="sourceLine" id="cb15-12" data-line-number="12"> <span class="st">"Group 5 has many DE genes"</span>))</a></code></pre></div> +<a class="sourceLine" id="cb15-8" data-line-number="8"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb15-9" data-line-number="9"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb15-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> +<a class="sourceLine" id="cb15-11" data-line-number="11"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE probabilities"</span>,</a> +<a class="sourceLine" id="cb15-12" data-line-number="12"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Groups 1 and 2 have very few DE genes,"</span>,</a> +<a class="sourceLine" id="cb15-13" data-line-number="13"> <span class="st">"Groups 3 and 4 have the default number,"</span>,</a> +<a class="sourceLine" id="cb15-14" data-line-number="14"> <span class="st">"Group 5 has many DE genes"</span>))</a> +<a class="sourceLine" id="cb15-15" data-line-number="15"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/complex-de-1.png" width="700"></p> <div class="sourceCode" id="cb16"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb16-1" data-line-number="1"> </a> <a class="sourceLine" id="cb16-2" data-line-number="2"></a> @@ -469,14 +504,18 @@ <a class="sourceLine" id="cb16-8" data-line-number="8"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb16-9" data-line-number="9">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb16-10" data-line-number="10"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb16-11" data-line-number="11"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> -<a class="sourceLine" id="cb16-12" data-line-number="12"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE factors"</span>,</a> -<a class="sourceLine" id="cb16-13" data-line-number="13"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Group 1 has factors with small location (value),"</span>,</a> -<a class="sourceLine" id="cb16-14" data-line-number="14"> <span class="st">"and scale (variability),"</span>,</a> -<a class="sourceLine" id="cb16-15" data-line-number="15"> <span class="st">"Group 2 has small location and greater scale.</span><span class="ch">\n</span><span class="st">"</span>,</a> -<a class="sourceLine" id="cb16-16" data-line-number="16"> <span class="st">"Groups 3 and 4 have greater location with small,"</span>,</a> -<a class="sourceLine" id="cb16-17" data-line-number="17"> <span class="st">"and large scales"</span>,</a> -<a class="sourceLine" id="cb16-18" data-line-number="18"> <span class="st">"Group 5 has bigger factors with moderate variability"</span>))</a></code></pre></div> +<a class="sourceLine" id="cb16-11" data-line-number="11"></a> +<a class="sourceLine" id="cb16-12" data-line-number="12"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb16-13" data-line-number="13"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb16-14" data-line-number="14"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> +<a class="sourceLine" id="cb16-15" data-line-number="15"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE factors"</span>,</a> +<a class="sourceLine" id="cb16-16" data-line-number="16"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(<span class="st">"Group 1 has factors with small location (value),"</span>,</a> +<a class="sourceLine" id="cb16-17" data-line-number="17"> <span class="st">"and scale (variability),"</span>,</a> +<a class="sourceLine" id="cb16-18" data-line-number="18"> <span class="st">"Group 2 has small location and greater scale.</span><span class="ch">\n</span><span class="st">"</span>,</a> +<a class="sourceLine" id="cb16-19" data-line-number="19"> <span class="st">"Groups 3 and 4 have greater location with small,"</span>,</a> +<a class="sourceLine" id="cb16-20" data-line-number="20"> <span class="st">"and large scales"</span>,</a> +<a class="sourceLine" id="cb16-21" data-line-number="21"> <span class="st">"Group 5 has bigger factors with moderate variability"</span>))</a> +<a class="sourceLine" id="cb16-22" data-line-number="22"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/complex-de-2.png" width="700"></p> <div class="sourceCode" id="cb17"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb17-1" data-line-number="1"></a> <a class="sourceLine" id="cb17-2" data-line-number="2"><span class="co"># Combination of everything</span></a> @@ -489,15 +528,19 @@ <a class="sourceLine" id="cb17-9" data-line-number="9"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb17-10" data-line-number="10">sim3 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim3)</a> <a class="sourceLine" id="cb17-11" data-line-number="11"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb17-12" data-line-number="12"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim3, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> -<a class="sourceLine" id="cb17-13" data-line-number="13"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE factors"</span>,</a> -<a class="sourceLine" id="cb17-14" data-line-number="14"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(</a> -<a class="sourceLine" id="cb17-15" data-line-number="15"> <span class="st">"Group 1 is small with many very up-regulated DE genes,"</span>,</a> -<a class="sourceLine" id="cb17-16" data-line-number="16"> <span class="st">"Group 2 has the default DE parameters,</span><span class="ch">\n</span><span class="st">"</span>,</a> -<a class="sourceLine" id="cb17-17" data-line-number="17"> <span class="st">"Group 3 has many down-regulated DE genes,"</span>,</a> -<a class="sourceLine" id="cb17-18" data-line-number="18"> <span class="st">"Group 4 has very few DE genes,"</span>,</a> -<a class="sourceLine" id="cb17-19" data-line-number="19"> <span class="st">"Group 5 is large with moderate DE factors"</span>)</a> -<a class="sourceLine" id="cb17-20" data-line-number="20"> )</a></code></pre></div> +<a class="sourceLine" id="cb17-12" data-line-number="12"></a> +<a class="sourceLine" id="cb17-13" data-line-number="13"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb17-14" data-line-number="14"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb17-15" data-line-number="15"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim3, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span></a> +<a class="sourceLine" id="cb17-16" data-line-number="16"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">labs</a></span>(<span class="dt">title =</span> <span class="st">"Different DE factors"</span>,</a> +<a class="sourceLine" id="cb17-17" data-line-number="17"> <span class="dt">caption =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/paste">paste</a></span>(</a> +<a class="sourceLine" id="cb17-18" data-line-number="18"> <span class="st">"Group 1 is small with many very up-regulated DE genes,"</span>,</a> +<a class="sourceLine" id="cb17-19" data-line-number="19"> <span class="st">"Group 2 has the default DE parameters,</span><span class="ch">\n</span><span class="st">"</span>,</a> +<a class="sourceLine" id="cb17-20" data-line-number="20"> <span class="st">"Group 3 has many down-regulated DE genes,"</span>,</a> +<a class="sourceLine" id="cb17-21" data-line-number="21"> <span class="st">"Group 4 has very few DE genes,"</span>,</a> +<a class="sourceLine" id="cb17-22" data-line-number="22"> <span class="st">"Group 5 is large with moderate DE factors"</span>)</a> +<a class="sourceLine" id="cb17-23" data-line-number="23"> )</a> +<a class="sourceLine" id="cb17-24" data-line-number="24"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/complex-de-3.png" width="700"></p> </div> </div> @@ -547,7 +590,10 @@ <a class="sourceLine" id="cb18-6" data-line-number="6"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb18-7" data-line-number="7">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb18-8" data-line-number="8"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb18-9" data-line-number="9"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Linear paths"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb18-9" data-line-number="9"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb18-10" data-line-number="10"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb18-11" data-line-number="11"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Linear paths"</span>)</a> +<a class="sourceLine" id="cb18-12" data-line-number="12"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/paths-1.png" width="700"></p> <div class="sourceCode" id="cb19"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb19-1" data-line-number="1"></a> <a class="sourceLine" id="cb19-2" data-line-number="2"><span class="co"># Branching path</span></a> @@ -558,7 +604,11 @@ <a class="sourceLine" id="cb19-7" data-line-number="7"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb19-8" data-line-number="8">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb19-9" data-line-number="9"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb19-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Branching path"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb19-10" data-line-number="10"></a> +<a class="sourceLine" id="cb19-11" data-line-number="11"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb19-12" data-line-number="12"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb19-13" data-line-number="13"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Group"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Branching path"</span>)</a> +<a class="sourceLine" id="cb19-14" data-line-number="14"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/paths-2.png" width="700"></p> </div> <div id="path-nsteps---number-of-steps" class="section level3"> @@ -570,7 +620,10 @@ <a class="sourceLine" id="cb20-3" data-line-number="3"> <span class="dt">de.prob =</span> <span class="fl">0.5</span>, <span class="dt">de.facLoc =</span> <span class="fl">0.2</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb20-4" data-line-number="4">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb20-5" data-line-number="5"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb20-6" data-line-number="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Few steps"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb20-6" data-line-number="6"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb20-7" data-line-number="7"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb20-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Few steps"</span>)</a> +<a class="sourceLine" id="cb20-9" data-line-number="9"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/paths-steps-1.png" width="700"></p> <div class="sourceCode" id="cb21"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb21-1" data-line-number="1"></a> <a class="sourceLine" id="cb21-2" data-line-number="2"><span class="co"># Lots of steps</span></a> @@ -578,7 +631,11 @@ <a class="sourceLine" id="cb21-4" data-line-number="4"> <span class="dt">de.prob =</span> <span class="fl">0.5</span>, <span class="dt">de.facLoc =</span> <span class="fl">0.2</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb21-5" data-line-number="5">sim2 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim2)</a> <a class="sourceLine" id="cb21-6" data-line-number="6"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb21-7" data-line-number="7"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Lots of steps"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb21-7" data-line-number="7"></a> +<a class="sourceLine" id="cb21-8" data-line-number="8"><span class="co">#> Warning in .local(object, ...): 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb21-9" data-line-number="9"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb21-10" data-line-number="10"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim2, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Lots of steps"</span>)</a> +<a class="sourceLine" id="cb21-11" data-line-number="11"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/paths-steps-2.png" width="700"></p> </div> <div id="path-skew---path-skew" class="section level3"> @@ -590,7 +647,10 @@ <a class="sourceLine" id="cb22-3" data-line-number="3"> <span class="dt">de.prob =</span> <span class="fl">0.5</span>, <span class="dt">de.facLoc =</span> <span class="fl">0.2</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> <a class="sourceLine" id="cb22-4" data-line-number="4">sim1 <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim1)</a> <a class="sourceLine" id="cb22-5" data-line-number="5"><span class="co">#> Warning in .local(object, ...): using library sizes as size factors</span></a> -<a class="sourceLine" id="cb22-6" data-line-number="6"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/labs">ggtitle</a></span>(<span class="st">"Skewed towards the end"</span>)</a></code></pre></div> +<a class="sourceLine" id="cb22-6" data-line-number="6"><span class="co">#> Warning: 'centreSizeFactors' is deprecated.</span></a> +<a class="sourceLine" id="cb22-7" data-line-number="7"><span class="co">#> See help("Deprecated")</span></a> +<a class="sourceLine" id="cb22-8" data-line-number="8"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim1, <span class="dt">colour_by =</span> <span class="st">"Step"</span>) <span class="op">+</span><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/labs.html">ggtitle</a></span>(<span class="st">"Skewed towards the end"</span>)</a> +<a class="sourceLine" id="cb22-9" data-line-number="9"><span class="co">#> Warning: call 'runPCA' explicitly to compute results</span></a></code></pre></div> <p><img src="splat_params_files/figure-html/paths-skew-1.png" width="700"></p> </div> <div id="path-nonlinearprob---non-linear-probability" class="section level3"> 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 5a5df1babc8264c1d1006ef90ba6042d0afe0e70..9e5354112ee278d4951dea75d4476e841ce05138 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 381364ea6ef6c479b9f4e98e62305cdf1c48b23f..f51dc890f95e32876043f32e38f2bdbf2ee1ab45 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 e27f83b040c87be11f913c72145d06611d567503..475a21bd2d9975c5944ccbbc05496057888c3e18 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 42282bf8385875e9df424a2ad63421479adffabc..0050bbafb245fb5a64f922f18b7c4f7a789118fe 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 6cddaa7f14a444ff55d489bcf71f33bb4e7b9243..6d89c06ba9cc65f83ec4fd65bd340015002ac95b 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 ba9c4680a7a9ed8f8ee2e786e43b98b3e236155c..1a407860f20ad5e23568919c6f596cede9630eb9 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 f27e1c95a0fbbc7c8adeb98bf1d00c1c161a5f9b..a1ce72eede6f89b666bb97c7524d767a8b921311 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 c8881287100f049613c87b574a337bc0754d2fa1..ed8ee7891a2ca459509da925f7219c45690e1b29 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 ca1258787198552d50effe5bf3e67f963f4e6e7b..7fb3672e6a617b52cde5a3911d6012243546e166 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 c0edd5183e1a8b073d98072a36f1103bc32f2cc3..eca61021e68a43d66370c006418488977cb5a8d6 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 f97481d6afdd16659f2e5276502f61576a602b5a..51f9669165afc24c572598a68a85b7cc92df15ba 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 a300740ed00fd1dc5ce2cc29418f1bd20e5d805e..ae0f37906aef2bd4c53fdec5b7354ee7eb6ef355 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 8454dd16b5c7f0969b2a5ff607bb616ee51baa16..75e9a897ab5ae497e103413c66df002d7c62ced8 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 223ac8c9e0c760f094157854cfce7993e381382b..f467eb059e9cd1f88c9e92b921145b403193c0f8 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 e23e48e9881066ba92cec7c34e7ae617114fed0e..90d6da7a5e5d878cc9edc4bb62b87ad6b4f9a585 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 5ec5199836b60d1d740b292d322e06073e83777a..d9c417296ee3ba6d5f1564227460c492597d2355 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 738b4415a906eedfca5e8c2218d8e754338f7062..5356f25ba5a49b8e281098332acb892dd1bcac1d 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 7f2e4b3c18451f7de80a0e6b36b96b41ecf8aef8..ac6a8a92e2caf83d3e1919f1e1b50ff2fd1beb57 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 e904c719730c7dbc552b3809160e70e0fce677dc..ee0fbb8b8ff9c440b891081db620284f5e6a16a2 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 368e650ec9f8be9ac07c126f9e53f5037de2986b..a7ea371e2076657d28d7781a50576cb5f3be778b 100644 --- a/docs/articles/splatter.html +++ b/docs/articles/splatter.html @@ -37,7 +37,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -93,7 +93,7 @@ <h1>Introduction to Splatter</h1> <h4 class="author">Luke Zappia</h4> - <h4 class="date">2019-06-13</h4> + <h4 class="date">2019-08-20</h4> <small class="dont-index">Source: <a href="https://github.com/Oshlack/splatter/blob/master/vignettes/splatter.Rmd"><code>vignettes/splatter.Rmd</code></a></small> <div class="hidden name"><code>splatter.Rmd</code></div> @@ -120,11 +120,14 @@ <div id="quickstart" class="section level1"> <h1 class="hasAnchor"> <a href="#quickstart" class="anchor"></a>Quickstart</h1> -<p>Assuming you already have a matrix of count data similar to that you wish to simulate there are two simple steps to creating a simulated data set with Splatter. Here is an example using the example dataset in the <code>scater</code> package:</p> +<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> <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://www.rdocumentation.org/packages/base/topics/library">library</a></span>(splatter)</a></code></pre></div> +<pre><code>## Warning: package 'splatter' was built under R version 3.6.1</code></pre> <pre><code>## Loading required package: SingleCellExperiment</code></pre> +<pre><code>## Warning: package 'SingleCellExperiment' was built under R version 3.6.1</code></pre> <pre><code>## Loading required package: SummarizedExperiment</code></pre> +<pre><code>## Warning: package 'SummarizedExperiment' was built under R version 3.6.1</code></pre> <pre><code>## Loading required package: GenomicRanges</code></pre> <pre><code>## Loading required package: stats4</code></pre> <pre><code>## Loading required package: BiocGenerics</code></pre> @@ -149,6 +152,7 @@ ## setdiff, sort, table, tapply, union, unique, unsplit, which, ## which.max, which.min</code></pre> <pre><code>## Loading required package: S4Vectors</code></pre> +<pre><code>## Warning: package 'S4Vectors' was built under R version 3.6.1</code></pre> <pre><code>## ## Attaching package: 'S4Vectors'</code></pre> <pre><code>## The following object is masked from 'package:base': @@ -170,6 +174,7 @@ ## ## anyMissing, rowMedians</code></pre> <pre><code>## Loading required package: BiocParallel</code></pre> +<pre><code>## Warning: package 'BiocParallel' was built under R version 3.6.1</code></pre> <pre><code>## ## Attaching package: 'DelayedArray'</code></pre> <pre><code>## The following objects are masked from 'package:matrixStats': @@ -178,19 +183,18 @@ <pre><code>## The following objects are masked from 'package:base': ## ## aperm, apply, rowsum</code></pre> -<pre><code>## Registered S3 methods overwritten by 'ggplot2': -## method from -## [.quosures rlang -## c.quosures rlang -## print.quosures rlang</code></pre> -<div class="sourceCode" id="cb30"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb30-1" data-line-number="1"><span class="co"># Load example data</span></a> -<a class="sourceLine" id="cb30-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(scater)</a></code></pre></div> +<div class="sourceCode" id="cb34"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb34-1" data-line-number="1"><span class="co"># Create mock data</span></a> +<a class="sourceLine" id="cb34-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(scater)</a></code></pre></div> +<pre><code>## Warning: package 'scater' was built under R version 3.6.1</code></pre> <pre><code>## Loading required package: ggplot2</code></pre> -<div class="sourceCode" id="cb32"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb32-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/data">data</a></span>(<span class="st">"sc_example_counts"</span>)</a> -<a class="sourceLine" id="cb32-2" data-line-number="2"><span class="co"># Estimate parameters from example data</span></a> -<a class="sourceLine" id="cb32-3" data-line-number="3">params <-<span class="st"> </span><span class="kw"><a href="../reference/splatEstimate.html">splatEstimate</a></span>(sc_example_counts)</a> -<a class="sourceLine" id="cb32-4" data-line-number="4"><span class="co"># Simulate data using estimated parameters</span></a> -<a class="sourceLine" id="cb32-5" data-line-number="5">sim <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(params)</a></code></pre></div> +<div class="sourceCode" id="cb37"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb37-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/Random">set.seed</a></span>(<span class="dv">1</span>)</a> +<a class="sourceLine" id="cb37-2" data-line-number="2">sce <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/mockSCE">mockSCE</a></span>()</a> +<a class="sourceLine" id="cb37-3" data-line-number="3"></a> +<a class="sourceLine" id="cb37-4" data-line-number="4"><span class="co"># Estimate parameters from mock data</span></a> +<a class="sourceLine" id="cb37-5" data-line-number="5">params <-<span class="st"> </span><span class="kw"><a href="../reference/splatEstimate.html">splatEstimate</a></span>(sce)</a></code></pre></div> +<pre><code>## NOTE: Library sizes have been found to be normally distributed instead of log-normal. You may want to check this is correct.</code></pre> +<div class="sourceCode" id="cb39"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb39-1" data-line-number="1"><span class="co"># Simulate data using estimated parameters</span></a> +<a class="sourceLine" id="cb39-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(params)</a></code></pre></div> <pre><code>## Getting parameters...</code></pre> <pre><code>## Creating simulation object...</code></pre> <pre><code>## Simulating library sizes...</code></pre> @@ -211,14 +215,14 @@ <h1 class="hasAnchor"> <a href="#the-splatparams-object" class="anchor"></a>The <code>SplatParams</code> object</h1> <p>All the parameters for the Splat simulation are stored in a <code>SplatParams</code> object. Let’s create a new one and see what it looks like.</p> -<div class="sourceCode" id="cb41"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb41-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/newParams.html">newSplatParams</a></span>()</a> -<a class="sourceLine" id="cb41-2" data-line-number="2">params</a></code></pre></div> +<div class="sourceCode" id="cb48"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb48-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/newParams.html">newSplatParams</a></span>()</a> +<a class="sourceLine" id="cb48-2" data-line-number="2">params</a></code></pre></div> <pre><code>## A Params object of class SplatParams ## Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' ## ## Global: ## (Genes) (Cells) [Seed] -## 10000 100 243223 +## 10000 100 575939 ## ## 28 additional parameters ## @@ -264,17 +268,17 @@ <h2 class="hasAnchor"> <a href="#getting-and-setting" class="anchor"></a>Getting and setting</h2> <p>If we want to look at a particular parameter, for example the number of genes to simulate, we can extract it using the <code>getParam</code> function:</p> -<div class="sourceCode" id="cb43"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb43-1" data-line-number="1"><span class="kw"><a href="../reference/getParam.html">getParam</a></span>(params, <span class="st">"nGenes"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb50"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb50-1" data-line-number="1"><span class="kw"><a href="../reference/getParam.html">getParam</a></span>(params, <span class="st">"nGenes"</span>)</a></code></pre></div> <pre><code>## [1] 10000</code></pre> <p>Alternatively, to give a parameter a new value we can use the <code>setParam</code> function:</p> -<div class="sourceCode" id="cb45"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb45-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParam.html">setParam</a></span>(params, <span class="st">"nGenes"</span>, <span class="dv">5000</span>)</a> -<a class="sourceLine" id="cb45-2" data-line-number="2"><span class="kw"><a href="../reference/getParam.html">getParam</a></span>(params, <span class="st">"nGenes"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb52"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb52-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParam.html">setParam</a></span>(params, <span class="st">"nGenes"</span>, <span class="dv">5000</span>)</a> +<a class="sourceLine" id="cb52-2" data-line-number="2"><span class="kw"><a href="../reference/getParam.html">getParam</a></span>(params, <span class="st">"nGenes"</span>)</a></code></pre></div> <pre><code>## [1] 5000</code></pre> <p>If we want to extract multiple parameters (as a list) or set multiple parameters we can use the <code>getParams</code> or <code>setParams</code> functions:</p> -<div class="sourceCode" id="cb47"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb47-1" data-line-number="1"><span class="co"># Set multiple parameters at once (using a list)</span></a> -<a class="sourceLine" id="cb47-2" data-line-number="2">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParams.html">setParams</a></span>(params, <span class="dt">update =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">nGenes =</span> <span class="dv">8000</span>, <span class="dt">mean.rate =</span> <span class="fl">0.5</span>))</a> -<a class="sourceLine" id="cb47-3" data-line-number="3"><span class="co"># Extract multiple parameters as a list</span></a> -<a class="sourceLine" id="cb47-4" data-line-number="4"><span class="kw"><a href="../reference/getParams.html">getParams</a></span>(params, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"nGenes"</span>, <span class="st">"mean.rate"</span>, <span class="st">"mean.shape"</span>))</a></code></pre></div> +<div class="sourceCode" id="cb54"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb54-1" data-line-number="1"><span class="co"># Set multiple parameters at once (using a list)</span></a> +<a class="sourceLine" id="cb54-2" data-line-number="2">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParams.html">setParams</a></span>(params, <span class="dt">update =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">nGenes =</span> <span class="dv">8000</span>, <span class="dt">mean.rate =</span> <span class="fl">0.5</span>))</a> +<a class="sourceLine" id="cb54-3" data-line-number="3"><span class="co"># Extract multiple parameters as a list</span></a> +<a class="sourceLine" id="cb54-4" data-line-number="4"><span class="kw"><a href="../reference/getParams.html">getParams</a></span>(params, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"nGenes"</span>, <span class="st">"mean.rate"</span>, <span class="st">"mean.shape"</span>))</a></code></pre></div> <pre><code>## $nGenes ## [1] 8000 ## @@ -283,15 +287,15 @@ ## ## $mean.shape ## [1] 0.6</code></pre> -<div class="sourceCode" id="cb49"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb49-1" data-line-number="1"><span class="co"># Set multiple parameters at once (using additional arguments)</span></a> -<a class="sourceLine" id="cb49-2" data-line-number="2">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParams.html">setParams</a></span>(params, <span class="dt">mean.shape =</span> <span class="fl">0.5</span>, <span class="dt">de.prob =</span> <span class="fl">0.2</span>)</a> -<a class="sourceLine" id="cb49-3" data-line-number="3">params</a></code></pre></div> +<div class="sourceCode" id="cb56"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb56-1" data-line-number="1"><span class="co"># Set multiple parameters at once (using additional arguments)</span></a> +<a class="sourceLine" id="cb56-2" data-line-number="2">params <-<span class="st"> </span><span class="kw"><a href="../reference/setParams.html">setParams</a></span>(params, <span class="dt">mean.shape =</span> <span class="fl">0.5</span>, <span class="dt">de.prob =</span> <span class="fl">0.2</span>)</a> +<a class="sourceLine" id="cb56-3" data-line-number="3">params</a></code></pre></div> <pre><code>## A Params object of class SplatParams ## Parameters can be (estimable) or [not estimable], 'Default' or 'NOT DEFAULT' ## ## Global: ## (GENES) (Cells) [Seed] -## 8000 100 243223 +## 8000 100 575939 ## ## 28 additional parameters ## @@ -334,8 +338,8 @@ ## 0.8</code></pre> <p>The parameters with have changed are now shown in ALL CAPS to indicate that they been changed form the default.</p> <p>We can also set parameters directly when we call <code>newSplatParams</code>:</p> -<div class="sourceCode" id="cb51"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb51-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/newParams.html">newSplatParams</a></span>(<span class="dt">lib.loc =</span> <span class="dv">12</span>, <span class="dt">lib.scale =</span> <span class="fl">0.6</span>)</a> -<a class="sourceLine" id="cb51-2" data-line-number="2"><span class="kw"><a href="../reference/getParams.html">getParams</a></span>(params, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"lib.loc"</span>, <span class="st">"lib.scale"</span>))</a></code></pre></div> +<div class="sourceCode" id="cb58"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb58-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/newParams.html">newSplatParams</a></span>(<span class="dt">lib.loc =</span> <span class="dv">12</span>, <span class="dt">lib.scale =</span> <span class="fl">0.6</span>)</a> +<a class="sourceLine" id="cb58-2" data-line-number="2"><span class="kw"><a href="../reference/getParams.html">getParams</a></span>(params, <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="st">"lib.loc"</span>, <span class="st">"lib.scale"</span>))</a></code></pre></div> <pre><code>## $lib.loc ## [1] 12 ## @@ -347,23 +351,27 @@ <h1 class="hasAnchor"> <a href="#estimating-parameters" class="anchor"></a>Estimating parameters</h1> <p>Splat allows you to estimate many of it’s parameters from a data set containing counts using the <code>splatEstimate</code> function.</p> -<div class="sourceCode" id="cb53"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb53-1" data-line-number="1"><span class="co"># Check that sc_example counts is an integer matrix</span></a> -<a class="sourceLine" id="cb53-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/class">class</a></span>(sc_example_counts)</a></code></pre></div> +<div class="sourceCode" id="cb60"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb60-1" data-line-number="1"><span class="co"># Get the mock counts matrix</span></a> +<a class="sourceLine" id="cb60-2" data-line-number="2">counts <-<span class="st"> </span><span class="kw">counts</span>(sce)</a> +<a class="sourceLine" id="cb60-3" data-line-number="3"></a> +<a class="sourceLine" id="cb60-4" data-line-number="4"><span class="co"># Check that counts is an integer matrix</span></a> +<a class="sourceLine" id="cb60-5" data-line-number="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/class">class</a></span>(counts)</a></code></pre></div> <pre><code>## [1] "matrix"</code></pre> -<div class="sourceCode" id="cb55"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb55-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/typeof">typeof</a></span>(sc_example_counts)</a></code></pre></div> -<pre><code>## [1] "integer"</code></pre> -<div class="sourceCode" id="cb57"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb57-1" data-line-number="1"><span class="co"># Check the dimensions, each row is a gene, each column is a cell</span></a> -<a class="sourceLine" id="cb57-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(sc_example_counts)</a></code></pre></div> -<pre><code>## [1] 2000 40</code></pre> -<div class="sourceCode" id="cb59"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb59-1" data-line-number="1"><span class="co"># Show the first few entries</span></a> -<a class="sourceLine" id="cb59-2" data-line-number="2">sc_example_counts[<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> +<div class="sourceCode" id="cb62"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb62-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/typeof">typeof</a></span>(counts)</a></code></pre></div> +<pre><code>## [1] "double"</code></pre> +<div class="sourceCode" id="cb64"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb64-1" data-line-number="1"><span class="co"># Check the dimensions, each row is a gene, each column is a cell</span></a> +<a class="sourceLine" id="cb64-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/dim">dim</a></span>(counts)</a></code></pre></div> +<pre><code>## [1] 2000 200</code></pre> +<div class="sourceCode" id="cb66"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb66-1" data-line-number="1"><span class="co"># Show the first few entries</span></a> +<a class="sourceLine" id="cb66-2" data-line-number="2">counts[<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>## Cell_001 Cell_002 Cell_003 Cell_004 Cell_005 -## Gene_0001 0 123 2 0 0 -## Gene_0002 575 65 3 1561 2311 -## Gene_0003 0 0 0 0 1213 -## Gene_0004 0 1 0 0 0 -## Gene_0005 0 0 11 0 0</code></pre> -<div class="sourceCode" id="cb61"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb61-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/splatEstimate.html">splatEstimate</a></span>(sc_example_counts)</a></code></pre></div> +## Gene_0001 0 5 7 276 50 +## Gene_0002 12 0 0 0 0 +## Gene_0003 97 292 58 64 541 +## Gene_0004 0 0 0 170 19 +## Gene_0005 105 123 174 565 1061</code></pre> +<div class="sourceCode" id="cb68"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb68-1" data-line-number="1">params <-<span class="st"> </span><span class="kw"><a href="../reference/splatEstimate.html">splatEstimate</a></span>(counts)</a></code></pre></div> +<pre><code>## NOTE: Library sizes have been found to be normally distributed instead of log-normal. You may want to check this is correct.</code></pre> <p>Here we estimated parameters from a counts matrix but <code>splatEstimate</code> can also take a <code>SingleCellExperiment</code> object. The estimation process has the following steps:</p> <ol style="list-style-type: decimal"> <li>Mean parameters are estimated by fitting a gamma distribution to the mean expression levels.</li> @@ -378,7 +386,7 @@ <h1 class="hasAnchor"> <a href="#simulating-counts" class="anchor"></a>Simulating counts</h1> <p>Once we have a set of parameters we are happy with we can use <code>splatSimulate</code> to simulate counts. If we want to make small adjustments to the parameters we can provide them as additional arguments, alternatively if we don’t supply any parameters the defaults will be used:</p> -<div class="sourceCode" id="cb62"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb62-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(params, <span class="dt">nGenes =</span> <span class="dv">1000</span>)</a></code></pre></div> +<div class="sourceCode" id="cb70"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb70-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(params, <span class="dt">nGenes =</span> <span class="dv">1000</span>)</a></code></pre></div> <pre><code>## Getting parameters...</code></pre> <pre><code>## Creating simulation object...</code></pre> <pre><code>## Simulating library sizes...</code></pre> @@ -387,66 +395,70 @@ <pre><code>## Simulating counts...</code></pre> <pre><code>## Simulating dropout (if needed)...</code></pre> <pre><code>## Done!</code></pre> -<div class="sourceCode" id="cb71"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb71-1" data-line-number="1">sim</a></code></pre></div> +<div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb79-1" data-line-number="1">sim</a></code></pre></div> <pre><code>## class: SingleCellExperiment -## dim: 1000 40 +## dim: 1000 200 ## metadata(1): Params ## assays(6): BatchCellMeans BaseCellMeans ... TrueCounts counts ## rownames(1000): Gene1 Gene2 ... Gene999 Gene1000 ## rowData names(4): Gene BaseGeneMean OutlierFactor GeneMean -## colnames(40): Cell1 Cell2 ... Cell39 Cell40 +## colnames(200): Cell1 Cell2 ... Cell199 Cell200 ## colData names(3): Cell Batch ExpLibSize ## reducedDimNames(0): -## spikeNames(0):</code></pre> -<p>Looking at the output of <code>splatSimulate</code> we can see that <code>sim</code> is <code>SingleCellExperiment</code> object with 1000 features (genes) and 40 samples (cells). The main part of this object is a features by samples matrix containing the simulated counts (accessed using <code>counts</code>), although it can also hold other expression measures such as FPKM or TPM. Additionally a <code>SingleCellExperiment</code> contains phenotype information about each cell (accessed using <code>colData</code>) and feature information about each gene (accessed using <code>rowData</code>). Splatter uses these slots, as well as <code>assays</code>, to store information about the intermediate values of the simulation.</p> -<div class="sourceCode" id="cb73"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb73-1" data-line-number="1"><span class="co"># Access the counts</span></a> -<a class="sourceLine" id="cb73-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> +## spikeNames(0): +## altExpNames(0):</code></pre> +<p>Looking at the output of <code>splatSimulate</code> we can see that <code>sim</code> is <code>SingleCellExperiment</code> object with 1000 features (genes) and 200 samples (cells). The main part of this object is a features by samples matrix containing the simulated counts (accessed using <code>counts</code>), although it can also hold other expression measures such as FPKM or TPM. Additionally a <code>SingleCellExperiment</code> contains phenotype information about each cell (accessed using <code>colData</code>) and feature information about each gene (accessed using <code>rowData</code>). Splatter uses these slots, as well as <code>assays</code>, to store information about the intermediate values of the simulation.</p> +<div class="sourceCode" id="cb81"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb81-1" data-line-number="1"><span class="co"># Access the counts</span></a> +<a class="sourceLine" id="cb81-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 1 0 0 1 0 -## Gene2 0 31 1171 0 0 -## Gene3 29 0 0 0 0 -## Gene4 29 0 0 0 22 -## Gene5 0 0 0 0 0</code></pre> -<div class="sourceCode" id="cb75"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb75-1" data-line-number="1"><span class="co"># Information about genes</span></a> -<a class="sourceLine" id="cb75-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(<span class="kw">rowData</span>(sim))</a></code></pre></div> +## Gene1 683 9103 3101 3110 1637 +## Gene2 634 342 205 179 467 +## Gene3 0 0 0 1 0 +## Gene4 1030 589 527 570 253 +## Gene5 0 4 3 0 2</code></pre> +<div class="sourceCode" id="cb83"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb83-1" data-line-number="1"><span class="co"># Information about genes</span></a> +<a class="sourceLine" id="cb83-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">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 45.3445830713119 1 45.3445830713119 -## Gene2 Gene2 497.980078847346 1 497.980078847346 -## Gene3 Gene3 215.237088633651 1 215.237088633651 -## Gene4 Gene4 2.60987023157348 1 2.60987023157348 -## Gene5 Gene5 0.00135066522668707 1 0.00135066522668707 -## Gene6 Gene6 85.8128900344786 1 85.8128900344786</code></pre> -<div class="sourceCode" id="cb77"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb77-1" data-line-number="1"><span class="co"># Information about cells</span></a> -<a class="sourceLine" id="cb77-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(<span class="kw">colData</span>(sim))</a></code></pre></div> +## Gene BaseGeneMean OutlierFactor GeneMean +## <factor> <numeric> <numeric> <numeric> +## Gene1 Gene1 969.971697306478 1 969.971697306478 +## Gene2 Gene2 212.946759920409 1 212.946759920409 +## Gene3 Gene3 0.212456014089163 1 0.212456014089163 +## Gene4 Gene4 571.327025653128 1 571.327025653128 +## Gene5 Gene5 1.47190829598543 1 1.47190829598543 +## Gene6 Gene6 1.66119397884979 1 1.66119397884979</code></pre> +<div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb85-1" data-line-number="1"><span class="co"># Information about cells</span></a> +<a class="sourceLine" id="cb85-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">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 592807.317897709 -## Cell2 Cell2 Batch1 295692.248058024 -## Cell3 Cell3 Batch1 296385.781859821 -## Cell4 Cell4 Batch1 201524.012315065 -## Cell5 Cell5 Batch1 334979.259139587 -## Cell6 Cell6 Batch1 521226.10576447</code></pre> -<div class="sourceCode" id="cb79"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb79-1" data-line-number="1"><span class="co"># Gene by cell matrices</span></a> -<a class="sourceLine" id="cb79-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">names</a></span>(<span class="kw">assays</span>(sim))</a></code></pre></div> +## Cell1 Cell1 Batch1 335351.08401721 +## Cell2 Cell2 Batch1 353232.031194834 +## Cell3 Cell3 Batch1 348516.116098443 +## Cell4 Cell4 Batch1 345250.205506489 +## Cell5 Cell5 Batch1 358512.781474554 +## Cell6 Cell6 Batch1 366554.730332392</code></pre> +<div class="sourceCode" id="cb87"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb87-1" data-line-number="1"><span class="co"># Gene by cell matrices</span></a> +<a class="sourceLine" id="cb87-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">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="cb81"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb81-1" data-line-number="1"><span class="co"># Example of cell means matrix</span></a> -<a class="sourceLine" id="cb81-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 3.050975e-01 3.763281e-02 1.820506e-01 2.439849e-01 4.787291e-08 -## Gene2 7.047076e-07 4.142406e+01 1.204765e+03 1.477931e-04 2.094183e-07 -## Gene3 1.912259e+01 1.437372e-01 1.651975e-09 2.824356e-03 3.319900e-02 -## Gene4 2.479779e+01 5.079471e-06 1.731453e-03 8.558097e-12 2.330054e+01 -## Gene5 0.000000e+00 0.000000e+00 0.000000e+00 2.781442e-132 1.196310e-229</code></pre> +<div class="sourceCode" id="cb89"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb89-1" data-line-number="1"><span class="co"># Example of cell means matrix</span></a> +<a class="sourceLine" id="cb89-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 6.802414e+02 8980.2305553 3082.9437264 3143.9692418 1.713283e+03 +## Gene2 6.280572e+02 334.2077963 195.7808953 174.4536072 4.801664e+02 +## Gene3 2.591298e-02 0.6016577 0.2507107 0.5312011 2.894290e-04 +## Gene4 1.031655e+03 578.0587110 488.4155647 544.3943677 2.543278e+02 +## Gene5 1.039024e-01 3.1161482 5.0742619 1.4205449 3.222323e+00</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="cb83"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb83-1" data-line-number="1"><span class="co"># Use scater to calculate logcounts</span></a> -<a class="sourceLine" id="cb83-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim)</a></code></pre></div> +<div class="sourceCode" id="cb91"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb91-1" data-line-number="1"><span class="co"># Use scater to calculate logcounts</span></a> +<a class="sourceLine" id="cb91-2" data-line-number="2">sim <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb85"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb85-1" data-line-number="1"><span class="co"># Plot PCA</span></a> -<a class="sourceLine" id="cb85-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim)</a></code></pre></div> +<pre><code>## Warning: 'centreSizeFactors' is deprecated. +## See help("Deprecated")</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"># Plot PCA</span></a> +<a class="sourceLine" id="cb94-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim)</a></code></pre></div> +<pre><code>## Warning: call 'runPCA' explicitly to compute results</code></pre> <p><img src="splatter_files/figure-html/pca-1.png" width="576" style="display: block; margin: auto;"></p> <p>(<strong>NOTE:</strong> Your values and plots may look different as the simulation is random and produces different results each time it is run.)</p> <p>For more details about the <code>SingleCellExperiment</code> object refer to the [vignette] <a href="https://bioconductor.org/packages/devel/bioc/vignettes/SingleCellExperiment/inst/doc/intro.html">SCE-vignette</a>. For information about what you can do with <code>scater</code> refer to the <code>scater</code> documentation and <a href="https://bioconductor.org/packages/release/bioc/vignettes/scater/inst/doc/vignette.html">vignette</a>.</p> @@ -504,11 +516,14 @@ <a href="#simulating-groups" class="anchor"></a>Simulating groups</h2> <p>So far we have only simulated a single population of cells but often we are interested in investigating a mixed population of cells and looking to see what cell types are present or what differences there are between them. Splatter is able to simulate these situations by changing the <code>method</code> argument Here we are going to simulate two groups, by specifying the <code>group.prob</code> parameter and setting the <code>method</code> parameter to <code>"groups"</code>:</p> <p>(<strong>NOTE:</strong> We have also set the <code>verbose</code> argument to <code>FALSE</code> to stop Splatter printing progress messages.)</p> -<div class="sourceCode" id="cb86"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb86-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">group.prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>), <span class="dt">method =</span> <span class="st">"groups"</span>,</a> -<a class="sourceLine" id="cb86-2" data-line-number="2"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb86-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.groups)</a></code></pre></div> +<div class="sourceCode" id="cb96"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb96-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">group.prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>), <span class="dt">method =</span> <span class="st">"groups"</span>,</a> +<a class="sourceLine" id="cb96-2" data-line-number="2"> <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb96-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.groups)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb88"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb88-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> +<pre><code>## Warning: 'centreSizeFactors' is deprecated. +## See help("Deprecated")</code></pre> +<div class="sourceCode" id="cb99"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb99-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> +<pre><code>## Warning: call 'runPCA' explicitly to compute results</code></pre> <p><img src="splatter_files/figure-html/groups-1.png" width="576" style="display: block; margin: auto;"></p> <p>As we have set both the group probabilities to 0.5 we should get approximately equal numbers of cells in each group (around 50 in this case). If we wanted uneven groups we could set <code>group.prob</code> to any set of probabilities that sum to 1.</p> </div> @@ -516,10 +531,13 @@ <h2 class="hasAnchor"> <a href="#simulating-paths" class="anchor"></a>Simulating paths</h2> <p>The other situation that is often of interest is a differentiation process where one cell type is changing into another. Splatter approximates this process by simulating a series of steps between two groups and randomly assigning each cell to a step. We can create this kind of simulation using the <code>"paths"</code> method.</p> -<div class="sourceCode" id="cb89"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb89-1" data-line-number="1">sim.paths <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">method =</span> <span class="st">"paths"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb89-2" data-line-number="2">sim.paths <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.paths)</a></code></pre></div> +<div class="sourceCode" id="cb101"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb101-1" data-line-number="1">sim.paths <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">method =</span> <span class="st">"paths"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb101-2" data-line-number="2">sim.paths <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.paths)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb91"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb91-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.paths, <span class="dt">colour_by =</span> <span class="st">"Step"</span>)</a></code></pre></div> +<pre><code>## Warning: 'centreSizeFactors' is deprecated. +## See help("Deprecated")</code></pre> +<div class="sourceCode" id="cb104"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb104-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.paths, <span class="dt">colour_by =</span> <span class="st">"Step"</span>)</a></code></pre></div> +<pre><code>## Warning: call 'runPCA' explicitly to compute results</code></pre> <p><img src="splatter_files/figure-html/paths-1.png" width="576" style="display: block; margin: auto;"></p> <p>Here the colours represent the “step†of each cell or how far along the differentiation path it is. We can see that the cells with dark colours are more similar to the originating cell type and the light coloured cells are closer to the final, differentiated, cell type. By setting additional parameters it is possible to simulate more complex process (for example multiple mature cell types from a single progenitor).</p> </div> @@ -527,17 +545,23 @@ <h2 class="hasAnchor"> <a href="#batch-effects" class="anchor"></a>Batch effects</h2> <p>Another factor that is important in the analysis of any sequencing experiment are batch effects, technical variation that is common to a set of samples processed at the same time. We apply batch effects by telling Splatter how many cells are in each batch:</p> -<div class="sourceCode" id="cb92"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb92-1" data-line-number="1">sim.batches <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb92-2" data-line-number="2">sim.batches <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.batches)</a></code></pre></div> +<div class="sourceCode" id="cb106"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb106-1" data-line-number="1">sim.batches <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb106-2" data-line-number="2">sim.batches <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.batches)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb94"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb94-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.batches, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a></code></pre></div> +<pre><code>## Warning: 'centreSizeFactors' is deprecated. +## See help("Deprecated")</code></pre> +<div class="sourceCode" id="cb109"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb109-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.batches, <span class="dt">colour_by =</span> <span class="st">"Batch"</span>)</a></code></pre></div> +<pre><code>## Warning: call 'runPCA' explicitly to compute results</code></pre> <p><img src="splatter_files/figure-html/batches-1.png" width="576" style="display: block; margin: auto;"></p> <p>This looks at lot like when we simulated groups and that is because the process is very similar. The difference is that batch effects are applied to all genes, not just those that are differentially expressed, and the effects are usually smaller. By combining groups and batches we can simulate both unwanted variation that we aren’t interested in (batch) and the wanted variation we are looking for (group):</p> -<div class="sourceCode" id="cb95"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb95-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">group.prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>),</a> -<a class="sourceLine" id="cb95-2" data-line-number="2"> <span class="dt">method =</span> <span class="st">"groups"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb95-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.groups)</a></code></pre></div> +<div class="sourceCode" id="cb111"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb111-1" data-line-number="1">sim.groups <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">batchCells =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="dv">50</span>, <span class="dv">50</span>), <span class="dt">group.prob =</span> <span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/c">c</a></span>(<span class="fl">0.5</span>, <span class="fl">0.5</span>),</a> +<a class="sourceLine" id="cb111-2" data-line-number="2"> <span class="dt">method =</span> <span class="st">"groups"</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb111-3" data-line-number="3">sim.groups <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/normalize">normalize</a></span>(sim.groups)</a></code></pre></div> <pre><code>## Warning in .local(object, ...): using library sizes as size factors</code></pre> -<div class="sourceCode" id="cb97"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb97-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">shape_by =</span> <span class="st">"Batch"</span>, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> +<pre><code>## Warning: 'centreSizeFactors' is deprecated. +## See help("Deprecated")</code></pre> +<div class="sourceCode" id="cb114"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb114-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/plot_reddim">plotPCA</a></span>(sim.groups, <span class="dt">shape_by =</span> <span class="st">"Batch"</span>, <span class="dt">colour_by =</span> <span class="st">"Group"</span>)</a></code></pre></div> +<pre><code>## Warning: call 'runPCA' explicitly to compute results</code></pre> <p><img src="splatter_files/figure-html/batch-groups-1.png" width="576" style="display: block; margin: auto;"></p> <p>Here we see that the effects of the group (first component) are stronger than the batch effects (second component) but by adjusting the parameters we could made the batch effects dominate.</p> </div> @@ -551,7 +575,7 @@ <h1 class="hasAnchor"> <a href="#other-simulations" class="anchor"></a>Other simulations</h1> <p>As well as it’s own Splat simulation method the Splatter package contains implementations of other single-cell RNA-seq simulations that have been published or wrappers around simulations included in other packages. To see all the available simulations run the <code><a href="../reference/listSims.html">listSims()</a></code> function:</p> -<div class="sourceCode" id="cb98"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb98-1" data-line-number="1"><span class="kw"><a href="../reference/listSims.html">listSims</a></span>()</a></code></pre></div> +<div class="sourceCode" id="cb116"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb116-1" data-line-number="1"><span class="kw"><a href="../reference/listSims.html">listSims</a></span>()</a></code></pre></div> <pre><code>## Splatter currently contains 13 simulations ## ## Splat (splat) @@ -611,60 +635,59 @@ <h1 class="hasAnchor"> <a href="#other-expression-values" class="anchor"></a>Other expression values</h1> <p>Splatter is designed to simulate count data but some analysis methods expect other expression values, particularly length-normalised values such as TPM or FPKM. The <code>scater</code> package has functions for adding these values to a <code>SingleCellExperiment</code> object but they require a length for each gene. The <code>addGeneLengths</code> function can be used to simulate these lengths:</p> -<div class="sourceCode" id="cb100"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb100-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb100-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="cb100-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">head</a></span>(<span class="kw">rowData</span>(sim))</a></code></pre></div> +<div class="sourceCode" id="cb118"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb118-1" data-line-number="1">sim <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb118-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="cb118-3" data-line-number="3"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/head">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.565274930238108 1688 -## Gene2 Gene2 0.0861459272940232 5595 -## Gene3 Gene3 0.877764753256216 5283 -## Gene4 Gene4 1.03997998231342 2508 -## Gene5 Gene5 2.05102786506894 1175 -## Gene6 Gene6 1.94005477092044 2729</code></pre> +## Gene GeneMean Length +## <factor> <numeric> <numeric> +## Gene1 Gene1 0.000680725267708466 1581 +## Gene2 Gene2 0.370387032192347 845 +## Gene3 Gene3 0.111311537904601 2613 +## Gene4 Gene4 1.00925368493739 2737 +## Gene5 Gene5 0.513708856051692 1140 +## Gene6 Gene6 0.391738896715107 5341</code></pre> <p>We can then use <code>scater</code> to calculate TPM:</p> -<div class="sourceCode" id="cb102"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb102-1" data-line-number="1"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/calculateTPM">calculateTPM</a></span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length)</a> -<a class="sourceLine" id="cb102-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.0000 99.66428 0.00000 98.62594 0.00000 -## Gene2 0.0000 0.00000 0.00000 29.75524 0.00000 -## Gene3 0.0000 31.84427 93.57673 31.51251 65.29994 -## Gene4 266.0202 0.00000 0.00000 199.13946 0.00000 -## Gene5 709.7645 0.00000 0.00000 141.68561 293.59964</code></pre> +<div class="sourceCode" id="cb120"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb120-1" data-line-number="1"><span class="kw">tpm</span>(sim) <-<span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/scater/topics/calculateTPM">calculateTPM</a></span>(sim, <span class="kw">rowData</span>(sim)<span class="op">$</span>Length)</a> +<a class="sourceLine" id="cb120-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.0000 0.0000 0.00000 0 0.0000 +## Gene2 0.0000 189.1590 369.04667 0 0.0000 +## Gene3 0.0000 0.0000 0.00000 0 0.0000 +## Gene4 108.8018 175.1984 56.96829 0 0.0000 +## Gene5 0.0000 140.2099 136.77388 0 136.7855</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"> <h1 class="hasAnchor"> <a href="#comparing-simulations-and-real-data" class="anchor"></a>Comparing simulations and real data</h1> <p>One thing you might like to do after simulating data is to compare it to a real dataset, or compare simulations with different parameters or models. Splatter provides a function <code>compareSCEs</code> that aims to make these comparisons easier. As the name suggests this function takes a list of <code>SingleCellExperiment</code> objects, combines the datasets and produces some plots comparing them. Let’s make two small simulations and see how they compare.</p> -<div class="sourceCode" id="cb104"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb104-1" data-line-number="1">sim1 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">batchCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb104-2" data-line-number="2">sim2 <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">nCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> -<a class="sourceLine" id="cb104-3" data-line-number="3">comparison <-<span class="st"> </span><span class="kw"><a href="../reference/compareSCEs.html">compareSCEs</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2))</a> -<a class="sourceLine" id="cb104-4" data-line-number="4"></a> -<a class="sourceLine" id="cb104-5" data-line-number="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">names</a></span>(comparison)</a></code></pre></div> +<div class="sourceCode" id="cb122"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb122-1" data-line-number="1">sim1 <-<span class="st"> </span><span class="kw"><a href="../reference/splatSimulate.html">splatSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">batchCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb122-2" data-line-number="2">sim2 <-<span class="st"> </span><span class="kw"><a href="../reference/simpleSimulate.html">simpleSimulate</a></span>(<span class="dt">nGenes =</span> <span class="dv">1000</span>, <span class="dt">nCells =</span> <span class="dv">20</span>, <span class="dt">verbose =</span> <span class="ot">FALSE</span>)</a> +<a class="sourceLine" id="cb122-3" data-line-number="3">comparison <-<span class="st"> </span><span class="kw"><a href="../reference/compareSCEs.html">compareSCEs</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2))</a> +<a class="sourceLine" id="cb122-4" data-line-number="4"></a> +<a class="sourceLine" id="cb122-5" data-line-number="5"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">names</a></span>(comparison)</a></code></pre></div> <pre><code>## [1] "RowData" "ColData" "Plots"</code></pre> -<div class="sourceCode" id="cb106"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb106-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">names</a></span>(comparison<span class="op">$</span>Plots)</a></code></pre></div> +<div class="sourceCode" id="cb124"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb124-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/names">names</a></span>(comparison<span class="op">$</span>Plots)</a></code></pre></div> <pre><code>## [1] "Means" "Variances" "MeanVar" "LibrarySizes" -## [5] "ZerosGene" "ZerosCell" "MeanZeros"</code></pre> +## [5] "ZerosGene" "ZerosCell" "MeanZeros" "VarGeneCor"</code></pre> <p>The returned list has three items. The first two are the combined datasets by gene (<code>RowData</code>) and by cell (<code>ColData</code>) and the third contains some comparison plots (produced using <code>ggplot2</code>), for example a plot of the distribution of means:</p> -<div class="sourceCode" id="cb108"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb108-1" data-line-number="1">comparison<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb126"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb126-1" data-line-number="1">comparison<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/comparison-means-1.png" width="576" style="display: block; margin: auto;"></p> <p>These are only a few of the plots you might want to consider but it should be easy to make more using the returned data. For example, we could plot the number of expressed genes against the library size:</p> -<div class="sourceCode" id="cb109"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb109-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"ggplot2"</span>)</a> -<a class="sourceLine" id="cb109-2" data-line-number="2"><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/ggplot">ggplot</a></span>(comparison<span class="op">$</span>ColData,</a> -<a class="sourceLine" id="cb109-3" data-line-number="3"> <span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/aes">aes</a></span>(<span class="dt">x =</span> total_counts, <span class="dt">y =</span> total_features_by_counts, <span class="dt">colour =</span> Dataset)) <span class="op">+</span></a> -<a class="sourceLine" id="cb109-4" data-line-number="4"><span class="st"> </span><span class="kw"><a href="https://www.rdocumentation.org/packages/ggplot2/topics/geom_point">geom_point</a></span>()</a></code></pre></div> +<div class="sourceCode" id="cb127"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb127-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/library">library</a></span>(<span class="st">"ggplot2"</span>)</a> +<a class="sourceLine" id="cb127-2" data-line-number="2"><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/ggplot.html">ggplot</a></span>(comparison<span class="op">$</span>ColData, <span class="kw"><a href="https://ggplot2.tidyverse.org/reference/aes.html">aes</a></span>(<span class="dt">x =</span> sum, <span class="dt">y =</span> detected, <span class="dt">colour =</span> Dataset)) <span class="op">+</span></a> +<a class="sourceLine" id="cb127-3" data-line-number="3"><span class="st"> </span><span class="kw"><a href="https://ggplot2.tidyverse.org/reference/geom_point.html">geom_point</a></span>()</a></code></pre></div> <p><img src="splatter_files/figure-html/comparison-libsize-features-1.png" width="576" style="display: block; margin: auto;"></p> <div id="comparing-differences" class="section level2"> <h2 class="hasAnchor"> <a href="#comparing-differences" class="anchor"></a>Comparing differences</h2> <p>Sometimes instead of visually comparing datasets it may be more interesting to look at the differences between them. We can do this using the <code>diffSCEs</code> function. Similar to <code>compareSCEs</code> this function takes a list of <code>SingleCellExperiment</code> objects but now we also specify one to be a reference. A series of similar plots are returned but instead of showing the overall distributions they demonstrate differences from the reference.</p> -<div class="sourceCode" id="cb110"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb110-1" data-line-number="1">difference <-<span class="st"> </span><span class="kw"><a href="../reference/diffSCEs.html">diffSCEs</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2), <span class="dt">ref =</span> <span class="st">"Simple"</span>)</a> -<a class="sourceLine" id="cb110-2" data-line-number="2">difference<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb128"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb128-1" data-line-number="1">difference <-<span class="st"> </span><span class="kw"><a href="../reference/diffSCEs.html">diffSCEs</a></span>(<span class="kw"><a href="https://www.rdocumentation.org/packages/base/topics/list">list</a></span>(<span class="dt">Splat =</span> sim1, <span class="dt">Simple =</span> sim2), <span class="dt">ref =</span> <span class="st">"Simple"</span>)</a> +<a class="sourceLine" id="cb128-2" data-line-number="2">difference<span class="op">$</span>Plots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/difference-1.png" width="576" style="display: block; margin: auto;"></p> <p>We also get a series of Quantile-Quantile plot that can be used to compare distributions.</p> -<div class="sourceCode" id="cb111"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb111-1" data-line-number="1">difference<span class="op">$</span>QQPlots<span class="op">$</span>Means</a></code></pre></div> +<div class="sourceCode" id="cb129"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb129-1" data-line-number="1">difference<span class="op">$</span>QQPlots<span class="op">$</span>Means</a></code></pre></div> <p><img src="splatter_files/figure-html/difference-qq-1.png" width="576" style="display: block; margin: auto;"></p> </div> <div id="making-panels" class="section level2"> @@ -672,22 +695,22 @@ <a href="#making-panels" class="anchor"></a>Making panels</h2> <p>Each of these comparisons makes several plots which can be a lot to look at. To make this easier, or to produce figures for publications, you can make use of the functions <code>makeCompPanel</code>, <code>makeDiffPanel</code> and <code>makeOverallPanel</code>.</p> <p>These functions combine the plots into a single panel using the <code>cowplot</code> package. The panels can be quite large and hard to view (for example in RStudio’s plot viewer) so it can be better to output the panels and view them separately. Luckily <code>cowplot</code> provides a convenient function for saving the images. Here are some suggested parameters for outputting each of the panels:</p> -<div class="sourceCode" id="cb112"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb112-1" data-line-number="1"><span class="co"># This code is just an example and is not run</span></a> -<a class="sourceLine" id="cb112-2" data-line-number="2">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeCompPanel.html">makeCompPanel</a></span>(comparison)</a> -<a class="sourceLine" id="cb112-3" data-line-number="3">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"comp_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">4</span>, <span class="dt">ncol =</span> <span class="dv">3</span>)</a> -<a class="sourceLine" id="cb112-4" data-line-number="4"></a> -<a class="sourceLine" id="cb112-5" data-line-number="5">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeDiffPanel.html">makeDiffPanel</a></span>(difference)</a> -<a class="sourceLine" id="cb112-6" data-line-number="6">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"diff_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">3</span>, <span class="dt">ncol =</span> <span class="dv">5</span>)</a> -<a class="sourceLine" id="cb112-7" data-line-number="7"></a> -<a class="sourceLine" id="cb112-8" data-line-number="8">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeOverallPanel.html">makeOverallPanel</a></span>(comparison, difference)</a> -<a class="sourceLine" id="cb112-9" data-line-number="9">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"overall_panel.png"</span>, panel, <span class="dt">ncol =</span> <span class="dv">4</span>, <span class="dt">nrow =</span> <span class="dv">7</span>)</a></code></pre></div> +<div class="sourceCode" id="cb130"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb130-1" data-line-number="1"><span class="co"># This code is just an example and is not run</span></a> +<a class="sourceLine" id="cb130-2" data-line-number="2">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeCompPanel.html">makeCompPanel</a></span>(comparison)</a> +<a class="sourceLine" id="cb130-3" data-line-number="3">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"comp_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">4</span>, <span class="dt">ncol =</span> <span class="dv">3</span>)</a> +<a class="sourceLine" id="cb130-4" data-line-number="4"></a> +<a class="sourceLine" id="cb130-5" data-line-number="5">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeDiffPanel.html">makeDiffPanel</a></span>(difference)</a> +<a class="sourceLine" id="cb130-6" data-line-number="6">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"diff_panel.png"</span>, panel, <span class="dt">nrow =</span> <span class="dv">3</span>, <span class="dt">ncol =</span> <span class="dv">5</span>)</a> +<a class="sourceLine" id="cb130-7" data-line-number="7"></a> +<a class="sourceLine" id="cb130-8" data-line-number="8">panel <-<span class="st"> </span><span class="kw"><a href="../reference/makeOverallPanel.html">makeOverallPanel</a></span>(comparison, difference)</a> +<a class="sourceLine" id="cb130-9" data-line-number="9">cowplot<span class="op">::</span><span class="kw"><a href="https://www.rdocumentation.org/packages/cowplot/topics/save_plot">save_plot</a></span>(<span class="st">"overall_panel.png"</span>, panel, <span class="dt">ncol =</span> <span class="dv">4</span>, <span class="dt">nrow =</span> <span class="dv">7</span>)</a></code></pre></div> </div> </div> <div id="citing-splatter" class="section level1"> <h1 class="hasAnchor"> <a href="#citing-splatter" class="anchor"></a>Citing Splatter</h1> <p>If you use Splatter in your work please cite our paper:</p> -<div class="sourceCode" id="cb113"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb113-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/citation">citation</a></span>(<span class="st">"splatter"</span>)</a></code></pre></div> +<div class="sourceCode" id="cb131"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb131-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/citation">citation</a></span>(<span class="st">"splatter"</span>)</a></code></pre></div> <pre><code>## ## Zappia L, Phipson B, Oshlack A. Splatter: Simulation of ## single-cell RNA sequencing data. Genome Biology. 2017; @@ -707,7 +730,7 @@ <div id="session-information" class="section level1 unnumbered"> <h1 class="hasAnchor"> <a href="#session-information" class="anchor"></a>Session information</h1> -<div class="sourceCode" id="cb115"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb115-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/sessionInfo">sessionInfo</a></span>()</a></code></pre></div> +<div class="sourceCode" id="cb133"><pre class="sourceCode r"><code class="sourceCode r"><a class="sourceLine" id="cb133-1" data-line-number="1"><span class="kw"><a href="https://www.rdocumentation.org/packages/utils/topics/sessionInfo">sessionInfo</a></span>()</a></code></pre></div> <pre><code>## R version 3.6.0 (2019-04-26) ## Platform: x86_64-apple-darwin15.6.0 (64-bit) ## Running under: macOS Sierra 10.12.6 @@ -724,54 +747,54 @@ ## [8] methods base ## ## other attached packages: -## [1] scater_1.13.5 ggplot2_3.1.1 -## [3] splatter_1.9.0 SingleCellExperiment_1.7.0 -## [5] SummarizedExperiment_1.15.1 DelayedArray_0.11.0 -## [7] BiocParallel_1.19.0 matrixStats_0.54.0 -## [9] Biobase_2.45.0 GenomicRanges_1.37.8 -## [11] GenomeInfoDb_1.21.1 IRanges_2.19.6 -## [13] S4Vectors_0.23.5 BiocGenerics_0.31.2 -## [15] BiocStyle_2.13.0 +## [1] scater_1.13.15 ggplot2_3.2.1 +## [3] splatter_1.9.3 SingleCellExperiment_1.7.4 +## [5] SummarizedExperiment_1.15.6 DelayedArray_0.11.4 +## [7] BiocParallel_1.19.2 matrixStats_0.54.0 +## [9] Biobase_2.45.0 GenomicRanges_1.37.14 +## [11] GenomeInfoDb_1.21.1 IRanges_2.19.10 +## [13] S4Vectors_0.23.18 BiocGenerics_0.31.5 +## [15] BiocStyle_2.13.2 ## ## loaded via a namespace (and not attached): -## [1] viridis_0.5.1 edgeR_3.27.4 -## [3] BiocSingular_1.1.3 splines_3.6.0 +## [1] viridis_0.5.1 edgeR_3.27.12 +## [3] BiocSingular_1.1.5 splines_3.6.0 ## [5] viridisLite_0.3.0 lsei_1.2-0 -## [7] DelayedMatrixStats_1.7.0 assertthat_0.2.1 +## [7] DelayedMatrixStats_1.7.1 assertthat_0.2.1 ## [9] sp_1.3-1 BiocManager_1.30.4 ## [11] GenomeInfoDbData_1.2.1 vipor_0.4.5 -## [13] yaml_2.2.0 pillar_1.4.1 +## [13] yaml_2.2.0 pillar_1.4.2 ## [15] backports_1.1.4 lattice_0.20-38 -## [17] limma_3.41.2 glue_1.3.1 -## [19] digest_0.6.19 XVector_0.25.0 -## [21] checkmate_1.9.3 colorspace_1.4-1 -## [23] cowplot_0.9.99 htmltools_0.3.6 -## [25] Matrix_1.2-17 plyr_1.8.4 -## [27] pkgconfig_2.0.2 bookdown_0.11 +## [17] limma_3.41.15 glue_1.3.1 +## [19] digest_0.6.20 RColorBrewer_1.1-2 +## [21] XVector_0.25.0 checkmate_1.9.4 +## [23] colorspace_1.4-1 cowplot_1.0.0 +## [25] htmltools_0.3.6 Matrix_1.2-17 +## [27] pkgconfig_2.0.2 bookdown_0.12 ## [29] zlibbioc_1.31.0 purrr_0.3.2 ## [31] scales_1.0.0 tibble_2.1.3 ## [33] withr_2.1.2 lazyeval_0.2.2 ## [35] survival_2.44-1.1 magrittr_1.5 ## [37] crayon_1.3.4 memoise_1.1.0 ## [39] evaluate_0.14 fs_1.3.1 -## [41] MASS_7.3-51.4 xml2_1.2.0 -## [43] beeswarm_0.2.3 fitdistrplus_1.0-14 -## [45] tools_3.6.0 stringr_1.4.0 +## [41] MASS_7.3-51.4 xml2_1.2.2 +## [43] beeswarm_0.2.3 tools_3.6.0 +## [45] fitdistrplus_1.0-14 stringr_1.4.0 ## [47] munsell_0.5.0 locfit_1.5-9.1 ## [49] irlba_2.3.3 akima_0.6-2 ## [51] compiler_3.6.0 pkgdown_1.3.0 -## [53] rsvd_1.0.1 rlang_0.3.4 +## [53] rsvd_1.0.2 rlang_0.4.0.9000 ## [55] grid_3.6.0 RCurl_1.95-4.12 -## [57] BiocNeighbors_1.3.1 rstudioapi_0.10 +## [57] BiocNeighbors_1.3.3 rstudioapi_0.10 ## [59] labeling_0.3 bitops_1.0-6 -## [61] rmarkdown_1.13 npsurv_0.4-0 +## [61] rmarkdown_1.14 npsurv_0.4-0 ## [63] gtable_0.3.0 roxygen2_6.1.1 ## [65] R6_2.4.0 gridExtra_2.3 -## [67] knitr_1.23 dplyr_0.8.1 +## [67] knitr_1.24 dplyr_0.8.3 ## [69] commonmark_1.7 rprojroot_1.3-2 ## [71] desc_1.2.0 stringi_1.4.3 -## [73] ggbeeswarm_0.6.0 Rcpp_1.0.1 -## [75] tidyselect_0.2.5 xfun_0.7</code></pre> +## [73] ggbeeswarm_0.6.0 Rcpp_1.0.2 +## [75] tidyselect_0.2.5 xfun_0.8</code></pre> </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 0ff061a7e4b88669b7dfb70b57dda68fe7c36db7..2f3a51d149440a8cfea07837767fd4aa7adc84b7 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 f51f16d6db479e30b1d41c8d08b7fb096dd99fcd..3ce71bea97a65e22b511857a23df647e489bf034 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 24b56c8b7518ab1a9ab92df980e51d200e80d870..55aae155ab2246b5d55114c287cba41d4f20c7b2 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 c583ed99b0a0e5726373f761aef90bb27c0063c8..f920a2a1f279aed8d33f7e648a7e7b038c3f6f22 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 ebe5121ff6c61c866f094d9f7127ee41205188db..0abaa3410060c6a98b7baaeb10a8fcdf6260b92b 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 5d5e6c8317d3a8584b4f4b86ed5482d16dd66a40..f55d6dd3249a5c0c3048d23f3ccb51ba6649c4e5 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 80c8e24f97912f12a4084171521291faf7fb8a03..c2aeb78f5bf8cf30d6348ddc5feebb386d60229c 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 aefaeeb7134b2a91592fa7521c04ee7c519b6c4b..9b0628478d9ea0b6d51c567c2ca1c36c439d0e29 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 b2a958f582677296cdf0e6106b7395ecab7706ff..74a2c3f51ea5df24ec9e65fb964285d560e2829a 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/authors.html b/docs/authors.html index e86ce0ef6b9f665a1a106da768a2a3581e0fdc11..b153ba9a2e3cf0536224fe3725d610ad7b5ff468 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/index.html b/docs/index.html index 421e16e05c186ae6c89f79e785aa75be3eeee216..2ac8ff42716b6cbc8f97d465689280b60b41eed2 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,7 +41,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/news/index.html b/docs/news/index.html index 0c6fce1186008222d91d6553c45cee72a82705db..f0030471c0dac289e1698d155d2aaa40f7a1d409 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -130,6 +130,23 @@ <small>Source: <a href='https://github.com/Oshlack/splatter/blob/master/NEWS.md'><code>NEWS.md</code></a></small> </div> + <div id="version-1-9-4-2019-08-20" class="section level2"> +<h2 class="hasAnchor"> +<a href="#version-1-9-4-2019-08-20" class="anchor"></a>Version 1.9.4 (2019-08-20)</h2> +<ul> +<li>Fix deprecated column name in diffSCEs QQ plots</li> +<li>Fix bugs where parameters were not being passed correctly in BASiCSEstimate and sparseDCEstimate</li> +<li>Replace the sc_example_counts dataset from scater with the mockSCE function</li> +<li>Tidy and improve estimation function examples</li> +</ul> +</div> + <div id="version-1-9-3-2019-08-08" class="section level2"> +<h2 class="hasAnchor"> +<a href="#version-1-9-3-2019-08-08" class="anchor"></a>Version 1.9.3 (2019-08-08)</h2> +<ul> +<li>Remove deprecated scater functions</li> +</ul> +</div> <div id="version-1-9-2-2019-06-13" class="section level2"> <h2 class="hasAnchor"> <a href="#version-1-9-2-2019-06-13" class="anchor"></a>Version 1.9.2 (2019-06-13)</h2> @@ -768,6 +785,8 @@ <div id="tocnav"> <h2>Contents</h2> <ul class="nav nav-pills nav-stacked"> + <li><a href="#version-1-9-4-2019-08-20">1.9.4</a></li> + <li><a href="#version-1-9-3-2019-08-08">1.9.3</a></li> <li><a href="#version-1-9-2-2019-06-13">1.9.2</a></li> <li><a href="#version-1-9-1-2019-06-05">1.9.1</a></li> <li><a href="#version-1-9-0-2019-05-03">1.9.0</a></li> diff --git a/docs/reference/BASiCSEstimate.html b/docs/reference/BASiCSEstimate.html index 8f4dc0439d6ae0f66a57a212320d8de0f47e054b..452fba0e9e8aeb343bf8e662731f04712999c70e 100644 --- a/docs/reference/BASiCSEstimate.html +++ b/docs/reference/BASiCSEstimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -230,13 +230,13 @@ information is provided there must be at least two batches. See <pre class="examples"><span class='co'># NOT RUN {</span> <span class='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) +<span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() -<span class='no'>spike.info</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>Name</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/colnames'>rownames</a></span>(<span class='no'>sc_example_counts</span>)[<span class='fl'>1</span>:<span class='fl'>10</span>], +<span class='no'>spike.info</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/data.frame'>data.frame</a></span>(<span class='kw'>Name</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/colnames'>rownames</a></span>(<span class='no'>sce</span>)[<span class='fl'>1</span>:<span class='fl'>10</span>], <span class='kw'>Input</span> <span class='kw'>=</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/stats/topics/Normal'>rnorm</a></span>(<span class='fl'>10</span>, <span class='fl'>500</span>, <span class='fl'>200</span>), <span class='kw'>stringsAsFactors</span> <span class='kw'>=</span> <span class='fl'>FALSE</span>) -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>BASiCSEstimate</span>(<span class='no'>sc_example_counts</span>[<span class='fl'>1</span>:<span class='fl'>100</span>, <span class='fl'>1</span>:<span class='fl'>30</span>], - <span class='no'>spike.info</span>) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>BASiCSEstimate</span>(<span class='no'>sce</span>[<span class='fl'>1</span>:<span class='fl'>100</span>, <span class='fl'>1</span>:<span class='fl'>30</span>], <span class='no'>spike.info</span>) <span class='no'>params</span> <span class='co'># }</span></pre> </div> diff --git a/docs/reference/BASiCSParams.html b/docs/reference/BASiCSParams.html index 2462ae7689859df269f24350e8c6899d41bc3ff5..b0ff46af20e2d47beaeca1e3c42a2da8f7f8a397 100644 --- a/docs/reference/BASiCSParams.html +++ b/docs/reference/BASiCSParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/BASiCSSimulate.html b/docs/reference/BASiCSSimulate.html index bc9dceeebf5866abb89e484aeafce0d4a3902191..6b06de4a214fbdca4551f0a5ef8ecf898172c607 100644 --- a/docs/reference/BASiCSSimulate.html +++ b/docs/reference/BASiCSSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -183,7 +183,11 @@ Single-Cell Sequencing data. PLoS Computational Biology (2015).</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"BASiCS"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { <span class='no'>sim</span> <span class='kw'><-</span> <span class='fu'>BASiCSSimulate</span>() -}</div><div class='output co'>#> <span class='message'>Getting parameters...</span></div><div class='output co'>#> <span class='warning'>Warning: Number of gene.params not equal to nGenes, gene.params will be sampled.</span></div><div class='output co'>#> <span class='warning'>Warning: Number of cell.params not equal to nCells, cell.params will be sampled.</span></div><div class='output co'>#> <span class='message'>Simulating counts with BASiCS...</span></div><div class='output co'>#> <span class='message'>Creating final dataset...</span></div><div class='output co'>#> <span class='message'>Done!</span></div></pre> +}</div><div class='output co'>#> <span class='message'>No methods found in package ‘scran’ for request: ‘computeSumFactors’ when loading ‘BASiCS’</span></div><div class='output co'>#> <span class='message'>Getting parameters...</span></div><div class='output co'>#> <span class='warning'>Warning: Number of gene.params not equal to nGenes, gene.params will be sampled.</span></div><div class='output co'>#> <span class='warning'>Warning: Number of cell.params not equal to nCells, cell.params will be sampled.</span></div><div class='output co'>#> <span class='message'>Simulating counts with BASiCS...</span></div><div class='output co'>#> <span class='warning'>Warning: 'SingleCellExperiment::`isSpike<-`' is deprecated.</span> +#> <span class='warning'>Use 'isSpike<-' instead.</span> +#> <span class='warning'>See help("Deprecated")</span></div><div class='output co'>#> <span class='warning'>Warning: 'spikeNames' is deprecated.</span> +#> <span class='warning'>See help("Deprecated")</span></div><div class='output co'>#> <span class='warning'>Warning: 'isSpike' is deprecated.</span> +#> <span class='warning'>See help("Deprecated")</span></div><div class='output co'>#> <span class='message'>Creating final dataset...</span></div><div class='output co'>#> <span class='message'>Done!</span></div></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/Lun2Params.html b/docs/reference/Lun2Params.html index 15a42724a62fc9379232e2f7c6e7979b5b7b7e11..459e9e187fa917a7c16c0198d925cce9c94cb651 100644 --- a/docs/reference/Lun2Params.html +++ b/docs/reference/Lun2Params.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/LunParams.html b/docs/reference/LunParams.html index f3a58be78fc2a22238c98f88a6460d359256a568..e7d64ceba1eb500e7eca52f74b3677f59a77aeb2 100644 --- a/docs/reference/LunParams.html +++ b/docs/reference/LunParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/MFAParams.html b/docs/reference/MFAParams.html index f908715242c79c8c9c65270e066fccbb600abb1a..34fe9c2f31137ba7094648baf2c43abb7111464f 100644 --- a/docs/reference/MFAParams.html +++ b/docs/reference/MFAParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/Params.html b/docs/reference/Params.html index c88efd371183a18462dd72816afc4785f02d8dd8..7f217310b5e3b2895dd843a64874e3a42c99f74d 100644 --- a/docs/reference/Params.html +++ b/docs/reference/Params.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/PhenoParams.html b/docs/reference/PhenoParams.html index ef3b5cb9fbe7dbee7b1830c900be111fbd0bf769..7954da788d508cdf1612fd1ac2bb6f176ae043bd 100644 --- a/docs/reference/PhenoParams.html +++ b/docs/reference/PhenoParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/SCDDParams.html b/docs/reference/SCDDParams.html index 9fd6a837be7ab5b0b48ff02eb655b84ee8826126..bd0a8fe4185b5491e3af1d0dc49d0e229b521eb5 100644 --- a/docs/reference/SCDDParams.html +++ b/docs/reference/SCDDParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/SimpleParams.html b/docs/reference/SimpleParams.html index cc7d362be7df998f1836a43b2d8555efd2d461e5..44c0c90fadb2b8d9399b0f4a34bbc6cd32e3b052 100644 --- a/docs/reference/SimpleParams.html +++ b/docs/reference/SimpleParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/SparseDCParams.html b/docs/reference/SparseDCParams.html index 59b5f6c934960e0bc2863f8d1291f4182f43c519..3646990bebeebb4a987d34b661a9c9e7f6e6744b 100644 --- a/docs/reference/SparseDCParams.html +++ b/docs/reference/SparseDCParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/SplatParams.html b/docs/reference/SplatParams.html index 60400f802eca7c6f1b3e02f252dc236dc78c6800..0222642f13dd2a251dda13eeef4ce208705c8813 100644 --- a/docs/reference/SplatParams.html +++ b/docs/reference/SplatParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/ZINBParams.html b/docs/reference/ZINBParams.html index d2d7e31f14d886a61b6650d1bb8f654535f2cefe..b3fc714c5e4a65535179a5a9cc40d1e992e3b556 100644 --- a/docs/reference/ZINBParams.html +++ b/docs/reference/ZINBParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/addFeatureStats.html b/docs/reference/addFeatureStats.html index d5504ec198ef3c00c00493dcbfae63edf2d42142..3cdc328747dd0592f00045682a613687cc957660 100644 --- a/docs/reference/addFeatureStats.html +++ b/docs/reference/addFeatureStats.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/addGeneLengths.html b/docs/reference/addGeneLengths.html index 3b326e6d29ce1c2b2bbd893fe33c20815c099b7d..b56e4d6723226f07a9fc1cb9fea7531da5c9d4fd 100644 --- a/docs/reference/addGeneLengths.html +++ b/docs/reference/addGeneLengths.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -189,14 +189,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://www.rdocumentation.org/packages/utils/topics/head'>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.221285968743642 2049 -#> Gene2 Gene2 0.161431648598517 5937 -#> Gene3 Gene3 0.00582629684879718 2659 -#> Gene4 Gene4 0.129723232841076 2545 -#> Gene5 Gene5 0.669900182050992 3400 -#> Gene6 Gene6 0.109974157615514 883</div><div class='input'># Sample method (human coding genes) +#> Gene GeneMean Length +#> <factor> <numeric> <numeric> +#> Gene1 Gene1 0.0138665247174492 6630 +#> Gene2 Gene2 1.25529432999633 4894 +#> Gene3 Gene3 0.0375780248572044 1723 +#> Gene4 Gene4 1.69560565875577 1886 +#> Gene5 Gene5 1.12938171645951 438 +#> Gene6 Gene6 0.14592367445476 1508</div><div class='input'># Sample method (human coding genes) </div><span class='co'># NOT RUN {</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>TxDb.Hsapiens.UCSC.hg19.knownGene</span>) <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>GenomicFeatures</span>) diff --git a/docs/reference/bridge.html b/docs/reference/bridge.html index abe31b714c2d78601e414bed7c2ae5fd6a0c9ecc..09d46929fad36e0f7899868424314e6e1d0fd0f2 100644 --- a/docs/reference/bridge.html +++ b/docs/reference/bridge.html @@ -76,7 +76,7 @@ a random walk with fixed end points." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/bringItemsForward.html b/docs/reference/bringItemsForward.html index 865ccd243aabbbe8893de507e01b44958ea703ac..a1d1b4e9d5e64427fbee46692b6ceff6271e2d5a 100644 --- a/docs/reference/bringItemsForward.html +++ b/docs/reference/bringItemsForward.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/compareSCEs.html b/docs/reference/compareSCEs.html index 27d3147aa746635d57d5acad370fa56aaed9d039..3558bac8f747874074e45cf9f18ed8c77cdc873f 100644 --- a/docs/reference/compareSCEs.html +++ b/docs/reference/compareSCEs.html @@ -76,7 +76,7 @@ basic plots comparing them." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -202,10 +202,10 @@ compare.</p></td> </dl></p></dd> </dl> <p>The plots returned by this function are created using -<code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code> and are only a sample of the kind of plots you +<code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code> and are only a sample of the kind of plots you might like to consider. The data used to create these plots is also returned and should be in the correct format to allow you to create further plots -using <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code>.</p> +using <code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code>.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> diff --git a/docs/reference/diffSCEs.html b/docs/reference/diffSCEs.html index a81330eba83d68e408d5326a6d488693fe6911d1..224bcd7a66d21fcb0978e37bdad025cdcc4008a6 100644 --- a/docs/reference/diffSCEs.html +++ b/docs/reference/diffSCEs.html @@ -76,7 +76,7 @@ basic plots comparing them to a reference." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -222,10 +222,10 @@ Q-Q plots are also returned.</p> </dl></p></dd> </dl> <p>The plots returned by this function are created using -<code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code> and are only a sample of the kind of plots you +<code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code> and are only a sample of the kind of plots you might like to consider. The data used to create these plots is also returned and should be in the correct format to allow you to create further plots -using <code><a href='https://www.rdocumentation.org/packages/ggplot2/topics/ggplot'>ggplot</a></code>.</p> +using <code><a href='https://ggplot2.tidyverse.org/reference/ggplot.html'>ggplot</a></code>.</p> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> diff --git a/docs/reference/expandParams.html b/docs/reference/expandParams.html index f37a15e0600dae3f7ecde9496a7b89e890121811..d4495b8614bb1c86c1b3a9f442536e45cb91c863 100644 --- a/docs/reference/expandParams.html +++ b/docs/reference/expandParams.html @@ -76,7 +76,7 @@ the number of groups." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/getLNormFactors.html b/docs/reference/getLNormFactors.html index 61257d57df63cd831e6434f9d6d1fce38b45ca99..63d1f8507118eb409352e0c23ed0100b079c7575 100644 --- a/docs/reference/getLNormFactors.html +++ b/docs/reference/getLNormFactors.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/getParam.html b/docs/reference/getParam.html index 580b8e20fb4330116c8ebf8facdafe34341ea0b7..734d0c02827ba922322bd4031c3ed64e837f96df 100644 --- a/docs/reference/getParam.html +++ b/docs/reference/getParam.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/getParams.html b/docs/reference/getParams.html index 75a0074ffdf591e3ab8dc34016ab9a6e999aaa48..fee5de7823a0365bea0e7602073f73c5f01b5630 100644 --- a/docs/reference/getParams.html +++ b/docs/reference/getParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/getPathOrder.html b/docs/reference/getPathOrder.html index aaef074cfdd1f509334b3106a9e35f77e08bd736..eeb0f53ad0c977bb0ce539d716cde43fff1b5c28 100644 --- a/docs/reference/getPathOrder.html +++ b/docs/reference/getPathOrder.html @@ -76,7 +76,7 @@ already been simulated." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/index.html b/docs/reference/index.html index 1314234af59defbed2bd49eb4d1462fae363c13d..447789697078670a1a64ab8125d17cfaf920a5d1 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -72,7 +72,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/listSims.html b/docs/reference/listSims.html index a0e5e98f39c19d2dee793b4aa698c46a1201580d..33d3e225777547f73e4a7d982e278c50cc4dc59a 100644 --- a/docs/reference/listSims.html +++ b/docs/reference/listSims.html @@ -76,7 +76,7 @@ brief description." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/logistic.html b/docs/reference/logistic.html index 9b5dd6455b2b00cd821a6e2f2513eed634c80545..bc3868ffe35f44b93cf8a22c7415199cc97063e0 100644 --- a/docs/reference/logistic.html +++ b/docs/reference/logistic.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/lun2Estimate.html b/docs/reference/lun2Estimate.html index 268ef4d364f212232e1b221e31946a4cc1123cd5..c03ca8ec31e9c190ab6e12d636bcd792be2987ea 100644 --- a/docs/reference/lun2Estimate.html +++ b/docs/reference/lun2Estimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -198,11 +198,11 @@ single core.</p></td> <pre class="examples"><span class='co'># NOT RUN {</span> <span class='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_cell_info"</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) +<span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() -<span class='no'>plates</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/factor'>factor</a></span>(<span class='no'>sc_example_cell_info</span>$<span class='no'>Mutation_Status</span>) -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>lun2Estimate</span>(<span class='no'>sc_example_counts</span>, <span class='no'>plates</span>, <span class='kw'>min.size</span> <span class='kw'>=</span> <span class='fl'>20</span>) +<span class='no'>plates</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/numeric'>as.numeric</a></span>(<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/factor'>factor</a></span>(<span class='fu'>colData</span>(<span class='no'>sce</span>)$<span class='no'>Mutation_Status</span>)) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>lun2Estimate</span>(<span class='no'>sce</span>, <span class='no'>plates</span>, <span class='kw'>min.size</span> <span class='kw'>=</span> <span class='fl'>20</span>) <span class='no'>params</span> <span class='co'># }</span></pre> </div> diff --git a/docs/reference/lun2Simulate.html b/docs/reference/lun2Simulate.html index a6fd39bb0f9efa462a5b2731dfec56a10beccf2d..779f67620bbb71a2c6b87e452f0e89b25eaafe56 100644 --- a/docs/reference/lun2Simulate.html +++ b/docs/reference/lun2Simulate.html @@ -77,7 +77,7 @@ analyses of single-cell RNA-seq data"." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/lunEstimate.html b/docs/reference/lunEstimate.html index 443bad885ac75d85de36d19d78c9b4d7c05785b0..b4f9713b0028a7c6fac699776ddb24f381d72ccc 100644 --- a/docs/reference/lunEstimate.html +++ b/docs/reference/lunEstimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -176,15 +176,16 @@ 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='co'># Load example data</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>)</div><div class='output co'>#> <span class='message'>Loading required package: ggplot2</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>)</div><div class='output co'>#> <span class='warning'>Warning: package ‘scater’ was built under R version 3.6.1</span></div><div class='output co'>#> <span class='message'>Loading required package: ggplot2</span></div><div class='input'><span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) +<span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>lunEstimate</span>(<span class='no'>sc_example_counts</span>) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>lunEstimate</span>(<span class='no'>sce</span>) <span class='no'>params</span></div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>LunParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> 848036 #> #> 9 additional parameters #> @@ -198,7 +199,7 @@ for more details on the parameters.</p> #> #> </span><span style='font-weight: bold;'>Groups:</span><span> #> </span><span style='color: #0000BB;font-weight: bold;'> [GROUPS]</span><span> </span><span style='color: #0000BB;font-weight: bold;'>[GROUP CELLS]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 1</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 1</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> #> #> </span><span style='font-weight: bold;'>Diff expr:</span><span> #> </span><span style='color: #0000BB;'> [Genes]</span><span> </span><span style='color: #0000BB;'>[Up Prop]</span><span> </span><span style='color: #0000BB;'> [Up FC]</span><span> </span><span style='color: #0000BB;'>[Down FC]</span><span> diff --git a/docs/reference/lunSimulate.html b/docs/reference/lunSimulate.html index ed1ffc71aa04d81d325dfc9217afcd803e09e52d..a11f5013f98649206a9ce6ce2384cb86f4cc17c4 100644 --- a/docs/reference/lunSimulate.html +++ b/docs/reference/lunSimulate.html @@ -77,7 +77,7 @@ sequencing data with many zero counts"." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/makeCompPanel.html b/docs/reference/makeCompPanel.html index 6ee259cef322afec0a675f078bb7f3807c210382..fdd8c1237d3bfc2032b07580222eb9cfa1b99062 100644 --- a/docs/reference/makeCompPanel.html +++ b/docs/reference/makeCompPanel.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/makeDiffPanel.html b/docs/reference/makeDiffPanel.html index b8ddb6dcf4e2a24438dbf1a355cd2353dc75f366..77431dda2cd2cfbee0730e47123744f4ae673078 100644 --- a/docs/reference/makeDiffPanel.html +++ b/docs/reference/makeDiffPanel.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/makeOverallPanel.html b/docs/reference/makeOverallPanel.html index 484fd041ead03d67a432d8244d2bbc60326b66ef..b62f07685637f7a103787a58954d8c12c0ab30af 100644 --- a/docs/reference/makeOverallPanel.html +++ b/docs/reference/makeOverallPanel.html @@ -76,7 +76,7 @@ single panel." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/mfaEstimate.html b/docs/reference/mfaEstimate.html index 24abbc07bd12b9dc4f82951a2ff73240e55d30ff..0c01fcddd9fb41ac187e4122a41dd060170026de 100644 --- a/docs/reference/mfaEstimate.html +++ b/docs/reference/mfaEstimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -178,17 +178,18 @@ 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='co'># Load example data</span> <span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"mfa"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { - <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) - <span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>mfa</span>) + <span class='no'>synth</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/mfa/topics/create_synthetic'>create_synthetic</a></span>(<span class='kw'>C</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>G</span> <span class='kw'>=</span> <span class='fl'>5</span>, <span class='kw'>zero_negative</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>, + <span class='kw'>model_dropout</span> <span class='kw'>=</span> <span class='fl'>TRUE</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> <span class='kw'><-</span> <span class='fu'>mfaEstimate</span>(<span class='no'>synth</span>$<span class='no'>X</span>) <span class='no'>params</span> }</div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>MFAParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 20</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 5</span><span> 848036 #> #> 4 additional parameters #> @@ -201,8 +202,8 @@ details on the parameters.</p> #> TRUE #> #> </span><span style='font-weight: bold;'>Dropout:</span><span> -#> </span><span style='color: #0000BB;'> [Present]</span><span> </span><span style='font-weight: bold;'> (LAMBDA)</span><span> -#> FALSE </span><span style='color: #00BB00;font-weight: bold;'>0.00352186231063193</span><span> +#> </span><span style='color: #0000BB;'> [Present]</span><span> </span><span style='font-weight: bold;'> (LAMBDA)</span><span> +#> FALSE </span><span style='color: #00BB00;font-weight: bold;'>0.27079716144347</span><span> #> </div></span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> diff --git a/docs/reference/mfaSimulate.html b/docs/reference/mfaSimulate.html index 775566dd179fd3b1b5f413cbf7bcd5d849d877a8..e69fc247a563c284055395a1326f59eb03dad11d 100644 --- a/docs/reference/mfaSimulate.html +++ b/docs/reference/mfaSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/newParams.html b/docs/reference/newParams.html index 70900a648d3e6ca91e75e6e148204cc10ebce1e9..22a4ac0d1a8cee7cb0f382c746aa1d6ba2f5d5c9 100644 --- a/docs/reference/newParams.html +++ b/docs/reference/newParams.html @@ -76,7 +76,7 @@ Params subtypes." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/phenoEstimate.html b/docs/reference/phenoEstimate.html index 6647d18b9c50ee62c2583ece6d0d34a2b2633c00..fcebc27d2b75140b43a51aaa07e8e8e4a1d5522c 100644 --- a/docs/reference/phenoEstimate.html +++ b/docs/reference/phenoEstimate.html @@ -76,7 +76,7 @@ dataset." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -180,16 +180,17 @@ See <code><a href='PhenoParams.html'>PhenoParams</a></code> for more details on <pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"phenopath"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { <span class='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) - <span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) + <span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() - <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>phenoEstimate</span>(<span class='no'>sc_example_counts</span>) + <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>phenoEstimate</span>(<span class='no'>sce</span>) <span class='no'>params</span> }</div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>PhenoParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> 848036 #> #> 4 additional parameters #> diff --git a/docs/reference/phenoSimulate.html b/docs/reference/phenoSimulate.html index 73a069ecddb269649ad6fc94b54717b0ecde4803..3b92f027afd9dcd2e105fa45feadbad9eff37f52 100644 --- a/docs/reference/phenoSimulate.html +++ b/docs/reference/phenoSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/rbindMatched.html b/docs/reference/rbindMatched.html index 96d4c3e4cf5b867504d26d636583870be22082bd..77d8fef99fa6a5a6e351fa609ebee7fe5c92b895 100644 --- a/docs/reference/rbindMatched.html +++ b/docs/reference/rbindMatched.html @@ -76,7 +76,7 @@ to both." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/scDDEstimate.html b/docs/reference/scDDEstimate.html index 5a940351903ade56fcf681c2cc71910fb82b13e8..c4755d443d1177fde8f6674b6c661173cb120ea7 100644 --- a/docs/reference/scDDEstimate.html +++ b/docs/reference/scDDEstimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -207,15 +207,46 @@ simulate. The output is then converted to a SCDDParams object. See <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><span class='co'># NOT RUN {</span> -<span class='co'># Load example data</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) - -<span class='no'>conditions</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sample'>sample</a></span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/nrow'>ncol</a></span>(<span class='no'>sc_example_counts</span>), <span class='kw'>replace</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>scDDEstimate</span>(<span class='no'>sc_example_counts</span>, <span class='kw'>conditions</span> <span class='kw'>=</span> <span class='no'>conditions</span>) -<span class='no'>params</span> -<span class='co'># }</span></pre> + <pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"scDD"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) + <span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>(<span class='kw'>ncells</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>ngenes</span> <span class='kw'>=</span> <span class='fl'>100</span>) + + <span class='fu'>colData</span>(<span class='no'>sce</span>)$<span class='no'>condition</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sample'>sample</a></span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/nrow'>ncol</a></span>(<span class='no'>sce</span>), <span class='kw'>replace</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>) + <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>scDDEstimate</span>(<span class='no'>sce</span>, <span class='kw'>condition</span> <span class='kw'>=</span> <span class='st'>"condition"</span>) + <span class='no'>params</span> +}</div><div class='output co'>#> <span class='message'>Performing Median Normalization</span></div><div class='output co'>#> <span class='message'>Notice: 10 genes have less than 3 nonzero cells per condition. Skipping these genes.</span></div><div class='output co'>#> <span class='message'>Setting up parallel back-end using FALSE cores</span></div><div class='output co'>#> <span class='message'>Clustering observed expression data for each gene</span></div><div class='output co'>#> <span class='message'>Notice: Number of permutations is set to zero; using </span> +#> <span class='message'> Kolmogorov-Smirnov to test for differences in distributions</span> +#> <span class='message'> instead of the Bayes Factor permutation test</span></div><div class='output co'>#> <span class='message'>Classifying significant genes into patterns</span></div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>SCDDParams</span><span> +#> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> +#> +#> </span><span style='font-weight: bold;'>Global:</span><span> +#> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 100</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 10</span><span> 848036 +#> +#> 11 additional parameters +#> +#> Data: +#> (SCdat) +#> SingleCellExperiment with 95 features and 20 cells +#> +#> </span><span style='font-weight: bold;'>Genes:</span><span> +#> </span><span style='font-weight: bold;'>(NDE)</span><span> </span><span style='font-weight: bold;'>(NDP)</span><span> </span><span style='font-weight: bold;'>(NDM)</span><span> </span><span style='font-weight: bold;'>(NDP)</span><span> </span><span style='font-weight: bold;'>(NEE)</span><span> </span><span style='font-weight: bold;'>(NEP)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 0</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 95</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 5</span><span> +#> +#> </span><span style='font-weight: bold;'>Fold change:</span><span> +#> </span><span style='color: #0000BB;'>[SD Range]</span><span> </span><span style='color: #0000BB;'> [Mode FC]</span><span> +#> 1, 3 2, 3, 4 +#> +#> </span><span style='font-weight: bold;'>Variance:</span><span> +#> </span><span style='color: #0000BB;'>[Inflation]</span><span> +#> 1, 1 +#> +#> </span><span style='font-weight: bold;'>Condition:</span><span> +#> </span><span style='color: #0000BB;'>[Condition]</span><span> +#> condition +#> </div><div class='input'> +</div></span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/scDDSimulate.html b/docs/reference/scDDSimulate.html index ff3026d90d3374d5f12ba43b029b59614615b838..73fb89ab3d92effa25c336b9c7ce3864c96c9dc4 100644 --- a/docs/reference/scDDSimulate.html +++ b/docs/reference/scDDSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/setParam.html b/docs/reference/setParam.html index 3620cd9071be1f2aa510457a5dacde562143886d..b4cd5c552cde5c77817eabc7f51f067afcc1a465 100644 --- a/docs/reference/setParam.html +++ b/docs/reference/setParam.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -195,7 +195,7 @@ #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> (Cells) </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 100</span><span> 100 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 100</span><span> 100 848036 #> #> 3 additional parameters #> diff --git a/docs/reference/setParamUnchecked.html b/docs/reference/setParamUnchecked.html index 831b775ab6d7cdd696aea83d6a0bcb1b2887688d..f92a6d9803ae4ea46a09d699dd35b309c396a253 100644 --- a/docs/reference/setParamUnchecked.html +++ b/docs/reference/setParamUnchecked.html @@ -76,7 +76,7 @@ VALIDITY!" /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/setParams.html b/docs/reference/setParams.html index 751772cdebeb751eef296ae1ffb4c8d7f76c37b7..293e90fcb3701956a0cef85dbf71b20249676e03 100644 --- a/docs/reference/setParams.html +++ b/docs/reference/setParams.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -187,7 +187,7 @@ them manually), see examples.</p> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> (Genes) (Cells) </span><span style='color: #0000BB;'> [Seed]</span><span> -#> 10000 100 33352 +#> 10000 100 848036 #> #> 3 additional parameters #> @@ -205,7 +205,7 @@ them manually), see examples.</p> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 1000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 50</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 1000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 50</span><span> 848036 #> #> 3 additional parameters #> @@ -223,7 +223,7 @@ them manually), see examples.</p> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 1000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 50</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 1000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 50</span><span> 848036 #> #> 3 additional parameters #> diff --git a/docs/reference/setParamsUnchecked.html b/docs/reference/setParamsUnchecked.html index 20b2c9288f5d17278060fa8721d335f4f9fdb86b..d3b1f12a2fcbac817a60f768b132aacab1fc44cb 100644 --- a/docs/reference/setParamsUnchecked.html +++ b/docs/reference/setParamsUnchecked.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/showDFs.html b/docs/reference/showDFs.html index efa09a8c0bd6b677432187dd4488801f94e244c6..4a8797e324de71b573ebf1c5da8e7ef659761de4 100644 --- a/docs/reference/showDFs.html +++ b/docs/reference/showDFs.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/showPP.html b/docs/reference/showPP.html index 172afada8af603217458b86a7ae9c5e1a162bd60..72281fc74bfa8690dbae95462837ec072d6bdfbd 100644 --- a/docs/reference/showPP.html +++ b/docs/reference/showPP.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/showValues.html b/docs/reference/showValues.html index c8ecdd1e3a92e71bdd325349a2a31da5cf4e8b5f..f4333054351681674fdc34ba5076a839b2c9df29 100644 --- a/docs/reference/showValues.html +++ b/docs/reference/showValues.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/simpleEstimate.html b/docs/reference/simpleEstimate.html index 3fdd38c9a4db6129656c837d96247bf2a8acc953..1df5da041e00831acc3dfe9b53917a00eb292452 100644 --- a/docs/reference/simpleEstimate.html +++ b/docs/reference/simpleEstimate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -179,21 +179,22 @@ 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='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) +<span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>simpleEstimate</span>(<span class='no'>sc_example_counts</span>) +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>simpleEstimate</span>(<span class='no'>sce</span>) <span class='no'>params</span></div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>SimpleParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> 848036 #> #> 3 additional parameters #> #> </span><span style='font-weight: bold;'>Mean:</span><span> -#> </span><span style='font-weight: bold;'> (RATE)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'>0.0008052293183292</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0.131835949613878</span><span> +#> </span><span style='font-weight: bold;'> (RATE)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'>0.00315146081285586</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0.562634238245172</span><span> #> #> </span><span style='font-weight: bold;'>Counts:</span><span> #> </span><span style='color: #0000BB;'>[Dispersion]</span><span> diff --git a/docs/reference/simpleSimulate.html b/docs/reference/simpleSimulate.html index 081fc05ebb312af49884b2f80b7e34f4f689ca1d..9892d217623484e5aeab2bfb87df3c2a1cfea386 100644 --- a/docs/reference/simpleSimulate.html +++ b/docs/reference/simpleSimulate.html @@ -76,7 +76,7 @@ simulated library sizes, differential expression etc." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/sparseDCEstimate.html b/docs/reference/sparseDCEstimate.html index 8b72fd2a3a2f6a830b1938a86505f44a6937a76f..84a2dfcde512fdde229136e00dbbb896b708f07e 100644 --- a/docs/reference/sparseDCEstimate.html +++ b/docs/reference/sparseDCEstimate.html @@ -76,7 +76,7 @@ dataset." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -199,20 +199,19 @@ input data. The counts are preprocessed using <pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"SparseDC"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { <span class='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) - <span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) - <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) - <span class='no'>conditions</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sample'>sample</a></span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/nrow'>ncol</a></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'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>(<span class='kw'>ncells</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>ngenes</span> <span class='kw'>=</span> <span class='fl'>100</span>) + + <span class='no'>conditions</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/sample'>sample</a></span>(<span class='fl'>1</span>:<span class='fl'>2</span>, <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/nrow'>ncol</a></span>(<span class='no'>sce</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>, - <span class='kw'>nclusters</span> <span class='kw'>=</span> <span class='fl'>3</span>) + <span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>sparseDCEstimate</span>(<span class='no'>sce</span>, <span class='no'>conditions</span>, <span class='kw'>nclusters</span> <span class='kw'>=</span> <span class='fl'>3</span>) <span class='no'>params</span> }</div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>SparseDCParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 500</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 20</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 100</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 10</span><span> 848036 #> #> 7 additional parameters #> @@ -222,7 +221,7 @@ input data. The counts are preprocessed using #> #> </span><span style='font-weight: bold;'>Clusters:</span><span> #> </span><span style='font-weight: bold;'>(CONDITION 1)</span><span> </span><span style='font-weight: bold;'>(CONDITION 2)</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 1, 2, 3</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 1, 2, 3</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 2, 3</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 1, 2, 3</span><span> #> #> </span><span style='font-weight: bold;'>Means:</span><span> #> </span><span style='color: #0000BB;'>[Lower]</span><span> </span><span style='color: #0000BB;'>[Upper]</span><span> diff --git a/docs/reference/sparseDCSimulate.html b/docs/reference/sparseDCSimulate.html index 7b5c7f7844fb2284700826abdc3b569fecbaa96c..91c9431184f9b4ee01e6a264ec3a0c139ab8a40f 100644 --- a/docs/reference/sparseDCSimulate.html +++ b/docs/reference/sparseDCSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstBCV.html b/docs/reference/splatEstBCV.html index 9de222d9a52bb7c2edc126ef5e1fcc5f835db822..892d553ddfbdc0faf732bf2b21e12b4092615cba 100644 --- a/docs/reference/splatEstBCV.html +++ b/docs/reference/splatEstBCV.html @@ -76,7 +76,7 @@ in the edgeR package." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstDropout.html b/docs/reference/splatEstDropout.html index 022dde63cb7414bafb0f6e67e31c3200352337a9..3d55190b1e19361d5ecb93a2e91694ef8739bb9e 100644 --- a/docs/reference/splatEstDropout.html +++ b/docs/reference/splatEstDropout.html @@ -76,7 +76,7 @@ when simulating dropout." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstLib.html b/docs/reference/splatEstLib.html index 7ad9b86bf06ef65029b4e10c0732bf86079ad696..0d9bce3a37927b0224487b107795626df2f714ad 100644 --- a/docs/reference/splatEstLib.html +++ b/docs/reference/splatEstLib.html @@ -79,7 +79,7 @@ fitdist for details on the fitting." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstMean.html b/docs/reference/splatEstMean.html index 9a871007427b48756ede6a747bce1770a164ee5b..5c74ce2832455db46c9a54265dc1facf20ef4a4e 100644 --- a/docs/reference/splatEstMean.html +++ b/docs/reference/splatEstMean.html @@ -76,7 +76,7 @@ simulate gene expression means." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstOutlier.html b/docs/reference/splatEstOutlier.html index 67fe903e20a1c81b26d81d26f46d319a3a2677ac..edd15aae5bf6e3b459e84d291d84f4512ba3b41d 100644 --- a/docs/reference/splatEstOutlier.html +++ b/docs/reference/splatEstOutlier.html @@ -76,7 +76,7 @@ median mean expression level." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatEstimate.html b/docs/reference/splatEstimate.html index cc661ae6f23b1327983064bed307d4ebd125eeff..b856b51dbdaf535e63b4a27af472f2169fb60f59 100644 --- a/docs/reference/splatEstimate.html +++ b/docs/reference/splatEstimate.html @@ -77,7 +77,7 @@ is done." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -181,33 +181,33 @@ containing count data to estimate parameters from.</p></td> <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> <pre class="examples"><div class='input'><span class='co'># Load example data</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) +<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) +<span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>() -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>splatEstimate</span>(<span class='no'>sc_example_counts</span>) -<span class='no'>params</span></div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>SplatParams</span><span> +<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>splatEstimate</span>(<span class='no'>sce</span>)</div><div class='output co'>#> <span class='message'>NOTE: Library sizes have been found to be normally distributed instead of log-normal. You may want to check this is correct.</span></div><div class='input'><span class='no'>params</span></div><div class='output co'>#> A <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>SplatParams</span><span> #> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> #> #> </span><span style='font-weight: bold;'>Global:</span><span> #> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 33352 +#> </span><span style='color: #00BB00;font-weight: bold;'> 2000</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> 848036 #> #> 28 additional parameters #> #> </span><span style='font-weight: bold;'>Batches:</span><span> #> </span><span style='color: #0000BB;font-weight: bold;'> [BATCHES]</span><span> </span><span style='color: #0000BB;font-weight: bold;'>[BATCH CELLS]</span><span> </span><span style='color: #0000BB;'> [Location]</span><span> </span><span style='color: #0000BB;'> [Scale]</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'> 1</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 40</span><span> 0.1 0.1 +#> </span><span style='color: #00BB00;font-weight: bold;'> 1</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 200</span><span> 0.1 0.1 #> #> </span><span style='font-weight: bold;'>Mean:</span><span> -#> </span><span style='font-weight: bold;'> (RATE)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'>0.0032639148887191</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0.419304527025529</span><span> +#> </span><span style='font-weight: bold;'> (RATE)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'>0.002962686167343</span><span> </span><span style='color: #00BB00;font-weight: bold;'>0.496997730070513</span><span> #> #> </span><span style='font-weight: bold;'>Library size:</span><span> -#> </span><span style='font-weight: bold;'> (LOCATION)</span><span> </span><span style='font-weight: bold;'> (SCALE)</span><span> (Norm) -#> </span><span style='color: #00BB00;font-weight: bold;'>12.7053037408488</span><span> </span><span style='color: #00BB00;font-weight: bold;'>0.58910919018286</span><span> FALSE +#> </span><span style='font-weight: bold;'> (LOCATION)</span><span> </span><span style='font-weight: bold;'> (SCALE)</span><span> </span><span style='font-weight: bold;'> (NORM)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 357331.235</span><span> </span><span style='color: #00BB00;font-weight: bold;'>11607.2332293176</span><span> </span><span style='color: #00BB00;font-weight: bold;'> TRUE</span><span> #> #> </span><span style='font-weight: bold;'>Exprs outliers:</span><span> -#> </span><span style='font-weight: bold;'> (PROBABILITY)</span><span> </span><span style='font-weight: bold;'> (LOCATION)</span><span> </span><span style='font-weight: bold;'> (SCALE)</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'>0.00623376623376623</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 4.22280669039478</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 0.422108697251885</span><span> +#> </span><span style='font-weight: bold;'>(PROBABILITY)</span><span> (Location) (Scale) +#> </span><span style='color: #00BB00;font-weight: bold;'> 0</span><span> 4 0.5 #> #> </span><span style='font-weight: bold;'>Groups:</span><span> #> </span><span style='color: #0000BB;'> [Groups]</span><span> </span><span style='color: #0000BB;'>[Group Probs]</span><span> @@ -218,12 +218,12 @@ containing count data to estimate parameters from.</p></td> #> 0.1 0.5 0.1 0.4 #> #> </span><span style='font-weight: bold;'>BCV:</span><span> -#> </span><span style='font-weight: bold;'> (COMMON DISP)</span><span> </span><span style='font-weight: bold;'> (DOF)</span><span> -#> </span><span style='color: #00BB00;font-weight: bold;'>3.21969047393022</span><span> </span><span style='color: #00BB00;font-weight: bold;'>14.7262017878812</span><span> +#> </span><span style='font-weight: bold;'> (COMMON DISP)</span><span> </span><span style='font-weight: bold;'> (DOF)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'>0.752043426792845</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 11211.8933424157</span><span> #> #> </span><span style='font-weight: bold;'>Dropout:</span><span> -#> </span><span style='color: #0000BB;'> [Type]</span><span> </span><span style='font-weight: bold;'> (MIDPOINT)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> -#> none </span><span style='color: #00BB00;font-weight: bold;'> 5.00420976858168</span><span> </span><span style='color: #00BB00;font-weight: bold;'>-0.652889139821156</span><span> +#> </span><span style='color: #0000BB;'> [Type]</span><span> </span><span style='font-weight: bold;'> (MIDPOINT)</span><span> </span><span style='font-weight: bold;'> (SHAPE)</span><span> +#> none </span><span style='color: #00BB00;font-weight: bold;'> 2.71153535179343</span><span> </span><span style='color: #00BB00;font-weight: bold;'>-1.37209356733765</span><span> #> #> </span><span style='font-weight: bold;'>Paths:</span><span> #> </span><span style='color: #0000BB;'> [From]</span><span> </span><span style='color: #0000BB;'> [Steps]</span><span> </span><span style='color: #0000BB;'> [Skew]</span><span> </span><span style='color: #0000BB;'> [Non-linear]</span><span> </span><span style='color: #0000BB;'>[Sigma Factor]</span><span> diff --git a/docs/reference/splatSimBCVMeans.html b/docs/reference/splatSimBCVMeans.html index 83a981ac8647e763f29b1c96cc982d48f380f4ea..09b53f454e7baa58952e41fc92d1e85b7d775968 100644 --- a/docs/reference/splatSimBCVMeans.html +++ b/docs/reference/splatSimBCVMeans.html @@ -77,7 +77,7 @@ and inverse gamma distribution." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimBatchCellMeans.html b/docs/reference/splatSimBatchCellMeans.html index a25aaedb6a0f58226f09aab0cb1a20314be27658..af9b6f8b082afaed04de5954816595a4f6666886 100644 --- a/docs/reference/splatSimBatchCellMeans.html +++ b/docs/reference/splatSimBatchCellMeans.html @@ -76,7 +76,7 @@ factors." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimBatchEffects.html b/docs/reference/splatSimBatchEffects.html index 1069b4194b7fb2e930daf5e36c22519c8fa271c6..e00a7b479ea7c5de030928faee8a2bae6fe260ff 100644 --- a/docs/reference/splatSimBatchEffects.html +++ b/docs/reference/splatSimBatchEffects.html @@ -77,7 +77,7 @@ means for each batch." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimCellMeans.html b/docs/reference/splatSimCellMeans.html index fb60ced950e00a4b6aee2fa52fc0f14be2bd961c..fb5916dade26e1ba36740a82a6281d7d7f001221 100644 --- a/docs/reference/splatSimCellMeans.html +++ b/docs/reference/splatSimCellMeans.html @@ -79,7 +79,7 @@ means are adjusted for each cell's expected library size." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimDE.html b/docs/reference/splatSimDE.html index 43252494352897343d3bdcc9cd1892559fb7925c..193af090dd2462b36449acb1c30b7bf8d10adeba 100644 --- a/docs/reference/splatSimDE.html +++ b/docs/reference/splatSimDE.html @@ -78,7 +78,7 @@ they are simulated in the correct order." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimDropout.html b/docs/reference/splatSimDropout.html index cd1e28a1c6aeaf5aefcf44db5a974dce7305101c..a1a19e712cc043357fb51c67febf6cf43e708763 100644 --- a/docs/reference/splatSimDropout.html +++ b/docs/reference/splatSimDropout.html @@ -78,7 +78,7 @@ to decide which counts should be dropped." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimGeneMeans.html b/docs/reference/splatSimGeneMeans.html index 38173599961f5eab1d6e68cbb2146b270d40698b..edb19ad0e099493f0b8a0ee66619aac24bb3158e 100644 --- a/docs/reference/splatSimGeneMeans.html +++ b/docs/reference/splatSimGeneMeans.html @@ -77,7 +77,7 @@ with the median mean expression multiplied by the outlier factor." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimLibSizes.html b/docs/reference/splatSimLibSizes.html index f68e638276b117b71267caf838ef46f8201e76b6..e9fa3ddd90075bf44e413bee03b558c4d7887d2d 100644 --- a/docs/reference/splatSimLibSizes.html +++ b/docs/reference/splatSimLibSizes.html @@ -77,7 +77,7 @@ negative values are set to half the minimum non-zero value." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimTrueCounts.html b/docs/reference/splatSimTrueCounts.html index e461be6dc3e47d49646850e4f7bf8ed6c12d167f..42cb24ee0353aca7dbd2f485af923ddf99f99113 100644 --- a/docs/reference/splatSimTrueCounts.html +++ b/docs/reference/splatSimTrueCounts.html @@ -77,7 +77,7 @@ group (or path position), expected library size and BCV." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatSimulate.html b/docs/reference/splatSimulate.html index 022dccb38bb674e040746dae9bbe3deee33efba7..65bb33a560262440e7f874bbf83c012f979173da 100644 --- a/docs/reference/splatSimulate.html +++ b/docs/reference/splatSimulate.html @@ -76,7 +76,7 @@ the Splat method." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/splatter.html b/docs/reference/splatter.html index 78a0156057d7e4379951a1b8ba06adcc1ab4b232..059361640781a4a1ba567c207b1b7de57ca26bb7 100644 --- a/docs/reference/splatter.html +++ b/docs/reference/splatter.html @@ -76,7 +76,7 @@ simulation of single-cell RNA-seq count data." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/summariseDiff.html b/docs/reference/summariseDiff.html index 98243cb58214451c25f166abdad525549b9d587b..731f6d47d224a28eed78e48b205b13414158af90 100644 --- a/docs/reference/summariseDiff.html +++ b/docs/reference/summariseDiff.html @@ -78,7 +78,7 @@ properties and ranks them." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -166,19 +166,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://www.rdocumentation.org/packages/base/topics/list'>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://www.rdocumentation.org/packages/utils/topics/head'>head</a></span>(<span class='no'>summary</span>)</div><div class='output co'>#> Dataset Statistic MAD MADScaled MADRank MAE MAEScaled -#> 1 Splat Mean 2.457239 NaN 1 2.449271 NaN -#> 2 Splat Variance 11.476979 NaN 1 10.248671 NaN -#> 3 Splat ZerosGene 30.000000 NaN 1 38.875000 NaN -#> 4 Splat MeanVar 10.941816 NaN 1 12.225792 NaN -#> 5 Splat MeanZeros 45.000000 NaN 1 42.325000 NaN -#> 6 Splat LibSize 54503.500000 NaN 1 55634.900000 NaN -#> MAERank RMSE RMSEScaled RMSERank KS KSPVal KSRank -#> 1 1 2.978541 NaN 1 0.327 0.000000e+00 1 -#> 2 1 12.923752 NaN 1 0.571 0.000000e+00 1 -#> 3 1 44.022437 NaN 1 0.558 0.000000e+00 1 -#> 4 1 15.333907 NaN 1 NA NA NA -#> 5 1 51.639375 NaN 1 NA NA NA -#> 6 1 56196.302323 NaN 1 1.000 4.122307e-09 1</div></pre> +#> 1 Splat Mean 2.288933 NaN 1 2.375445 NaN +#> 2 Splat Variance 11.025042 NaN 1 9.969259 NaN +#> 3 Splat ZerosGene 30.000000 NaN 1 40.500000 NaN +#> 4 Splat MeanVar 9.509015 NaN 1 11.819818 NaN +#> 5 Splat MeanZeros 45.000000 NaN 1 42.780000 NaN +#> 6 Splat LibSize 59367.000000 NaN 1 59618.300000 NaN +#> MAERank RMSE RMSEScaled RMSERank KS KSPVal KSRank +#> 1 1 2.85907 NaN 1 0.334 0.000000e+00 1 +#> 2 1 12.57383 NaN 1 0.573 0.000000e+00 1 +#> 3 1 45.84158 NaN 1 0.542 0.000000e+00 1 +#> 4 1 14.92356 NaN 1 NA NA NA +#> 5 1 51.94324 NaN 1 NA NA NA +#> 6 1 61010.54295 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 c8dcbe60c1999d814ba3a420671796a54adc66a7..b246c24d23f9a905043d4ac5900a0148cbe76f9c 100644 --- a/docs/reference/summariseKS.html +++ b/docs/reference/summariseKS.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/summariseStats.html b/docs/reference/summariseStats.html index 87415a00df6de6f640799a42a4058f21b6e43959..46c595c91b22bd8ab3a555110b853b461dab1856 100644 --- a/docs/reference/summariseStats.html +++ b/docs/reference/summariseStats.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/tidyStatSumm.html b/docs/reference/tidyStatSumm.html index 824258062785edbaa7df90c8539b600ef87d20c7..a381746263cd0c2e9651ba2f639e0136c8c6840e 100644 --- a/docs/reference/tidyStatSumm.html +++ b/docs/reference/tidyStatSumm.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/winsorize.html b/docs/reference/winsorize.html index b30675fd6c9622fb31e11e04d2ef2081fb94ef61..a3e57d92ddf1a0f9fccbb49e5a22ffa93806e292 100644 --- a/docs/reference/winsorize.html +++ b/docs/reference/winsorize.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/docs/reference/zinbEstimate.html b/docs/reference/zinbEstimate.html index 6d138f73695201e56a23e252f4ef249ccdd67211..d770a8bee476c5de26c84e88809e7c4688984c1d 100644 --- a/docs/reference/zinbEstimate.html +++ b/docs/reference/zinbEstimate.html @@ -76,7 +76,7 @@ dataset." /> </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> @@ -226,14 +226,64 @@ the fitted model and inserts it into a <code><a href='ZINBParams.html'>ZINBParam <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2> - <pre class="examples"><span class='co'># NOT RUN {</span> -<span class='co'># Load example data</span> -<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) -<span class='fu'><a href='https://www.rdocumentation.org/packages/utils/topics/data'>data</a></span>(<span class='st'>"sc_example_counts"</span>) - -<span class='no'>params</span> <span class='kw'><-</span> <span class='fu'>zinbEstimate</span>(<span class='no'>sc_example_counts</span>) -<span class='no'>params</span> -<span class='co'># }</span></pre> + <pre class="examples"><div class='input'><span class='kw'>if</span> (<span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/ns-load'>requireNamespace</a></span>(<span class='st'>"zinbwave"</span>, <span class='kw'>quietly</span> <span class='kw'>=</span> <span class='fl'>TRUE</span>)) { + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/library'>library</a></span>(<span class='no'>scater</span>) + <span class='fu'><a href='https://www.rdocumentation.org/packages/base/topics/Random'>set.seed</a></span>(<span class='fl'>1</span>) + <span class='no'>sce</span> <span class='kw'><-</span> <span class='fu'><a href='https://www.rdocumentation.org/packages/scater/topics/mockSCE'>mockSCE</a></span>(<span class='kw'>ncells</span> <span class='kw'>=</span> <span class='fl'>20</span>, <span class='kw'>ngenes</span> <span class='kw'>=</span> <span class='fl'>100</span>) + + <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.304 0.010 0.319 </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.044 0.001 0.045 </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.214 0.007 0.225 </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.008 0.078 </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.157 0.002 0.161 </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 <span style='font-weight: bold;'>Params</span><span> object of class </span><span style='font-weight: bold;'>ZINBParams</span><span> +#> Parameters can be (estimable) or </span><span style='color: #0000BB;'>[not estimable],</span><span> 'Default' or </span><span style='color: #00BB00;font-weight: bold;'>'NOT DEFAULT'</span><span> +#> +#> </span><span style='font-weight: bold;'>Global:</span><span> +#> </span><span style='font-weight: bold;'>(GENES)</span><span> </span><span style='font-weight: bold;'>(CELLS)</span><span> </span><span style='color: #0000BB;'> [Seed]</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'> 100</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 20</span><span> 848036 +#> +#> 1 additional parameters +#> +#> </span><span style='font-weight: bold;'>Model:</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'>ZinbModel with 100 features, 20 samples, 0 latent factors and 241 parameters</span><span> +#> +#> </span><span style='font-weight: bold;'>Parameters of the ZinbModel</span><span> +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Design:</span><span> +#> </span><span style='font-weight: bold;'> (SAMPLES)</span><span> (Genes) +#> </span><span style='color: #00BB00;font-weight: bold;'>1, 1, 1, 1,...</span><span> 1, 1, 1, 1,... +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Offsets:</span><span> +#> </span><span style='font-weight: bold;'> (MU)</span><span> </span><span style='font-weight: bold;'> (PI)</span><span> +#> </span><span style='color: #00BB00;font-weight: bold;'>20 x 100 matrix</span><span> </span><span style='color: #00BB00;font-weight: bold;'>20 x 100 matrix</span><span> +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Indices:</span><span> +#> (Sample Mu) (Gene Mu) (Sample Pi) (Gene Pi) +#> 1 1 1 1 +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Intercepts:</span><span> +#> (Sample Mu) (Gene Mu) (Sample Pi) (Gene Pi) +#> TRUE TRUE TRUE TRUE +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Latent factors:</span><span> +#> (W) +#> 20 x 0 matrix +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Coefficients:</span><span> +#> </span><span style='font-weight: bold;'> (SAMPLE MU)</span><span> </span><span style='font-weight: bold;'> (GENE MU)</span><span> (Latent Mu) </span><span style='font-weight: bold;'> (SAMPLE PI)</span><span> </span><span style='font-weight: bold;'> (GENE PI)</span><span> (Latent Pi) +#> </span><span style='color: #00BB00;font-weight: bold;'>-0.459768269108686, 1.62119422809804, -0.223102757788152, 0.0429479357333727,...</span><span> </span><span style='color: #00BB00;font-weight: bold;'> 4.26299872242102, 4.29178871361806, 4.44953744138558, 3.86260697728158,...</span><span> 0 x 100 matrix </span><span style='color: #00BB00;font-weight: bold;'> 1.90228646100659, -6.94249109253294, -1.07943871883735, -0.430729773518204,...</span><span> </span><span style='color: #00BB00;font-weight: bold;'> -0.983749678057473, -1.35076635474983, -1.23286376482938, -1.26061065393089,...</span><span> 0 x 100 matrix +#> +#> </span><span style='font-weight: bold;'>Model</span><span> </span><span style='font-weight: bold;'>Regularisation:</span><span> +#> (Sample Mu) </span><span style='font-weight: bold;'> (GENE MU)</span><span> (Sample Pi) </span><span style='font-weight: bold;'> (GENE PI)</span><span> +#> 1 </span><span style='color: #00BB00;font-weight: bold;'> 5</span><span> 1 </span><span style='color: #00BB00;font-weight: bold;'> 5</span><span> +#> </span><span style='font-weight: bold;'> (LATENT)</span><span> (Latent coeffs) (Zeta) (Logit) +#> </span><span style='color: #00BB00;font-weight: bold;'> 5</span><span> 1 100 0.001 +#> </div><div class='input'> +</div></span></pre> </div> <div class="col-md-3 hidden-xs hidden-sm" id="sidebar"> <h2>Contents</h2> diff --git a/docs/reference/zinbSimulate.html b/docs/reference/zinbSimulate.html index ca9a3d36220e31fa6e10becdade74bf9f67b707a..1c1eea1af5563619c27643908905b6c1922cf6e3 100644 --- a/docs/reference/zinbSimulate.html +++ b/docs/reference/zinbSimulate.html @@ -75,7 +75,7 @@ </button> <span class="navbar-brand"> <a class="navbar-link" href="../index.html">Splatter</a> - <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.2</span> + <span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Released version">1.9.4</span> </span> </div> diff --git a/man/BASiCSEstimate.Rd b/man/BASiCSEstimate.Rd index b7d28f782a8c97c1c79b5f2b22ad5d608a518f59..c06c7fb099186293aa733625c87e93d1660b8210 100644 --- a/man/BASiCSEstimate.Rd +++ b/man/BASiCSEstimate.Rd @@ -68,13 +68,13 @@ information is provided there must be at least two batches. See \dontrun{ # Load example data library(scater) -data("sc_example_counts") +set.seed(1) +sce <- mockSCE() -spike.info <- data.frame(Name = rownames(sc_example_counts)[1:10], +spike.info <- data.frame(Name = rownames(sce)[1:10], Input = rnorm(10, 500, 200), stringsAsFactors = FALSE) -params <- BASiCSEstimate(sc_example_counts[1:100, 1:30], - spike.info) +params <- BASiCSEstimate(sce[1:100, 1:30], spike.info) params } } diff --git a/man/lun2Estimate.Rd b/man/lun2Estimate.Rd index 4031807d32f32bea968858acfe354f3e6d69e148..956aa5a11d57a12bac9e8ecaa8be21d73f5af3cd 100644 --- a/man/lun2Estimate.Rd +++ b/man/lun2Estimate.Rd @@ -46,11 +46,11 @@ See \code{\link{Lun2Params}} for more details on the parameters. \dontrun{ # Load example data library(scater) -data("sc_example_counts") -data("sc_example_cell_info") +set.seed(1) +sce <- mockSCE() -plates <- factor(sc_example_cell_info$Mutation_Status) -params <- lun2Estimate(sc_example_counts, plates, min.size = 20) +plates <- as.numeric(factor(colData(sce)$Mutation_Status)) +params <- lun2Estimate(sce, plates, min.size = 20) params } } diff --git a/man/lunEstimate.Rd b/man/lunEstimate.Rd index 207fd60a778f4697adab651973f5f7c798045aeb..c313ad8d9abacc62e065e19c4e49cef5b8976d31 100644 --- a/man/lunEstimate.Rd +++ b/man/lunEstimate.Rd @@ -33,8 +33,9 @@ for more details on the parameters. \examples{ # Load example data library(scater) -data("sc_example_counts") +set.seed(1) +sce <- mockSCE() -params <- lunEstimate(sc_example_counts) +params <- lunEstimate(sce) params } diff --git a/man/mfaEstimate.Rd b/man/mfaEstimate.Rd index 9bf15216a02efc578eaed631c3e112870ed0e1ce..58a14f7d6e9e5fe5e696f3c671fe9513e92a649a 100644 --- a/man/mfaEstimate.Rd +++ b/man/mfaEstimate.Rd @@ -34,10 +34,11 @@ details on the parameters. \examples{ # Load example data if (requireNamespace("mfa", quietly = TRUE)) { - library(scater) - data("sc_example_counts") + library(mfa) + synth <- create_synthetic(C = 20, G = 5, zero_negative = TRUE, + model_dropout = TRUE) - params <- mfaEstimate(sc_example_counts) + params <- mfaEstimate(synth$X) params } } diff --git a/man/phenoEstimate.Rd b/man/phenoEstimate.Rd index 7a46a24ed86b247e49cf7fb81088b6b2de753504..ede408036be4bdd00e1175b9a990dcfbda1db101 100644 --- a/man/phenoEstimate.Rd +++ b/man/phenoEstimate.Rd @@ -35,9 +35,10 @@ See \code{\link{PhenoParams}} for more details on the parameters. if (requireNamespace("phenopath", quietly = TRUE)) { # Load example data library(scater) - data("sc_example_counts") + set.seed(1) + sce <- mockSCE() - params <- phenoEstimate(sc_example_counts) + params <- phenoEstimate(sce) params } } diff --git a/man/scDDEstimate.Rd b/man/scDDEstimate.Rd index 9f15d6d8bd91b933c6e7531f70e222938629c98d..75bc1affd60790a841304e6eec7dd497a5654ce9 100644 --- a/man/scDDEstimate.Rd +++ b/man/scDDEstimate.Rd @@ -53,13 +53,14 @@ simulate. The output is then converted to a SCDDParams object. See \code{\link[scDD]{preprocess}} and \code{\link[scDD]{scDD}} for details. } \examples{ -\dontrun{ -# Load example data -library(scater) -data("sc_example_counts") +if (requireNamespace("scDD", quietly = TRUE)) { + library(scater) + set.seed(1) + sce <- mockSCE(ncells = 20, ngenes = 100) -conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) -params <- scDDEstimate(sc_example_counts, conditions = conditions) -params + colData(sce)$condition <- sample(1:2, ncol(sce), replace = TRUE) + params <- scDDEstimate(sce, condition = "condition") + params } + } diff --git a/man/simpleEstimate.Rd b/man/simpleEstimate.Rd index 441accff81ae11b622594476e13ff0ce206a9531..d764e1eff30fef86e169d0d4da5eda83f738ddd1 100644 --- a/man/simpleEstimate.Rd +++ b/man/simpleEstimate.Rd @@ -35,8 +35,9 @@ details on the parameters. \examples{ # Load example data library(scater) -data("sc_example_counts") +set.seed(1) +sce <- mockSCE() -params <- simpleEstimate(sc_example_counts) +params <- simpleEstimate(sce) params } diff --git a/man/sparseDCEstimate.Rd b/man/sparseDCEstimate.Rd index cbfdbe8c62f9735b1d5a8177c9fbeed5cad359dc..ba3d010f979c5b458454851c56e37ff30f1150c8 100644 --- a/man/sparseDCEstimate.Rd +++ b/man/sparseDCEstimate.Rd @@ -49,13 +49,12 @@ See \code{\link{SparseDCParams}} for more details on the parameters. if (requireNamespace("SparseDC", quietly = TRUE)) { # Load example data library(scater) - data("sc_example_counts") - set.seed(1) - conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) + sce <- mockSCE(ncells = 20, ngenes = 100) + + conditions <- sample(1:2, ncol(sce), replace = TRUE) - params <- sparseDCEstimate(sc_example_counts[1:500, ], conditions, - nclusters = 3) + params <- sparseDCEstimate(sce, conditions, nclusters = 3) params } } diff --git a/man/splatEstimate.Rd b/man/splatEstimate.Rd index 736f41b02d235c96b7097350ffc71e55cd0fc879..d0287115201d5caaeba73926827205de04717076 100644 --- a/man/splatEstimate.Rd +++ b/man/splatEstimate.Rd @@ -30,9 +30,10 @@ is done. \examples{ # Load example data library(scater) -data("sc_example_counts") +set.seed(1) +sce <- mockSCE() -params <- splatEstimate(sc_example_counts) +params <- splatEstimate(sce) params } \seealso{ diff --git a/man/zinbEstimate.Rd b/man/zinbEstimate.Rd index 486d620110ec2459077e75749e36829ffc5477f8..11bece29173050be618fdf8d50c84033ca8580aa 100644 --- a/man/zinbEstimate.Rd +++ b/man/zinbEstimate.Rd @@ -63,12 +63,13 @@ the fitted model and inserts it into a \code{\link{ZINBParams}} object. See \code{\link[zinbwave]{zinbFit}} for details of the estimation procedure. } \examples{ -\dontrun{ -# Load example data -library(scater) -data("sc_example_counts") +if (requireNamespace("zinbwave", quietly = TRUE)) { + library(scater) + set.seed(1) + sce <- mockSCE(ncells = 20, ngenes = 100) -params <- zinbEstimate(sc_example_counts) -params + params <- zinbEstimate(sce) + params } + } diff --git a/tests/testthat/test-BASiCSEstimate.R b/tests/testthat/test-BASiCSEstimate.R index 3e1df27accc507d6fbd9a58cfe8b85b26a7d33a6..0f89b2ca33913470a8cb57984c5562fe323008ee 100644 --- a/tests/testthat/test-BASiCSEstimate.R +++ b/tests/testthat/test-BASiCSEstimate.R @@ -1,28 +1,27 @@ context("BASiCSEstimate") library(scater) -data("sc_example_counts") +set.seed(1) +counts <- counts(mockSCE(ncells = 30, ngenes = 100)) test_that("BASiCSEstimate works", { skip_if_not_installed("BASiCS") set.seed(1) - spike.info <- data.frame(Name = rownames(sc_example_counts)[1:10], + spike.info <- data.frame(Name = rownames(counts)[1:10], Input = rnorm(10, 500, 200), stringsAsFactors = FALSE) - counts <- sc_example_counts[, 1:30] counts <- counts[rowSums(counts) != 0, ] - params <- BASiCSEstimate(counts[1:100, ], - spike.info, verbose = FALSE, progress = FALSE) + params <- BASiCSEstimate(counts, spike.info, verbose = FALSE, + progress = FALSE) expect_true(validObject(params)) }) test_that("BASiCSEstimate works without spikes", { skip_if_not_installed("BASiCS") set.seed(1) - counts <- sc_example_counts[, 1:30] counts <- counts[rowSums(counts) != 0, ] batch <- sample(1:2, ncol(counts), replace = TRUE) - params <- BASiCSEstimate(counts[1:100, ], batch = batch, + params <- BASiCSEstimate(counts, batch = batch, verbose = FALSE, progress = FALSE) expect_true(validObject(params)) }) diff --git a/tests/testthat/test-MFAEstimate.R b/tests/testthat/test-MFAEstimate.R index ab703c70f0e294c9ee079447acfd6bd7eed927ef..817ba8245bdc19c5c3e76ada449c6597a44d33dd 100644 --- a/tests/testthat/test-MFAEstimate.R +++ b/tests/testthat/test-MFAEstimate.R @@ -1,10 +1,13 @@ context("MFAEstimate") -library(scater) -data("sc_example_counts") +if (requireNamespace("mfa", quietly = TRUE)) { + library(mfa) + synth <- create_synthetic(C = 20, G = 5, zero_negative = TRUE, + model_dropout = TRUE) +} test_that("MFAEstimate works", { skip_if_not_installed("mfa") - params <- mfaEstimate(sc_example_counts) + params <- mfaEstimate(synth$X) expect_true(validObject(params)) }) diff --git a/tests/testthat/test-lunEstimate.R b/tests/testthat/test-lunEstimate.R index 010ae358c0b9a825902f30e7d791e91abf409a7e..10aeb53c50523f80a35e6f415001ba6841ae564b 100644 --- a/tests/testthat/test-lunEstimate.R +++ b/tests/testthat/test-lunEstimate.R @@ -1,9 +1,10 @@ context("lunEstimate") library(scater) -data("sc_example_counts") +set.seed(1) +counts <- counts(mockSCE()) test_that("lunEstimate works", { - params <- lunEstimate(sc_example_counts) + params <- lunEstimate(counts) expect_true(validObject(params)) }) diff --git a/tests/testthat/test-phenoEstimate.R b/tests/testthat/test-phenoEstimate.R index d0ffc66d0aa485d6d2ebb38c99cca59f54dded1f..3beb1249586d5d2086a4d795de6641edbec3f25c 100644 --- a/tests/testthat/test-phenoEstimate.R +++ b/tests/testthat/test-phenoEstimate.R @@ -1,10 +1,11 @@ context("phenoEstimate") library(scater) -data("sc_example_counts") +set.seed(1) +counts <- counts(mockSCE()) test_that("phenoEstimate works", { skip_if_not_installed("phenopath") - params <- phenoEstimate(sc_example_counts) + params <- phenoEstimate(counts) expect_true(validObject(params)) }) diff --git a/tests/testthat/test-simpleEstimate.R b/tests/testthat/test-simpleEstimate.R index 3b581e1e25d09f87b79959934edcf82b6f93883f..1d6506c5adcf5c5e072330f422916f064503c2a0 100644 --- a/tests/testthat/test-simpleEstimate.R +++ b/tests/testthat/test-simpleEstimate.R @@ -1,9 +1,10 @@ context("simpleEstimate") library(scater) -data("sc_example_counts") +set.seed(1) +counts <- counts(mockSCE()) test_that("simpleEstimate works", { - params <- simpleEstimate(sc_example_counts) + params <- simpleEstimate(counts) expect_true(validObject(params)) }) diff --git a/tests/testthat/test-sparseDCEstimate.R b/tests/testthat/test-sparseDCEstimate.R index 2e18499c025c42db212159e4e92787ea730aa189..203ea116ed814fcfa8e26a10500785c687d69f74 100644 --- a/tests/testthat/test-sparseDCEstimate.R +++ b/tests/testthat/test-sparseDCEstimate.R @@ -1,13 +1,13 @@ context("sparseDCEstimate") library(scater) -data("sc_example_counts") +set.seed(1) +counts <- counts(mockSCE()) test_that("sparseDCEstimate works", { skip_if_not_installed("SparseDC") set.seed(1) - conditions <- sample(1:2, ncol(sc_example_counts), replace = TRUE) - params <- sparseDCEstimate(sc_example_counts, conditions, - nclusters = 3) + conditions <- sample(1:2, ncol(counts), replace = TRUE) + params <- sparseDCEstimate(counts, conditions, nclusters = 3) expect_true(validObject(params)) }) diff --git a/vignettes/splatter.Rmd b/vignettes/splatter.Rmd index 34a4138efe5988d3a96c1b59f78bd6243703f878..44255b4be91fd927777156da55980da210045a24 100644 --- a/vignettes/splatter.Rmd +++ b/vignettes/splatter.Rmd @@ -45,17 +45,19 @@ 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 using the example dataset in the `scater` package: +Splatter. Here is an example a mock dataset generted with the `scater` package: ```{r quickstart} # Load package library(splatter) -# Load example data +# Create mock data library(scater) -data("sc_example_counts") -# Estimate parameters from example data -params <- splatEstimate(sc_example_counts) +set.seed(1) +sce <- mockSCE() + +# Estimate parameters from mock data +params <- splatEstimate(sce) # Simulate data using estimated parameters sim <- splatSimulate(params) ``` @@ -148,15 +150,20 @@ Splat allows you to estimate many of it's parameters from a data set containing counts using the `splatEstimate` function. ```{r splatEstimate} -# Check that sc_example counts is an integer matrix -class(sc_example_counts) -typeof(sc_example_counts) +# Get the mock counts matrix +counts <- counts(sce) + +# Check that counts is an integer matrix +class(counts) +typeof(counts) + # Check the dimensions, each row is a gene, each column is a cell -dim(sc_example_counts) +dim(counts) + # Show the first few entries -sc_example_counts[1:5, 1:5] +counts[1:5, 1:5] -params <- splatEstimate(sc_example_counts) +params <- splatEstimate(counts) ``` Here we estimated parameters from a counts matrix but `splatEstimate` can also