diff --git a/NAMESPACE b/NAMESPACE index b0d1768be33016e5c1d8cb1ffbefc2f3ec81da2b..68e7c35a004fc8bb4750dc11960375271c33dbec 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -2,6 +2,8 @@ S3method(BASiCSEstimate,SingleCellExperiment) S3method(BASiCSEstimate,matrix) +S3method(kersplatEstimate,SingleCellExperiment) +S3method(kersplatEstimate,matrix) S3method(lun2Estimate,SingleCellExperiment) S3method(lun2Estimate,matrix) S3method(lunEstimate,SingleCellExperiment) @@ -19,8 +21,6 @@ S3method(sparseDCEstimate,SingleCellExperiment) S3method(sparseDCEstimate,matrix) S3method(splatEstimate,SingleCellExperiment) S3method(splatEstimate,matrix) -S3method(splotchEstimate,SingleCellExperiment) -S3method(splotchEstimate,matrix) S3method(zinbEstimate,SingleCellExperiment) S3method(zinbEstimate,matrix) export(BASiCSEstimate) @@ -30,6 +30,10 @@ export(compareSCEs) export(diffSCEs) export(getParam) export(getParams) +export(kersplatEstimate) +export(kersplatSample) +export(kersplatSetup) +export(kersplatSimulate) export(listSims) export(lun2Estimate) export(lun2Simulate) @@ -41,6 +45,7 @@ export(makeOverallPanel) export(mfaEstimate) export(mfaSimulate) export(newBASiCSParams) +export(newKersplatParams) export(newLun2Params) export(newLunParams) export(newMFAParams) @@ -49,7 +54,6 @@ export(newSCDDParams) export(newSimpleParams) export(newSparseDCParams) export(newSplatParams) -export(newSplotchParams) export(newZINBParams) export(phenoEstimate) export(phenoSimulate) @@ -66,14 +70,11 @@ export(splatSimulate) export(splatSimulateGroups) export(splatSimulatePaths) export(splatSimulateSingle) -export(splotchEstimate) -export(splotchSample) -export(splotchSetup) -export(splotchSimulate) export(summariseDiff) export(zinbEstimate) export(zinbSimulate) exportClasses(BASiCSParams) +exportClasses(KersplatParams) exportClasses(Lun2Params) exportClasses(LunParams) exportClasses(MFAParams) @@ -82,7 +83,6 @@ exportClasses(SCDDParams) exportClasses(SimpleParams) exportClasses(SparseDCParams) exportClasses(SplatParams) -exportClasses(SplotchParams) exportClasses(ZINBParams) importFrom(BiocParallel,SerialParam) importFrom(BiocParallel,bplapply) diff --git a/R/AllClasses.R b/R/AllClasses.R index 50ff73b95091b90c7331d4d443253e199635d6a3..946d0ec21c387d45474071c67ae0837f699e5f61 100644 --- a/R/AllClasses.R +++ b/R/AllClasses.R @@ -255,13 +255,13 @@ setClass("SplatParams", path.nonlinearProb = 0.1, path.sigmaFac = 0.8)) -#' The SplotchParams class +#' The KersplatParams class #' -#' S4 class that holds parameters for the Splotch simulation. +#' S4 class that holds parameters for the Kersplat simulation. #' #' @section Parameters: #' -#' The Splotch simulation uses the following parameters: +#' The Kersplat simulation uses the following parameters: #' #' \describe{ #' \item{\code{nGenes}}{The number of genes to simulate.} @@ -307,7 +307,7 @@ setClass("SplatParams", #' \describe{ #' \item{\code{[paths.programs]}}{Number of expression programs.} #' \item{\code{[paths.design]}}{data.frame describing path -#' structure. See \code{\link{splotchSimPaths}} for details.} +#' structure. See \code{\link{kersplatSimPaths}} for details.} #' } #' } #' \item{\emph{Library size parameters}}{ @@ -328,7 +328,7 @@ setClass("SplatParams", #' \item{\emph{Design parameters}}{ #' \describe{ #' \item{\code{[cells.design]}}{data.frame describing cell -#' structure. See \code{\link{splotchSimCellMeans}} for details.} +#' structure. See \code{\link{kersplatSimCellMeans}} for details.} #' } #' } #' \item{\emph{Doublet parameters}}{ @@ -349,14 +349,14 @@ setClass("SplatParams", #' } #' #' The parameters not shown in brackets can be estimated from real data using -#' \code{\link{splotchEstimate}}. For details of the Splotch simulation -#' see \code{\link{splotchSimulate}}. -#' -#' @name SplotchParams -#' @rdname SplotchParams -#' @aliases SplotchParams-class -#' @exportClass SplotchParams -setClass("SplotchParams", +#' \code{\link{kersplatEstimate}}. For details of the Kersplat simulation +#' see \code{\link{kersplatSimulate}}. +#' +#' @name KersplatParams +#' @rdname KersplatParams +#' @aliases KersplatParams-class +#' @exportClass KersplatParams +setClass("KersplatParams", contains = "Params", slots = c(mean.shape = "numeric", mean.rate = "numeric", diff --git a/R/SplotchParams-methods.R b/R/KersplatParams-methods.R similarity index 95% rename from R/SplotchParams-methods.R rename to R/KersplatParams-methods.R index 46e572fbbbddaff944b7f2158b9129fa73efd089..dc762414209a6e1e7da1cbdb84ce29a96a67e3f7 100644 --- a/R/SplotchParams-methods.R +++ b/R/KersplatParams-methods.R @@ -1,29 +1,29 @@ #' @rdname newParams #' @importFrom methods new #' @export -newSplotchParams <- function(...) { +newKersplatParams <- function(...) { if (!requireNamespace("igraph", quietly = TRUE)) { - stop("The Splotch simulation requires the 'igraph' package.") + stop("The Kersplat simulation requires the 'igraph' package.") } if (!requireNamespace("DropletUtils", quietly = TRUE)) { - stop("The Splotch simulation requires the 'DropletUtils' package.") + stop("The Kersplat simulation requires the 'DropletUtils' package.") } - msg <- paste("The Splotch simulation is still experimental and may produce", + msg <- paste("The Kersplat simulation is still experimental and may produce", "unreliable results. Please try it and report any issues to", "https://github.com/Oshlack/splatter/issues. The development", "version may have improved features.") - rlang:::warn_deprecated(msg, id = "warn.splotch") + rlang:::warn_deprecated(msg, id = "warn.kersplat") - params <- new("SplotchParams") + params <- new("KersplatParams") params <- setParams(params, ...) return(params) } -setValidity("SplotchParams", function(object) { +setValidity("KersplatParams", function(object) { v <- getParams(object, slotNames(object)) @@ -143,7 +143,7 @@ setValidity("SplotchParams", function(object) { }) #' @importFrom methods show -setMethod("show", "SplotchParams", function(object) { +setMethod("show", "KersplatParams", function(object) { pp.top <- list("Mean:" = c("(Rate)" = "mean.rate", "(Shape)" = "mean.shape", @@ -214,7 +214,7 @@ setMethod("show", "SplotchParams", function(object) { }) #' @rdname setParam -setMethod("setParam", "SplotchParams", function(object, name, value) { +setMethod("setParam", "KersplatParams", function(object, name, value) { checkmate::assertString(name) if (name == "nGenes") { @@ -280,7 +280,7 @@ setMethod("setParam", "SplotchParams", function(object, name, value) { }) #' @rdname setParams -setMethod("setParams", "SplotchParams", function(object, update = NULL, ...) { +setMethod("setParams", "KersplatParams", function(object, update = NULL, ...) { checkmate::assertList(update, null.ok = TRUE) diff --git a/R/splotch-estimate.R b/R/kersplat-estimate.R similarity index 84% rename from R/splotch-estimate.R rename to R/kersplat-estimate.R index 9756bb3072edd4d964b3ce095714630cb54a260f..f2b8b067ad7a783c7698d1a7e2b866588c8f8c21 100644 --- a/R/splotch-estimate.R +++ b/R/kersplat-estimate.R @@ -1,19 +1,19 @@ -#' Estimate Splotch simulation parameters +#' Estimate Kersplat simulation parameters #' -#' Estimate simulation parameters for the Splotch simulation from a real +#' Estimate simulation parameters for the Kersplat simulation from a real #' dataset. See the individual estimation functions for more details on how this #' is done. #' #' @param counts either a counts matrix or a SingleCellExperiment object #' containing count data to estimate parameters from. -#' @param params SplotchParams object to store estimated values in. +#' @param params KersplatParams object to store estimated values in. #' @param verbose logical. Whether to print progress messages. #' #' @seealso -#' \code{\link{splotchEstMean}}, \code{\link{splotchEstBCV}}, -#' \code{\link{splotchEstLib}} +#' \code{\link{kersplatEstMean}}, \code{\link{kersplatEstBCV}}, +#' \code{\link{kersplatEstLib}} #' -#' @return SplotchParams object containing the estimated parameters. +#' @return KersplatParams object containing the estimated parameters. #' #' @examples #' # Load example data @@ -21,30 +21,30 @@ #' set.seed(1) #' sce <- mockSCE() #' -#' params <- splotchEstimate(sce) +#' params <- kersplatEstimate(sce) #' params #' @export -splotchEstimate <- function(counts, params = newSplotchParams(), +kersplatEstimate <- function(counts, params = newKersplatParams(), verbose = TRUE) { - UseMethod("splotchEstimate") + UseMethod("kersplatEstimate") } -#' @rdname splotchEstimate +#' @rdname kersplatEstimate #' @export -splotchEstimate.SingleCellExperiment <- function(counts, - params = newSplotchParams(), +kersplatEstimate.SingleCellExperiment <- function(counts, + params = newKersplatParams(), verbose = TRUE) { counts <- BiocGenerics::counts(counts) - splotchEstimate(counts, params, verbose) + kersplatEstimate(counts, params, verbose) } -#' @rdname splotchEstimate +#' @rdname kersplatEstimate #' @importFrom stats median #' @export -splotchEstimate.matrix <- function(counts, params = newSplotchParams(), +kersplatEstimate.matrix <- function(counts, params = newKersplatParams(), verbose = TRUE) { - checkmate::assertClass(params, "SplotchParams") + checkmate::assertClass(params, "KersplatParams") checkmate::assertFlag(verbose) # Normalise for library size and remove all zero genes @@ -53,21 +53,21 @@ splotchEstimate.matrix <- function(counts, params = newSplotchParams(), norm.counts <- t(t(counts) / lib.sizes * lib.med) norm.counts <- norm.counts[rowSums(norm.counts > 0) > 1, ] - params <- splotchEstMean(norm.counts, params, verbose) - params <- splotchEstBCV(counts, params, verbose) - params <- splotchEstLib(counts, params, verbose) + params <- kersplatEstMean(norm.counts, params, verbose) + params <- kersplatEstBCV(counts, params, verbose) + params <- kersplatEstLib(counts, params, verbose) params <- setParams(params, nGenes = nrow(counts), nCells = ncol(counts)) return(params) } -#' Estimate Splotch means +#' Estimate Kersplat means #' -#' Estimate mean parameters for the Splotch simulation +#' Estimate mean parameters for the Kersplat simulation #' #' @param norm.counts library size normalised counts matrix. -#' @param params SplotchParams object to store estimated values in. +#' @param params KersplatParams object to store estimated values in. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -86,10 +86,10 @@ splotchEstimate.matrix <- function(counts, params = newSplotchParams(), #' fitted to these factors in order to estimate the outlier factor location and #' scale parameters using the \code{\link[fitdistrplus]{fitdist}} MLE method. #' -#' @return SplotchParams object with estimated means +#' @return KersplatParams object with estimated means #' #' @importFrom stats density -splotchEstMean <- function(norm.counts, params, verbose) { +kersplatEstMean <- function(norm.counts, params, verbose) { if (verbose) {message("Estimating mean parameters...")} @@ -130,13 +130,13 @@ splotchEstMean <- function(norm.counts, params, verbose) { return(params) } -#' Estimate Splotch BCV parameters +#' Estimate Kersplat BCV parameters #' -#' Estimate Biological Coefficient of Variation (BCV) parameters for the Splotch +#' Estimate Biological Coefficient of Variation (BCV) parameters for the Kersplat #' simulation #' #' @param counts counts matrix. -#' @param params SplotchParams object to store estimated values in. +#' @param params KersplatParams object to store estimated values in. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -146,8 +146,8 @@ splotchEstMean <- function(norm.counts, params, verbose) { #' If this results in a negative dispersion a simpler linear correction is #' applied instead. #' -#' @return SplotchParams object with estimated BCV parameters -splotchEstBCV <- function(counts, params, verbose) { +#' @return KersplatParams object with estimated BCV parameters +kersplatEstBCV <- function(counts, params, verbose) { if (verbose) {message("Estimating BCV parameters...")} @@ -207,12 +207,12 @@ splotchEstBCV <- function(counts, params, verbose) { return(params) } -#' Estimate Splotch library size parameters +#' Estimate Kersplat library size parameters #' -#' Estimate the library size parameters for the Splotch simulation +#' Estimate the library size parameters for the Kersplat simulation #' #' @param counts counts matrix. -#' @param params SplotchParams object to store estimated values in. +#' @param params KersplatParams object to store estimated values in. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -222,10 +222,10 @@ splotchEstBCV <- function(counts, params, verbose) { #' selected. The density of the library sizes is also estimated using #' \code{\link[stats]{density}}. #' -#' @return SplotchParams object with library size parameters +#' @return KersplatParams object with library size parameters #' #' @importFrom stats density -splotchEstLib <- function(counts, params, verbose) { +kersplatEstLib <- function(counts, params, verbose) { if (verbose) {message("Estimating library size parameters...")} diff --git a/R/splotch-simulate.R b/R/kersplat-simulate.R similarity index 87% rename from R/splotch-simulate.R rename to R/kersplat-simulate.R index 9e49571d69d01ca392341cb8b0267658072ee881..80d87a63a506080281f39032e1f422831709c747 100644 --- a/R/splotch-simulate.R +++ b/R/kersplat-simulate.R @@ -1,8 +1,8 @@ -#' Splotch simulation +#' Kersplat simulation #' -#' Simulate scRNA-seq count data using the Splotch model +#' Simulate scRNA-seq count data using the Kersplat model #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' @param ... any additional parameter settings to override what is provided in #' \code{params}. @@ -10,42 +10,42 @@ #' @details #' #' This functions is for simulating data in a single step. It consists of a -#' call to \code{\link{splotchSetup}} followed by a call to -#' \code{\link{splotchSample}}. Please see the documentation for those functions +#' call to \code{\link{kersplatSetup}} followed by a call to +#' \code{\link{kersplatSample}}. Please see the documentation for those functions #' for more details of the individual steps. #' #' @seealso -#' \code{\link{splotchSetup}}, \code{\link{splotchSample}} +#' \code{\link{kersplatSetup}}, \code{\link{kersplatSample}} #' #' @return SingleCellExperiment containing simulated counts and intermediate #' values #' #' @examples -#' sim <- splotchSimulate() +#' sim <- kersplatSimulate() #' #' @export -splotchSimulate <- function(params = newSplotchParams(), verbose = TRUE, ...) { +kersplatSimulate <- function(params = newKersplatParams(), verbose = TRUE, ...) { - params <- splotchSetup(params, verbose, ...) - sim <- splotchSample(params, verbose) + params <- kersplatSetup(params, verbose, ...) + sim <- kersplatSample(params, verbose) return(sim) } -#' Splotch setup +#' Kersplat setup #' -#' Setup the parameters required for the Splotch simulation +#' Setup the parameters required for the Kersplat simulation #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' @param ... any additional parameter settings to override what is provided in #' \code{params}. #' #' @details -#' The first stage is a two-step Splotch simulation is to generate some of the +#' The first stage is a two-step Kersplat simulation is to generate some of the #' intermediate parameters. The resulting parameters allow multiple simulated #' datasets to be generated from the same biological structure (using -#' \code{\link{splotchSample}}). As with all the other parameters these values +#' \code{\link{kersplatSample}}). As with all the other parameters these values #' can be manually overwritten if desired. #' #' The setup involves the following steps: @@ -56,7 +56,7 @@ splotchSimulate <- function(params = newSplotchParams(), verbose = TRUE, ...) { #' \item Simulate cell paths #' } #' -#' The resulting \code{\link{SplotchParams}} object will have the following +#' The resulting \code{\link{KersplatParams}} object will have the following #' parameters set (if they weren't already). #' #' \itemize{ @@ -66,22 +66,22 @@ splotchSimulate <- function(params = newSplotchParams(), verbose = TRUE, ...) { #' \item \code{paths.means} #' } #' -#' See \code{\link{SplotchParams}} for more details about these parameters and +#' See \code{\link{KersplatParams}} for more details about these parameters and #' the functions for the individual steps for more details about the process. #' #' @seealso -#' \code{\link{splotchGenNetwork}}, \code{\link{splotchSelectRegs}}, -#' \code{\link{splotchSimGeneMeans}}, \code{\link{splotchSimPaths}}, -#' \code{\link{SplotchParams}} +#' \code{\link{kersplatGenNetwork}}, \code{\link{kersplatSelectRegs}}, +#' \code{\link{kersplatSimGeneMeans}}, \code{\link{kersplatSimPaths}}, +#' \code{\link{KersplatParams}} #' -#' @return A complete SplotchParams object +#' @return A complete KersplatParams object #' @export #' #' @examples -#' params <- splotchSetup() -splotchSetup <- function(params = newSplotchParams(), verbose = TRUE, ...) { +#' params <- kersplatSetup() +kersplatSetup <- function(params = newKersplatParams(), verbose = TRUE, ...) { - checkmate::assertClass(params, "SplotchParams") + checkmate::assertClass(params, "KersplatParams") params <- setParams(params, ...) # Set random seed @@ -89,24 +89,24 @@ splotchSetup <- function(params = newSplotchParams(), verbose = TRUE, ...) { set.seed(seed) if (verbose) {message("Setting up parameters...")} - params <- splotchGenNetwork(params, verbose) - params <- splotchSelectRegs(params, verbose) - params <- splotchSimGeneMeans(params, verbose) - params <- splotchSimPaths(params, verbose) + params <- kersplatGenNetwork(params, verbose) + params <- kersplatSelectRegs(params, verbose) + params <- kersplatSimGeneMeans(params, verbose) + params <- kersplatSimPaths(params, verbose) return(params) } -#' Splotch sample +#' Kersplat sample #' -#' Sample cells for the Splotch simulation +#' Sample cells for the Kersplat simulation #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details -#' The second stage is a two-step Splotch simulation is to generate cells based -#' on a complete \code{\link{SplotchParams}} object. +#' The second stage is a two-step Kersplat simulation is to generate cells based +#' on a complete \code{\link{KersplatParams}} object. #' intermediate parameters. #' #' The sampling process involves the following steps: @@ -170,36 +170,36 @@ splotchSetup <- function(params = newSplotchParams(), verbose = TRUE, ...) { #' which typically use \code{underscore_naming}. #' #' @seealso -#' \code{\link{splotchSimLibSizes}}, \code{\link{splotchSimCellMeans}}, -#' \code{\link{splotchSimCellCounts}}, \code{\link{splotchSimAmbientCounts}}, -#' \code{\link{splotchSimCounts}} +#' \code{\link{kersplatSimLibSizes}}, \code{\link{kersplatSimCellMeans}}, +#' \code{\link{kersplatSimCellCounts}}, \code{\link{kersplatSimAmbientCounts}}, +#' \code{\link{kersplatSimCounts}} #' #' @return SingleCellExperiment object containing the simulated counts and #' intermediate values. #' @export #' #' @examples -#' params <- splotchSetup() -#' sim <- splotchSample(params) -splotchSample <- function(params, verbose = TRUE) { +#' params <- kersplatSetup() +#' sim <- kersplatSample(params) +kersplatSample <- function(params, verbose = TRUE) { # Check that parameters are set up - checkmate::assertClass(params, "SplotchParams") + checkmate::assertClass(params, "KersplatParams") network.graph <- getParam(params, "network.graph") if (is.null(network.graph)) { - stop("'network.graph' not set, run splotchSetup first") + stop("'network.graph' not set, run kersplatSetup first") } network.regsSet <- getParam(params, "network.regsSet") if (!network.regsSet) { - stop("network regulators not set, run splotchSetup first") + stop("network regulators not set, run kersplatSetup first") } mean.values <- getParam(params, "mean.values") if (length(mean.values) == 0) { - stop("'mean.values' not set, run splotchSetup first") + stop("'mean.values' not set, run kersplatSetup first") } paths.means <- getParam(params, "paths.means") if (length(mean.values) == 0) { - stop("'paths.means' not set, run splotchSetup first") + stop("'paths.means' not set, run kersplatSetup first") } if (verbose) {message("Creating simulation object...")} @@ -233,21 +233,21 @@ splotchSample <- function(params, verbose = TRUE) { sim <- SingleCellExperiment(rowData = features, colData = cells, metadata = list(Params = params)) - sim <- splotchSimLibSizes(sim, params, verbose) - sim <- splotchSimCellMeans(sim, params, verbose) - sim <- splotchSimCellCounts(sim, params, verbose) - sim <- splotchSimAmbientCounts(sim, params, verbose) - sim <- splotchSimCounts(sim, params, verbose) + sim <- kersplatSimLibSizes(sim, params, verbose) + sim <- kersplatSimCellMeans(sim, params, verbose) + sim <- kersplatSimCellCounts(sim, params, verbose) + sim <- kersplatSimAmbientCounts(sim, params, verbose) + sim <- kersplatSimCounts(sim, params, verbose) return(sim) } -#' Generate Splotch gene network +#' Generate Kersplat gene network #' -#' Generate a gene network for the Splotch simulation +#' Generate a gene network for the Kersplat simulation #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -255,8 +255,8 @@ splotchSample <- function(params, verbose = TRUE) { #' network is generated using the \code{\link[igraph]{sample_forestfire}} #' function and edge weights are sampled from a standard normal distribution. #' -#' @return SplotchParams object with gene network -splotchGenNetwork <- function(params, verbose) { +#' @return KersplatParams object with gene network +kersplatGenNetwork <- function(params, verbose) { nGenes <- getParam(params, "nGenes") network.graph <- getParam(params, "network.graph") @@ -279,11 +279,11 @@ splotchGenNetwork <- function(params, verbose) { return(params) } -#' Select Splotch regulators +#' Select Kersplat regulators #' -#' Select regulator genes in the gene network for a Splotch simulation +#' Select regulator genes in the gene network for a Kersplat simulation #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -291,8 +291,8 @@ splotchGenNetwork <- function(params, verbose) { #' between their out degree and in degree. This is an arbitary weighting and #' may be improved or replace in the future. #' -#' @return SplotchParams object with gene regulators -splotchSelectRegs <- function(params, verbose) { +#' @return KersplatParams object with gene regulators +kersplatSelectRegs <- function(params, verbose) { network.regsSet <- getParam(params, "network.regsSet") @@ -321,9 +321,9 @@ splotchSelectRegs <- function(params, verbose) { return(params) } -#' Simulate Splotch gene means +#' Simulate Kersplat gene means #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -341,8 +341,8 @@ splotchSelectRegs <- function(params, verbose) { #' sampling method. This approach is more flexible but may violate some #' statistical assumptions. #' -#' @return SplotchParams object with gene means -splotchSimGeneMeans <- function(params, verbose) { +#' @return KersplatParams object with gene means +kersplatSimGeneMeans <- function(params, verbose) { mean.values <- getParam(params, "mean.values") @@ -384,11 +384,11 @@ splotchSimGeneMeans <- function(params, verbose) { return(params) } -#' Simulate Splotch paths +#' Simulate Kersplat paths #' -#' Simulate gene means for each step along each path of a Splotch simulation +#' Simulate gene means for each step along each path of a Kersplat simulation #' -#' @param params SplotchParams object containing simulation parameters. +#' @param params KersplatParams object containing simulation parameters. #' @param verbose logical. Whether to print progress messages #' #' @details @@ -420,8 +420,8 @@ splotchSimGeneMeans <- function(params, verbose) { #' single-cell RNA-seq data for complex differentiation processes. #' Bioinformatics (2019). \url{https://doi.org/10.1093/bioinformatics/btz078}. #' -#' @return SplotchParams object with path means -splotchSimPaths <- function(params, verbose) { +#' @return KersplatParams object with path means +kersplatSimPaths <- function(params, verbose) { paths.means <- getParam(params, "paths.means") @@ -493,9 +493,9 @@ splotchSimPaths <- function(params, verbose) { return(params) } -#' Simulate Splotch library sizes +#' Simulate Kersplat library sizes #' -#' Generate library sizes for cells in the Splotch simulatilon +#' Generate library sizes for cells in the Kersplat simulatilon #' #' @param sim SingleCellExperiment containing simulation. #' @param params SplotParams object with simulation parameters. @@ -519,7 +519,7 @@ splotchSimPaths <- function(params, verbose) { #' \code{ambient.scale} parameter. #' #' @return SingleCellExperiment with library sizes -splotchSimLibSizes <- function(sim, params, verbose) { +kersplatSimLibSizes <- function(sim, params, verbose) { if (verbose) {message("Simulating library sizes...")} nCells <- getParam(params, "nCells") @@ -555,9 +555,9 @@ splotchSimLibSizes <- function(sim, params, verbose) { return(sim) } -#' Simulate Splotch cell means +#' Simulate Kersplat cell means #' -#' Simulate endogenous counts for each cell in a Splotch simulation +#' Simulate endogenous counts for each cell in a Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. #' @param params SplotParams object with simulation parameters. @@ -606,7 +606,7 @@ splotchSimLibSizes <- function(sim, params, verbose) { #' the means. #' #' @return SingleCellExperiment with cell means -splotchSimCellMeans <- function(sim, params, verbose) { +kersplatSimCellMeans <- function(sim, params, verbose) { cell.names <- colData(sim)$Cell gene.names <- rowData(sim)$Gene @@ -734,9 +734,9 @@ splotchSimCellMeans <- function(sim, params, verbose) { return(sim) } -#' Simulate Splotch cell counts +#' Simulate Kersplat cell counts #' -#' Simulate cell counts for the Splotch simulation +#' Simulate cell counts for the Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. #' @param params SplotParams object with simulation parameters. @@ -747,7 +747,7 @@ splotchSimCellMeans <- function(sim, params, verbose) { #' cell means matrix. #' #' @return SingleCellExperiment with cell counts -splotchSimCellCounts <- function(sim, params, verbose) { +kersplatSimCellCounts <- function(sim, params, verbose) { if (verbose) {message("Simulating cell counts...")} cell.names <- colData(sim)$Cell @@ -769,7 +769,7 @@ splotchSimCellCounts <- function(sim, params, verbose) { return(sim) } -#' Simulate Splotch ambient counts +#' Simulate Kersplat ambient counts #' #' @param sim SingleCellExperiment containing simulation. #' @param params SplotParams object with simulation parameters. @@ -782,7 +782,7 @@ splotchSimCellCounts <- function(sim, params, verbose) { #' distribution using these means. #' #' @return SingleCellExperiment with ambient counts -splotchSimAmbientCounts <- function(sim, params, verbose) { +kersplatSimAmbientCounts <- function(sim, params, verbose) { if (verbose) {message("Simulating ambient counts...")} cell.names <- colData(sim)$Cell @@ -812,9 +812,9 @@ splotchSimAmbientCounts <- function(sim, params, verbose) { return(sim) } -#' Simulate Splotch final counts +#' Simulate Kersplat final counts #' -#' Simulate the final counts matrix for a Splotch simulation +#' Simulate the final counts matrix for a Kersplat simulation #' #' @param sim SingleCellExperiment containing simulation. #' @param params SplotParams object with simulation parameters. @@ -829,7 +829,7 @@ splotchSimAmbientCounts <- function(sim, params, verbose) { #' @seealso \code{\link[DropletUtils]{downsampleMatrix}} #' #' @return SingleCellExperiment with counts matrix -splotchSimCounts <- function(sim, params, verbose) { +kersplatSimCounts <- function(sim, params, verbose) { if (verbose) {message("Simulating final counts...")} cell.lib.sizes <- colData(sim)$CellLibSize diff --git a/R/listSims.R b/R/listSims.R index 992b602de85658a56ac0ada5701a77c922e83e32..891bb4087e08db729c27f812ba8071e7d17adb8f 100644 --- a/R/listSims.R +++ b/R/listSims.R @@ -31,9 +31,9 @@ listSims <- function(print = TRUE) { "The Splat simulation with differentiation paths. Each path can have it's own length, skew and probability. Genes can change in non-linear ways."), - c("Splotch", "splotch", "", + c("Kersplat", "kersplat", "", "Oshlack/splatter", - "The Splotch simulation extends the Splat model by adding a + "The Kersplat simulation extends the Splat model by adding a gene network, more complex cell structure, doublets and empty cells (Experimental)."), c("Simple", "simple", "10.1186/s13059-017-1305-0", diff --git a/man/SplotchParams.Rd b/man/KersplatParams.Rd similarity index 88% rename from man/SplotchParams.Rd rename to man/KersplatParams.Rd index 81d418b5bc0f401ef7e5f3866a4ea7860661974d..3aaf411ceb3ace4443785ddd2e56d5124041c0c3 100644 --- a/man/SplotchParams.Rd +++ b/man/KersplatParams.Rd @@ -1,17 +1,17 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClasses.R \docType{class} -\name{SplotchParams} -\alias{SplotchParams} -\alias{SplotchParams-class} -\title{The SplotchParams class} +\name{KersplatParams} +\alias{KersplatParams} +\alias{KersplatParams-class} +\title{The KersplatParams class} \description{ -S4 class that holds parameters for the Splotch simulation. +S4 class that holds parameters for the Kersplat simulation. } \section{Parameters}{ -The Splotch simulation uses the following parameters: +The Kersplat simulation uses the following parameters: \describe{ \item{\code{nGenes}}{The number of genes to simulate.} @@ -57,7 +57,7 @@ The Splotch simulation uses the following parameters: \describe{ \item{\code{[paths.programs]}}{Number of expression programs.} \item{\code{[paths.design]}}{data.frame describing path - structure. See \code{\link{splotchSimPaths}} for details.} + structure. See \code{\link{kersplatSimPaths}} for details.} } } \item{\emph{Library size parameters}}{ @@ -78,7 +78,7 @@ The Splotch simulation uses the following parameters: \item{\emph{Design parameters}}{ \describe{ \item{\code{[cells.design]}}{data.frame describing cell - structure. See \code{\link{splotchSimCellMeans}} for details.} + structure. See \code{\link{kersplatSimCellMeans}} for details.} } } \item{\emph{Doublet parameters}}{ @@ -99,7 +99,7 @@ The Splotch simulation uses the following parameters: } The parameters not shown in brackets can be estimated from real data using -\code{\link{splotchEstimate}}. For details of the Splotch simulation -see \code{\link{splotchSimulate}}. +\code{\link{kersplatEstimate}}. For details of the Kersplat simulation +see \code{\link{kersplatSimulate}}. } diff --git a/man/splotchEstBCV.Rd b/man/kersplatEstBCV.Rd similarity index 71% rename from man/splotchEstBCV.Rd rename to man/kersplatEstBCV.Rd index ebca37c2bed90e83385ab78cae5113164bb4b01d..82972b57454090d25ee586412aca733043c8a013 100644 --- a/man/splotchEstBCV.Rd +++ b/man/kersplatEstBCV.Rd @@ -1,23 +1,23 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-estimate.R -\name{splotchEstBCV} -\alias{splotchEstBCV} -\title{Estimate Splotch BCV parameters} +\name{kersplatEstBCV} +\alias{kersplatEstBCV} +\title{Estimate Kersplat BCV parameters} \usage{ -splotchEstBCV(counts, params, verbose) +kersplatEstBCV(counts, params, verbose) } \arguments{ \item{counts}{counts matrix.} -\item{params}{SplotchParams object to store estimated values in.} +\item{params}{KersplatParams object to store estimated values in.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with estimated BCV parameters +KersplatParams object with estimated BCV parameters } \description{ -Estimate Biological Coefficient of Variation (BCV) parameters for the Splotch +Estimate Biological Coefficient of Variation (BCV) parameters for the Kersplat simulation } \details{ diff --git a/man/splotchEstLib.Rd b/man/kersplatEstLib.Rd similarity index 64% rename from man/splotchEstLib.Rd rename to man/kersplatEstLib.Rd index b606d312a5068d9611ba9dc95feeabd773b27058..26e02c4c7c742a1558c279d7b57d443584b48a80 100644 --- a/man/splotchEstLib.Rd +++ b/man/kersplatEstLib.Rd @@ -1,23 +1,23 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-estimate.R -\name{splotchEstLib} -\alias{splotchEstLib} -\title{Estimate Splotch library size parameters} +\name{kersplatEstLib} +\alias{kersplatEstLib} +\title{Estimate Kersplat library size parameters} \usage{ -splotchEstLib(counts, params, verbose) +kersplatEstLib(counts, params, verbose) } \arguments{ \item{counts}{counts matrix.} -\item{params}{SplotchParams object to store estimated values in.} +\item{params}{KersplatParams object to store estimated values in.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with library size parameters +KersplatParams object with library size parameters } \description{ -Estimate the library size parameters for the Splotch simulation +Estimate the library size parameters for the Kersplat simulation } \details{ Parameters for the log-normal distribution are estimated by fitting the diff --git a/man/splotchEstMean.Rd b/man/kersplatEstMean.Rd similarity index 80% rename from man/splotchEstMean.Rd rename to man/kersplatEstMean.Rd index 46235b1cef3cc77f36805ad91220f9671a5925d1..1ec1e142267b1da5b9616ebc45d9f7a8faa85d5e 100644 --- a/man/splotchEstMean.Rd +++ b/man/kersplatEstMean.Rd @@ -1,23 +1,23 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-estimate.R -\name{splotchEstMean} -\alias{splotchEstMean} -\title{Estimate Splotch means} +\name{kersplatEstMean} +\alias{kersplatEstMean} +\title{Estimate Kersplat means} \usage{ -splotchEstMean(norm.counts, params, verbose) +kersplatEstMean(norm.counts, params, verbose) } \arguments{ \item{norm.counts}{library size normalised counts matrix.} -\item{params}{SplotchParams object to store estimated values in.} +\item{params}{KersplatParams object to store estimated values in.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with estimated means +KersplatParams object with estimated means } \description{ -Estimate mean parameters for the Splotch simulation +Estimate mean parameters for the Kersplat simulation } \details{ Parameters for the gamma distribution are estimated by fitting the mean diff --git a/man/kersplatEstimate.Rd b/man/kersplatEstimate.Rd new file mode 100644 index 0000000000000000000000000000000000000000..63df7148a51caa77c110d48def08a102c5336af1 --- /dev/null +++ b/man/kersplatEstimate.Rd @@ -0,0 +1,45 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/splotch-estimate.R +\name{kersplatEstimate} +\alias{kersplatEstimate} +\alias{kersplatEstimate.SingleCellExperiment} +\alias{kersplatEstimate.matrix} +\title{Estimate Kersplat simulation parameters} +\usage{ +kersplatEstimate(counts, params = newKersplatParams(), verbose = TRUE) + +\method{kersplatEstimate}{SingleCellExperiment}(counts, + params = newKersplatParams(), verbose = TRUE) + +\method{kersplatEstimate}{matrix}(counts, params = newKersplatParams(), + verbose = TRUE) +} +\arguments{ +\item{counts}{either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.} + +\item{params}{KersplatParams object to store estimated values in.} + +\item{verbose}{logical. Whether to print progress messages.} +} +\value{ +KersplatParams object containing the estimated parameters. +} +\description{ +Estimate simulation parameters for the Kersplat simulation from a real +dataset. See the individual estimation functions for more details on how this +is done. +} +\examples{ +# Load example data +library(scater) +set.seed(1) +sce <- mockSCE() + +params <- kersplatEstimate(sce) +params +} +\seealso{ +\code{\link{kersplatEstMean}}, \code{\link{kersplatEstBCV}}, +\code{\link{kersplatEstLib}} +} diff --git a/man/splotchGenNetwork.Rd b/man/kersplatGenNetwork.Rd similarity index 60% rename from man/splotchGenNetwork.Rd rename to man/kersplatGenNetwork.Rd index f0fab8841cff1ae771417e1c33a954f87b4981ba..b82a9bab02b09868bf3143ffff1229e56f58b5c3 100644 --- a/man/splotchGenNetwork.Rd +++ b/man/kersplatGenNetwork.Rd @@ -1,21 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchGenNetwork} -\alias{splotchGenNetwork} -\title{Generate Splotch gene network} +\name{kersplatGenNetwork} +\alias{kersplatGenNetwork} +\title{Generate Kersplat gene network} \usage{ -splotchGenNetwork(params, verbose) +kersplatGenNetwork(params, verbose) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with gene network +KersplatParams object with gene network } \description{ -Generate a gene network for the Splotch simulation +Generate a gene network for the Kersplat simulation } \details{ Currently a very simple approach is used which needs to be improved. A diff --git a/man/splotchSample.Rd b/man/kersplatSample.Rd similarity index 83% rename from man/splotchSample.Rd rename to man/kersplatSample.Rd index 610281efb18d443f67543ea81cd87d0e030a9b05..f164ca548f9f4d7e5134bf1b73f65955ae2c74ad 100644 --- a/man/splotchSample.Rd +++ b/man/kersplatSample.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSample} -\alias{splotchSample} -\title{Splotch sample} +\name{kersplatSample} +\alias{kersplatSample} +\title{Kersplat sample} \usage{ -splotchSample(params, verbose = TRUE) +kersplatSample(params, verbose = TRUE) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } @@ -16,11 +16,11 @@ SingleCellExperiment object containing the simulated counts and intermediate values. } \description{ -Sample cells for the Splotch simulation +Sample cells for the Kersplat simulation } \details{ -The second stage is a two-step Splotch simulation is to generate cells based -on a complete \code{\link{SplotchParams}} object. +The second stage is a two-step Kersplat simulation is to generate cells based +on a complete \code{\link{KersplatParams}} object. intermediate parameters. The sampling process involves the following steps: @@ -84,11 +84,11 @@ in order to differentiate them from the values added by analysis packages which typically use \code{underscore_naming}. } \examples{ -params <- splotchSetup() -sim <- splotchSample(params) +params <- kersplatSetup() +sim <- kersplatSample(params) } \seealso{ -\code{\link{splotchSimLibSizes}}, \code{\link{splotchSimCellMeans}}, -\code{\link{splotchSimCellCounts}}, \code{\link{splotchSimAmbientCounts}}, -\code{\link{splotchSimCounts}} +\code{\link{kersplatSimLibSizes}}, \code{\link{kersplatSimCellMeans}}, +\code{\link{kersplatSimCellCounts}}, \code{\link{kersplatSimAmbientCounts}}, +\code{\link{kersplatSimCounts}} } diff --git a/man/splotchSelectRegs.Rd b/man/kersplatSelectRegs.Rd similarity index 57% rename from man/splotchSelectRegs.Rd rename to man/kersplatSelectRegs.Rd index 106946c3f49a6775cd845368192a074b5f6f74a9..d810bf36e1e2ff4c6ec1552f42372c1e1e1ee18b 100644 --- a/man/splotchSelectRegs.Rd +++ b/man/kersplatSelectRegs.Rd @@ -1,21 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSelectRegs} -\alias{splotchSelectRegs} -\title{Select Splotch regulators} +\name{kersplatSelectRegs} +\alias{kersplatSelectRegs} +\title{Select Kersplat regulators} \usage{ -splotchSelectRegs(params, verbose) +kersplatSelectRegs(params, verbose) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with gene regulators +KersplatParams object with gene regulators } \description{ -Select regulator genes in the gene network for a Splotch simulation +Select regulator genes in the gene network for a Kersplat simulation } \details{ Regulators are randomly selected, weighted according to the difference diff --git a/man/splotchSetup.Rd b/man/kersplatSetup.Rd similarity index 56% rename from man/splotchSetup.Rd rename to man/kersplatSetup.Rd index 6017de52b87a3b848d3a3afcea333995d41810ed..14ca8d4c003fa310a914d2b335649e05bffa9d42 100644 --- a/man/splotchSetup.Rd +++ b/man/kersplatSetup.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSetup} -\alias{splotchSetup} -\title{Splotch setup} +\name{kersplatSetup} +\alias{kersplatSetup} +\title{Kersplat setup} \usage{ -splotchSetup(params = newSplotchParams(), verbose = TRUE, ...) +kersplatSetup(params = newKersplatParams(), verbose = TRUE, ...) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} @@ -15,16 +15,16 @@ splotchSetup(params = newSplotchParams(), verbose = TRUE, ...) \code{params}.} } \value{ -A complete SplotchParams object +A complete KersplatParams object } \description{ -Setup the parameters required for the Splotch simulation +Setup the parameters required for the Kersplat simulation } \details{ -The first stage is a two-step Splotch simulation is to generate some of the +The first stage is a two-step Kersplat simulation is to generate some of the intermediate parameters. The resulting parameters allow multiple simulated datasets to be generated from the same biological structure (using -\code{\link{splotchSample}}). As with all the other parameters these values +\code{\link{kersplatSample}}). As with all the other parameters these values can be manually overwritten if desired. The setup involves the following steps: @@ -35,7 +35,7 @@ The setup involves the following steps: \item Simulate cell paths } -The resulting \code{\link{SplotchParams}} object will have the following +The resulting \code{\link{KersplatParams}} object will have the following parameters set (if they weren't already). \itemize{ @@ -45,14 +45,14 @@ parameters set (if they weren't already). \item \code{paths.means} } -See \code{\link{SplotchParams}} for more details about these parameters and +See \code{\link{KersplatParams}} for more details about these parameters and the functions for the individual steps for more details about the process. } \examples{ -params <- splotchSetup() +params <- kersplatSetup() } \seealso{ -\code{\link{splotchGenNetwork}}, \code{\link{splotchSelectRegs}}, -\code{\link{splotchSimGeneMeans}}, \code{\link{splotchSimPaths}}, -\code{\link{SplotchParams}} +\code{\link{kersplatGenNetwork}}, \code{\link{kersplatSelectRegs}}, +\code{\link{kersplatSimGeneMeans}}, \code{\link{kersplatSimPaths}}, +\code{\link{KersplatParams}} } diff --git a/man/splotchSimAmbientCounts.Rd b/man/kersplatSimAmbientCounts.Rd similarity index 77% rename from man/splotchSimAmbientCounts.Rd rename to man/kersplatSimAmbientCounts.Rd index 645e2f5d65cabcd06241a07eb452dd69ea7fedfe..c27ec34751f8d4d310606843c09ceb6df7d7982e 100644 --- a/man/splotchSimAmbientCounts.Rd +++ b/man/kersplatSimAmbientCounts.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimAmbientCounts} -\alias{splotchSimAmbientCounts} -\title{Simulate Splotch ambient counts} +\name{kersplatSimAmbientCounts} +\alias{kersplatSimAmbientCounts} +\title{Simulate Kersplat ambient counts} \usage{ -splotchSimAmbientCounts(sim, params, verbose) +kersplatSimAmbientCounts(sim, params, verbose) } \arguments{ \item{sim}{SingleCellExperiment containing simulation.} @@ -17,7 +17,7 @@ splotchSimAmbientCounts(sim, params, verbose) SingleCellExperiment with ambient counts } \description{ -Simulate Splotch ambient counts +Simulate Kersplat ambient counts } \details{ The overall expression profile to calculated by averaging the cell counts diff --git a/man/splotchSimCellCounts.Rd b/man/kersplatSimCellCounts.Rd similarity index 71% rename from man/splotchSimCellCounts.Rd rename to man/kersplatSimCellCounts.Rd index 70a9d0b55107094647038002e4a09edcadf25b9a..4b503f9bf5ad6fb2e417252cb8d3c781ed38dda3 100644 --- a/man/splotchSimCellCounts.Rd +++ b/man/kersplatSimCellCounts.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimCellCounts} -\alias{splotchSimCellCounts} -\title{Simulate Splotch cell counts} +\name{kersplatSimCellCounts} +\alias{kersplatSimCellCounts} +\title{Simulate Kersplat cell counts} \usage{ -splotchSimCellCounts(sim, params, verbose) +kersplatSimCellCounts(sim, params, verbose) } \arguments{ \item{sim}{SingleCellExperiment containing simulation.} @@ -17,7 +17,7 @@ splotchSimCellCounts(sim, params, verbose) SingleCellExperiment with cell counts } \description{ -Simulate cell counts for the Splotch simulation +Simulate cell counts for the Kersplat simulation } \details{ Counts are sampled from a Poisson distribution with lambda equal to the diff --git a/man/splotchSimCellMeans.Rd b/man/kersplatSimCellMeans.Rd similarity index 92% rename from man/splotchSimCellMeans.Rd rename to man/kersplatSimCellMeans.Rd index 0d5f87c5af74a7be89112a4fda94e4a1a11881e4..40b88f6286ce52304b77b82b39ad3bb666d1b8b6 100644 --- a/man/splotchSimCellMeans.Rd +++ b/man/kersplatSimCellMeans.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimCellMeans} -\alias{splotchSimCellMeans} -\title{Simulate Splotch cell means} +\name{kersplatSimCellMeans} +\alias{kersplatSimCellMeans} +\title{Simulate Kersplat cell means} \usage{ -splotchSimCellMeans(sim, params, verbose) +kersplatSimCellMeans(sim, params, verbose) } \arguments{ \item{sim}{SingleCellExperiment containing simulation.} @@ -17,7 +17,7 @@ splotchSimCellMeans(sim, params, verbose) SingleCellExperiment with cell means } \description{ -Simulate endogenous counts for each cell in a Splotch simulation +Simulate endogenous counts for each cell in a Kersplat simulation } \details{ Cells are first assigned to a path and a step along that path. This is diff --git a/man/splotchSimCounts.Rd b/man/kersplatSimCounts.Rd similarity index 78% rename from man/splotchSimCounts.Rd rename to man/kersplatSimCounts.Rd index 562448fe8fb7059dd749bccfcd17b693c8daa62a..c182474cc8b3fc422c4c86349582e25c7e841136 100644 --- a/man/splotchSimCounts.Rd +++ b/man/kersplatSimCounts.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimCounts} -\alias{splotchSimCounts} -\title{Simulate Splotch final counts} +\name{kersplatSimCounts} +\alias{kersplatSimCounts} +\title{Simulate Kersplat final counts} \usage{ -splotchSimCounts(sim, params, verbose) +kersplatSimCounts(sim, params, verbose) } \arguments{ \item{sim}{SingleCellExperiment containing simulation.} @@ -17,7 +17,7 @@ splotchSimCounts(sim, params, verbose) SingleCellExperiment with counts matrix } \description{ -Simulate the final counts matrix for a Splotch simulation +Simulate the final counts matrix for a Kersplat simulation } \details{ The cell counts matrix and ambient counts matrix are added together. The diff --git a/man/splotchSimGeneMeans.Rd b/man/kersplatSimGeneMeans.Rd similarity index 77% rename from man/splotchSimGeneMeans.Rd rename to man/kersplatSimGeneMeans.Rd index 0a24b63a04f2239d815638262105e1bdd6e42aa3..4e19ae6b41e476dc3591e78e9188608cd6c9188a 100644 --- a/man/splotchSimGeneMeans.Rd +++ b/man/kersplatSimGeneMeans.Rd @@ -1,21 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimGeneMeans} -\alias{splotchSimGeneMeans} -\title{Simulate Splotch gene means} +\name{kersplatSimGeneMeans} +\alias{kersplatSimGeneMeans} +\title{Simulate Kersplat gene means} \usage{ -splotchSimGeneMeans(params, verbose) +kersplatSimGeneMeans(params, verbose) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with gene means +KersplatParams object with gene means } \description{ -Simulate Splotch gene means +Simulate Kersplat gene means } \details{ Gene means are simulated in one of two ways depending on the value of the diff --git a/man/splotchSimLibSizes.Rd b/man/kersplatSimLibSizes.Rd similarity index 84% rename from man/splotchSimLibSizes.Rd rename to man/kersplatSimLibSizes.Rd index 408e5096bd56d710e4d99e8d605b61de6a5943c7..53eb586a7e4272bff2d2a43f2f00d413c8baa8ef 100644 --- a/man/splotchSimLibSizes.Rd +++ b/man/kersplatSimLibSizes.Rd @@ -1,10 +1,10 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimLibSizes} -\alias{splotchSimLibSizes} -\title{Simulate Splotch library sizes} +\name{kersplatSimLibSizes} +\alias{kersplatSimLibSizes} +\title{Simulate Kersplat library sizes} \usage{ -splotchSimLibSizes(sim, params, verbose) +kersplatSimLibSizes(sim, params, verbose) } \arguments{ \item{sim}{SingleCellExperiment containing simulation.} @@ -17,7 +17,7 @@ splotchSimLibSizes(sim, params, verbose) SingleCellExperiment with library sizes } \description{ -Generate library sizes for cells in the Splotch simulatilon +Generate library sizes for cells in the Kersplat simulatilon } \details{ Library sizes are simulated in one of two ways depending on the value of the diff --git a/man/splotchSimPaths.Rd b/man/kersplatSimPaths.Rd similarity index 86% rename from man/splotchSimPaths.Rd rename to man/kersplatSimPaths.Rd index 83d4d7dcc282d8af8495a4cc927e11764bdede18..45a6b5f5cb5869aa362633b0a141d794c149dec2 100644 --- a/man/splotchSimPaths.Rd +++ b/man/kersplatSimPaths.Rd @@ -1,21 +1,21 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimPaths} -\alias{splotchSimPaths} -\title{Simulate Splotch paths} +\name{kersplatSimPaths} +\alias{kersplatSimPaths} +\title{Simulate Kersplat paths} \usage{ -splotchSimPaths(params, verbose) +kersplatSimPaths(params, verbose) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} } \value{ -SplotchParams object with path means +KersplatParams object with path means } \description{ -Simulate gene means for each step along each path of a Splotch simulation +Simulate gene means for each step along each path of a Kersplat simulation } \details{ The method of simulating paths is inspired by the method used in the PROSSTT diff --git a/man/splotchSimulate.Rd b/man/kersplatSimulate.Rd similarity index 51% rename from man/splotchSimulate.Rd rename to man/kersplatSimulate.Rd index de50559db2c4b93c8a4d6686a0989fff20827bf5..582e2fd1dbad2ab364ec1ab7142343823344b646 100644 --- a/man/splotchSimulate.Rd +++ b/man/kersplatSimulate.Rd @@ -1,13 +1,13 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/splotch-simulate.R -\name{splotchSimulate} -\alias{splotchSimulate} -\title{Splotch simulation} +\name{kersplatSimulate} +\alias{kersplatSimulate} +\title{Kersplat simulation} \usage{ -splotchSimulate(params = newSplotchParams(), verbose = TRUE, ...) +kersplatSimulate(params = newKersplatParams(), verbose = TRUE, ...) } \arguments{ -\item{params}{SplotchParams object containing simulation parameters.} +\item{params}{KersplatParams object containing simulation parameters.} \item{verbose}{logical. Whether to print progress messages} @@ -19,18 +19,18 @@ SingleCellExperiment containing simulated counts and intermediate values } \description{ -Simulate scRNA-seq count data using the Splotch model +Simulate scRNA-seq count data using the Kersplat model } \details{ This functions is for simulating data in a single step. It consists of a -call to \code{\link{splotchSetup}} followed by a call to -\code{\link{splotchSample}}. Please see the documentation for those functions +call to \code{\link{kersplatSetup}} followed by a call to +\code{\link{kersplatSample}}. Please see the documentation for those functions for more details of the individual steps. } \examples{ -sim <- splotchSimulate() +sim <- kersplatSimulate() } \seealso{ -\code{\link{splotchSetup}}, \code{\link{splotchSample}} +\code{\link{kersplatSetup}}, \code{\link{kersplatSample}} } diff --git a/man/newParams.Rd b/man/newParams.Rd index 6c31e9604e44609b62600416d656d3c8e532615b..1a82deb82a3088740fd55ef7d321751a4ca8c4a3 100644 --- a/man/newParams.Rd +++ b/man/newParams.Rd @@ -15,7 +15,7 @@ \alias{newSimpleParams} \alias{newSparseDCParams} \alias{newSplatParams} -\alias{newSplotchParams} +\alias{newKersplatParams} \alias{newZINBParams} \title{New Params} \usage{ @@ -37,7 +37,7 @@ newSparseDCParams(...) newSplatParams(...) -newSplotchParams(...) +newKersplatParams(...) newZINBParams(...) } diff --git a/man/setParam.Rd b/man/setParam.Rd index 0aca8935b15f87b9a23937ff0affa2fa404fb55e..301bbf29d8fff5d5222d041a173d99c0acd21fb1 100644 --- a/man/setParam.Rd +++ b/man/setParam.Rd @@ -13,7 +13,7 @@ \alias{setParam,PhenoParams-method} \alias{setParam,SCDDParams-method} \alias{setParam,SplatParams-method} -\alias{setParam,SplotchParams-method} +\alias{setParam,KersplatParams-method} \alias{setParam,ZINBParams-method} \title{Set a parameter} \usage{ @@ -33,7 +33,7 @@ setParam(object, name, value) \S4method{setParam}{SplatParams}(object, name, value) -\S4method{setParam}{SplotchParams}(object, name, value) +\S4method{setParam}{KersplatParams}(object, name, value) \S4method{setParam}{ZINBParams}(object, name, value) } diff --git a/man/setParams.Rd b/man/setParams.Rd index ad217ddaa681612e19076882db0ef7e6c896a2b8..88026041d7c232c11f78d805044398b403e2b9ad 100644 --- a/man/setParams.Rd +++ b/man/setParams.Rd @@ -6,7 +6,7 @@ \alias{setParams} \alias{setParams,Params-method} \alias{setParams,SplatParams-method} -\alias{setParams,SplotchParams-method} +\alias{setParams,KersplatParams-method} \title{Set parameters} \usage{ setParams(object, update = NULL, ...) @@ -15,7 +15,7 @@ setParams(object, update = NULL, ...) \S4method{setParams}{SplatParams}(object, update = NULL, ...) -\S4method{setParams}{SplotchParams}(object, update = NULL, ...) +\S4method{setParams}{KersplatParams}(object, update = NULL, ...) } \arguments{ \item{object}{Params object to set parameters in.} diff --git a/man/splotchEstimate.Rd b/man/splotchEstimate.Rd deleted file mode 100644 index 98e384ac5a1a93f30ee07de7f8f571ee22dfac3f..0000000000000000000000000000000000000000 --- a/man/splotchEstimate.Rd +++ /dev/null @@ -1,45 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/splotch-estimate.R -\name{splotchEstimate} -\alias{splotchEstimate} -\alias{splotchEstimate.SingleCellExperiment} -\alias{splotchEstimate.matrix} -\title{Estimate Splotch simulation parameters} -\usage{ -splotchEstimate(counts, params = newSplotchParams(), verbose = TRUE) - -\method{splotchEstimate}{SingleCellExperiment}(counts, - params = newSplotchParams(), verbose = TRUE) - -\method{splotchEstimate}{matrix}(counts, params = newSplotchParams(), - verbose = TRUE) -} -\arguments{ -\item{counts}{either a counts matrix or a SingleCellExperiment object -containing count data to estimate parameters from.} - -\item{params}{SplotchParams object to store estimated values in.} - -\item{verbose}{logical. Whether to print progress messages.} -} -\value{ -SplotchParams object containing the estimated parameters. -} -\description{ -Estimate simulation parameters for the Splotch simulation from a real -dataset. See the individual estimation functions for more details on how this -is done. -} -\examples{ -# Load example data -library(scater) -set.seed(1) -sce <- mockSCE() - -params <- splotchEstimate(sce) -params -} -\seealso{ -\code{\link{splotchEstMean}}, \code{\link{splotchEstBCV}}, -\code{\link{splotchEstLib}} -}