diff --git a/NAMESPACE b/NAMESPACE index bf36ba081502bbf193bd025b5e0557ac2b84cf95..53c0accdc933839ecc4fd0e49571f5b7477d9ca9 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,14 +1,14 @@ # Generated by roxygen2: do not edit by hand -S3method(lun2Estimate,SCESet) +S3method(lun2Estimate,SingleCellExperiment) S3method(lun2Estimate,matrix) -S3method(lunEstimate,SCESet) +S3method(lunEstimate,SingleCellExperiment) S3method(lunEstimate,matrix) -S3method(scDDEstimate,SCESet) +S3method(scDDEstimate,SingleCellExperiment) S3method(scDDEstimate,matrix) -S3method(simpleEstimate,SCESet) +S3method(simpleEstimate,SingleCellExperiment) S3method(simpleEstimate,matrix) -S3method(splatEstimate,SCESet) +S3method(splatEstimate,SingleCellExperiment) S3method(splatEstimate,matrix) export(addGeneLengths) export(compareSCESets) @@ -46,12 +46,16 @@ exportClasses(SCDDParams) exportClasses(SimpleParams) exportClasses(SplatParams) importFrom(Biobase,"fData<-") -importFrom(Biobase,"pData<-") -importFrom(Biobase,assayData) importFrom(Biobase,fData) -importFrom(Biobase,pData) importFrom(BiocParallel,SerialParam) importFrom(BiocParallel,bplapply) +importFrom(SingleCellExperiment,SingleCellExperiment) +importFrom(SummarizedExperiment,"assays<-") +importFrom(SummarizedExperiment,"colData<-") +importFrom(SummarizedExperiment,"rowData<-") +importFrom(SummarizedExperiment,assays) +importFrom(SummarizedExperiment,colData) +importFrom(SummarizedExperiment,rowData) importFrom(checkmate,checkCharacter) importFrom(checkmate,checkClass) importFrom(checkmate,checkDataFrame) @@ -88,10 +92,6 @@ importFrom(methods,slot) importFrom(methods,slotNames) importFrom(methods,validObject) importFrom(scater,"cpm<-") -importFrom(scater,"set_exprs<-") -importFrom(scater,counts) -importFrom(scater,get_exprs) -importFrom(scater,newSCESet) importFrom(stats,dnbinom) importFrom(stats,median) importFrom(stats,model.matrix) diff --git a/R/lun-estimate.R b/R/lun-estimate.R index 5cfc46bc81be175bc90af5c658f708f3c83e5a2a..89700790559b8f38851d55bfd8fc5b7b04e6ec73 100644 --- a/R/lun-estimate.R +++ b/R/lun-estimate.R @@ -2,8 +2,8 @@ #' #' Estimate simulation parameters for the Lun simulation from a real dataset. #' -#' @param counts either a counts matrix or an SCESet object containing count -#' data to estimate parameters from. +#' @param counts either a counts matrix or an SingleCellExperiment object +#' containing count data to estimate parameters from. #' @param params LunParams object to store estimated values in. #' #' @details @@ -24,8 +24,8 @@ lunEstimate <- function(counts, params = newLunParams()) { #' @rdname lunEstimate #' @export -lunEstimate.SCESet <- function(counts, params = newLunParams()) { - counts <- scater::counts(counts) +lunEstimate.SingleCellExperiment <- function(counts, params = newLunParams()) { + counts <- SingleCellExperiment::counts(counts) lunEstimate(counts, params) } @@ -39,4 +39,4 @@ lunEstimate.matrix <- function(counts, params = newLunParams()) { groupCells = ncol(counts)) return(params) -} \ No newline at end of file +} diff --git a/R/lun-simulate.R b/R/lun-simulate.R index 8ced43ea7aa7cbc1026282d84f43633961b5e21d..aa7337c8d0541a04d307c70d7e8fd5b67e3b9d0c 100644 --- a/R/lun-simulate.R +++ b/R/lun-simulate.R @@ -19,8 +19,8 @@ #' #' See \code{\link{LunParams}} for details of the parameters. #' -#' @return SCESet object containing the simulated counts and intermediate -#' values. +#' @return SingleCellExperiment object containing the simulated counts and +#' intermediate values. #' #' @references #' Lun ATL, Bach K, Marioni JC. Pooling across cells to normalize single-cell @@ -33,9 +33,8 @@ #' @examples #' sim <- lunSimulate() #' -#' @importFrom Biobase fData fData<- pData pData<- -#' @importFrom methods new -#' @importFrom scater newSCESet set_exprs<- +#' @importFrom SummarizedExperiment rowData rowData<- colData colData<- +#' @importFrom SingleCellExperiment SingleCellExperiment #' @importFrom stats rnorm rgamma rnbinom #' @export lunSimulate <- function(params = newLunParams(), verbose = TRUE, ...) { @@ -110,7 +109,7 @@ lunSimulate <- function(params = newLunParams(), verbose = TRUE, ...) { size = 1 / count.disp), nrow = nGenes, ncol = nCells) - if (verbose) {message("Creating final SCESet...")} + if (verbose) {message("Creating final dataset...")} rownames(counts) <- gene.names colnames(counts) <- cell.names diff --git a/R/lun2-estimate.R b/R/lun2-estimate.R index cca9f6eb556b542c1d00d2a8e967e0a8a0aa684e..b4786b4f2d5f5aab9d3cf185653adea217402885 100644 --- a/R/lun2-estimate.R +++ b/R/lun2-estimate.R @@ -2,8 +2,8 @@ #' #' Estimate simulation parameters for the Lun2 simulation from a real dataset. #' -#' @param counts either a counts matrix or an SCESet object containing count -#' data to estimate parameters from. +#' @param counts either a counts matrix or a SingleCellExperiment object +#' containing count data to estimate parameters from. #' @param plates integer vector giving the plate that each cell originated from. #' @param params Lun2Params object to store estimated values in. #' @param min.size minimum size of clusters when identifying group of cells in @@ -36,10 +36,11 @@ lun2Estimate <- function(counts, plates, params = newLun2Params(), #' @rdname lun2Estimate #' @export -lun2Estimate.SCESet <- function(counts, plates, params = newLun2Params(), - min.size = 200, verbose = TRUE, - BPPARAM = SerialParam()) { - counts <- scater::counts(counts) +lun2Estimate.SingleCellExperiment <- function(counts, plates, + params = newLun2Params(), + min.size = 200, verbose = TRUE, + BPPARAM = SerialParam()) { + counts <- SingleCellExperiment::counts(counts) lun2Estimate(counts, plates, params, min.size = min.size, verbose = verbose) } diff --git a/R/lun2-simulate.R b/R/lun2-simulate.R index 439e3c60ae6353b7d861a31b3627e4e74c638ee8..21e3cdb56369fafa82baecfa6f018555ee90757a 100644 --- a/R/lun2-simulate.R +++ b/R/lun2-simulate.R @@ -26,7 +26,7 @@ #' number in the dataset used in the estimation step but has the downside that #' some genes or cells may be simulated multiple times. #' -#' @return SCESet containing simulated counts. +#' @return SingleCellExperiment containing simulated counts. #' #' @references #' Lun ATL, Marioni JC. Overcoming confounding plate effects in differential @@ -39,8 +39,8 @@ #' @examples #' sim <- lun2Simulate() #' @export -#' @importFrom methods new -#' @importFrom scater newSCESet set_exprs<- +#' @importFrom SummarizedExperiment assays<- +#' @importFrom SingleCellExperiment SingleCellExperiment lun2Simulate <- function(params = newLun2Params(), zinb = FALSE, verbose = TRUE, ...) { @@ -167,7 +167,7 @@ lun2Simulate <- function(params = newLun2Params(), zinb = FALSE, counts[is.zero] <- 0 } - if (verbose) {message("Creating final SCESet...")} + if (verbose) {message("Creating final dataset...")} rownames(cells) <- cell.names rownames(features) <- gene.names diff --git a/R/scDD-estimate.R b/R/scDD-estimate.R index f1aba9c83c3be7343c1ddf9f1dd19cb0aa9f3c4a..5f5215715e3af645d788644e10973b103d48eeb7 100644 --- a/R/scDD-estimate.R +++ b/R/scDD-estimate.R @@ -2,8 +2,8 @@ #' #' Estimate simulation parameters for the scDD simulation from a real dataset. #' -#' @param counts either a counts matrix or an SCESet object containing count -#' data to estimate parameters from. +#' @param counts either a counts matrix or a SingleCellExperiment object +#' containing count data to estimate parameters from. #' @param conditions Vector giving the condition that each cell belongs to. #' Conditions can be 1 or 2. #' @param params SCDDParams object to store estimated values in. @@ -36,9 +36,11 @@ scDDEstimate <- function(counts, conditions, params = newSCDDParams(), #' @rdname scDDEstimate #' @export -scDDEstimate.SCESet <- function(counts, conditions, params = newSCDDParams(), - verbose = TRUE, BPPARAM = SerialParam()) { - counts <- scater::counts(counts) +scDDEstimate.SingleCellExperiment <- function(counts, conditions, + params = newSCDDParams(), + verbose = TRUE, + BPPARAM = SerialParam()) { + counts <- SingleCellExperiment::counts(counts) scDDEstimate(counts, conditions, params, verbose, BPPARAM) } diff --git a/R/scDD-simulate.R b/R/scDD-simulate.R index b3d949827160a8449ff90cf2b458d01323d5f16b..704e14af1eb4d129e8b7411e025c5d21a5292de2 100644 --- a/R/scDD-simulate.R +++ b/R/scDD-simulate.R @@ -16,10 +16,11 @@ #' @details #' This function is just a wrapper around \code{\link[scDD]{simulateSet}} that #' takes a \code{\link{SCDDParams}}, runs the simulation then converts the -#' output to an \code{\link[scater]{SCESet}} object. See -#' \code{\link[scDD]{simulateSet}} for more details of how the simulation works. +#' output to a \code{\link[SingleCellExperiment]{SingleCellExperiment}} object. +#' See \code{\link[scDD]{simulateSet}} for more details about how the simulation +#' works. #' -#' @return SCESet containing simulated counts +#' @return SingleCellExperiment containing simulated counts #' #' @references #' Korthauer KD, Chu L-F, Newton MA, Li Y, Thomson J, Stewart R, et al. A @@ -35,8 +36,8 @@ #' sim <- scDDSimulate() #' } #' @export -#' @importFrom scater newSCESet #' @importFrom BiocParallel SerialParam +#' @importFrom SingleCellExperiment SingleCellExperiment scDDSimulate <- function(params = newSCDDParams(), plots = FALSE, plot.file = NULL, verbose = TRUE, BPPARAM = SerialParam(), ...) { @@ -94,7 +95,7 @@ scDDSimulate <- function(params = newSCDDParams(), plots = FALSE, foldchanges <- scDD.sim[[2]] de.status <- rownames(counts) - if (verbose) {message("Creating SCESet...")} + if (verbose) {message("Creating final dataset...")} cell.names <- paste0("Cell", seq_len(nCells * 2)) gene.names <- paste0("Gene", seq_len(getParam(params, "nGenes"))) diff --git a/R/simple-estimate.R b/R/simple-estimate.R index 1225becae5483959cd4e85dee99449517ff22072..793be3c221c0ca428fa4d3ba114ab590e7994c87 100644 --- a/R/simple-estimate.R +++ b/R/simple-estimate.R @@ -2,8 +2,8 @@ #' #' Estimate simulation parameters for the simple simulation from a real dataset. #' -#' @param counts either a counts matrix or an SCESet object containing count -#' data to estimate parameters from. +#' @param counts either a counts matrix or a SingleCellExperiment object +#' containing count data to estimate parameters from. #' @param params SimpleParams object to store estimated values in. #' #' @details @@ -26,8 +26,9 @@ simpleEstimate <- function(counts, params = newSimpleParams()) { #' @rdname simpleEstimate #' @export -simpleEstimate.SCESet <- function(counts, params = newSimpleParams()) { - counts <- scater::counts(counts) +simpleEstimate.SingleCellExperiment <- function(counts, + params = newSimpleParams()) { + counts <- SingleCellExperiment::counts(counts) simpleEstimate(counts, params) } @@ -53,4 +54,4 @@ simpleEstimate.matrix <- function(counts, params = newSimpleParams()) { mean.rate = unname(means.fit$estimate["rate"])) return(params) -} \ No newline at end of file +} diff --git a/R/simple-simulate.R b/R/simple-simulate.R index add68255c0f3a9e8b91a283cb88518e4704254d1..3c074cee3ab9c42de8a42376d500121e6555b879 100644 --- a/R/simple-simulate.R +++ b/R/simple-simulate.R @@ -15,14 +15,14 @@ #' \code{size = 1 / counts.disp}. See \code{\link{SimpleParams}} for more #' details of the parameters. #' -#' @return SCESet containing simulated counts +#' @return SingleCellExperiment containing simulated counts #' @examples #' sim <- simpleSimulate() #' # Override default parameters #' sim <- simpleSimulate(nGenes = 1000, nCells = 50) #' @export #' @importFrom stats rgamma rnbinom -#' @importFrom scater newSCESet +#' @importFrom SingleCellExperiment SingleCellExperiment simpleSimulate <- function(params = newSimpleParams(), verbose = TRUE, ...) { checkmate::assertClass(params, "SimpleParams") @@ -47,7 +47,7 @@ simpleSimulate <- function(params = newSimpleParams(), verbose = TRUE, ...) { size = 1 / count.disp), nrow = nGenes, ncol = nCells) - if (verbose) {message("Creating final SCESet...")} + if (verbose) {message("Creating final dataset...")} cell.names <- paste0("Cell", seq_len(nCells)) gene.names <- paste0("Gene", seq_len(nGenes)) diff --git a/R/splat-estimate.R b/R/splat-estimate.R index 0c2b036dcccbd6bab3230179e12ea21d4dc9426b..b1523f285640a9d29a12afb7236e087cbf67d699 100644 --- a/R/splat-estimate.R +++ b/R/splat-estimate.R @@ -4,8 +4,8 @@ #' dataset. See the individual estimation functions for more details on how this #' is done. #' -#' @param counts either a counts matrix or an SCESet object containing count -#' data to estimate parameters from. +#' @param counts either a counts matrix or a SingleCellExperiment object +#' containing count data to estimate parameters from. #' @param params SplatParams object to store estimated values in. #' #' @seealso @@ -26,8 +26,9 @@ splatEstimate <- function(counts, params = newSplatParams()) { #' @rdname splatEstimate #' @export -splatEstimate.SCESet <- function(counts, params = newSplatParams()) { - counts <- scater::counts(counts) +splatEstimate.SingleCellExperiment <- function(counts, + params = newSplatParams()) { + counts <- SingleCellExperiment::counts(counts) splatEstimate(counts, params) } diff --git a/R/splat-simulate.R b/R/splat-simulate.R index 7967e701b10e6021acd6196b316a0222d730fa10..38bbf7d8760d371c6bea31b4826c84ae24083e3b 100644 --- a/R/splat-simulate.R +++ b/R/splat-simulate.R @@ -31,15 +31,16 @@ #' \item Simulate BCV adjusted cell means #' \item Simulate true counts #' \item Simulate dropout -#' \item Create final SCESet object +#' \item Create final dataset #' } #' -#' The final output is an \code{\link[scater]{SCESet}} object that contains the -#' simulated counts but also the values for various intermediate steps. These -#' are stored in the \code{\link[Biobase]{phenoData}} (for cell specific -#' information), \code{\link[Biobase]{featureData}} (for gene specific -#' information) or \code{\link[Biobase]{assayData}} (for gene by cell matrices) -#' slots. This additional information includes: +#' The final output is a +#' \code{\link[SingleCellExperiment]{SingleCellExperiment}} object that +#' contains the simulated counts but also the values for various intermediate +#' steps. These are stored in the \code{\link[SummarizedExperiment]{colData}} +#' (for cell specific information), \code{\link[SummarizedExperiment]{rowData}} +#' (for gene specific information) or \code{\link[SummarizedExperiment]{assays}} +#' (for gene by cell matrices) slots. This additional information includes: #' \describe{ #' \item{\code{phenoData}}{ #' \describe{ @@ -83,12 +84,12 @@ #' } #' } #' -#' Values that have been added by Splatter are named using \code{CamelCase} in -#' order to differentiate them from the values added by Scater which uses -#' \code{underscore_naming}. +#' Values that have been added by Splatter are named using \code{UpperCamelCase} +#' in order to differentiate them from the values added by analysis packages +#' which typically use \code{underscore_naming}. #' -#' @return SCESet object containing the simulated counts and intermediate -#' values. +#' @return SingleCellExperiment object containing the simulated counts and +#' intermediate values. #' #' @seealso #' \code{\link{splatSimLibSizes}}, \code{\link{splatSimGeneMeans}}, @@ -113,9 +114,9 @@ #' # Simulate paths #' sim <- splatSimulate(method = "paths") #' } -#' @importFrom Biobase fData pData pData<- assayData +#' @importFrom SummarizedExperiment rowData colData colData<- assays +#' @importFrom SingleCellExperiment SingleCellExperiment #' @importFrom methods validObject -#' @importFrom scater newSCESet counts set_exprs<- get_exprs #' @export splatSimulate <- function(params = newSplatParams(), method = c("single", "groups", "paths"), @@ -158,7 +159,7 @@ splatSimulate <- function(params = newSplatParams(), group.names <- paste0("Path", seq_len(nGroups)) } - # Create SCESet with dummy counts to store simulation + # Create SingleCellExperiment to store simulation cells <- data.frame(Cell = cell.names) rownames(cells) <- cell.names features <- data.frame(Gene = gene.names) @@ -242,12 +243,12 @@ splatSimulatePaths <- function(params = newSplatParams(), verbose = TRUE, ...) { #' #' Simulate expected library sizes from a log-normal distribution #' -#' @param sim SCESet to add library size to. +#' @param sim SingleCellExperiment to add library size to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated library sizes. +#' @return SingleCellExperiment with simulated library sizes. #' -#' @importFrom Biobase pData pData<- +#' @importFrom SummarizedExperiment colData colData<- #' @importFrom stats rlnorm splatSimLibSizes <- function(sim, params) { @@ -267,12 +268,12 @@ splatSimLibSizes <- function(sim, params) { #' expression factors. Genes with an outlier factor not equal to 1 are replaced #' with the median mean expression multiplied by the outlier factor. #' -#' @param sim SCESet to add gene means to. +#' @param sim SingleCellExperiment to add gene means to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated gene means. +#' @return SingleCellExperiment with simulated gene means. #' -#' @importFrom Biobase fData fData<- +#' @importFrom SummarizedExperiment rowData rowData<- #' @importFrom stats rgamma median splatSimGeneMeans <- function(sim, params) { @@ -308,12 +309,12 @@ splatSimGeneMeans <- function(sim, params) { #' using \code{\link{getLNormFactors}} and these are added along with updated #' means for each batch. #' -#' @param sim SCESet to add batch effects to. +#' @param sim SingleCellExperiment to add batch effects to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated batch effects. +#' @return SingleCellExperiment with simulated batch effects. #' -#' @importFrom Biobase fData fData<- +#' @importFrom SummarizedExperiment rowData rowData<- splatSimBatchEffects <- function(sim, params) { nGenes <- getParam(params, "nGenes") @@ -337,12 +338,12 @@ splatSimBatchEffects <- function(sim, params) { #' Simulate a mean for each gene in each cell incorporating batch effect #' factors. #' -#' @param sim SCESet to add batch means to. +#' @param sim SingleCellExperiment to add batch means to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated batch means. +#' @return SingleCellExperiment with simulated batch means. #' -#' @importFrom Biobase fData fData<- +#' @importFrom SummarizedExperiment rowData rowData<- splatSimBatchCellMeans <- function(sim, params) { nBatches <- getParam(params, "nBatches") @@ -380,16 +381,16 @@ splatSimBatchCellMeans <- function(sim, params) { #' along with updated means for each group. For paths care is taked to make sure #' they are simulated in the correct order. #' -#' @param sim SCESet to add differential expression to. +#' @param sim SingleCellExperiment to add differential expression to. #' @param params splatParams object with simulation parameters. #' -#' @return SCESet with simulated differential expression. +#' @return SingleCellExperiment with simulated differential expression. #' #' @name splatSimDE NULL #' @rdname splatSimDE -#' @importFrom Biobase fData +#' @importFrom SummarizedExperiment rowData splatSimGroupDE <- function(sim, params) { nGenes <- getParam(params, "nGenes") @@ -411,7 +412,7 @@ splatSimGroupDE <- function(sim, params) { } #' @rdname splatSimDE -#' @importFrom Biobase fData +#' @importFrom SummarizedExperiment rowData splatSimPathDE <- function(sim, params) { nGenes <- getParam(params, "nGenes") @@ -446,17 +447,16 @@ splatSimPathDE <- function(sim, params) { #' random position on the appropriate path (when simulating paths). The selected #' means are adjusted for each cell's expected library size. #' -#' @param sim SCESet to add cell means to. +#' @param sim SingleCellExperiment to add cell means to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with added cell means. +#' @return SingleCellExperiment with added cell means. #' #' @name splatSimCellMeans NULL #' @rdname splatSimCellMeans -#' @importFrom Biobase fData pData -#' @importFrom scater set_exprs<- get_exprs +#' @importFrom SummarizedExperiment rowData colData assays assays<- splatSimSingleCellMeans <- function(sim, params) { nCells <- getParam(params, "nCells") @@ -477,8 +477,7 @@ splatSimSingleCellMeans <- function(sim, params) { } #' @rdname splatSimCellMeans -#' @importFrom Biobase fData pData -#' @importFrom scater get_exprs set_exprs<- +#' @importFrom SummarizedExperiment rowData colData assays assays<- splatSimGroupCellMeans <- function(sim, params) { nGroups <- getParam(params, "nGroups") @@ -503,8 +502,7 @@ splatSimGroupCellMeans <- function(sim, params) { } #' @rdname splatSimCellMeans -#' @importFrom Biobase fData pData -#' @importFrom scater set_exprs<- +#' @importFrom SummarizedExperiment rowData colData colData<- assays assays<- #' @importFrom stats rbinom splatSimPathCellMeans <- function(sim, params) { @@ -605,13 +603,12 @@ splatSimPathCellMeans <- function(sim, params) { #' mean-variance trend using Biological Coefficient of Variation taken from #' and inverse gamma distribution. #' -#' @param sim SCESet to add BCV means to. +#' @param sim SingleCellExperiment to add BCV means to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated BCV means. +#' @return SingleCellExperiment with simulated BCV means. #' -#' @importFrom Biobase fData pData -#' @importFrom scater get_exprs set_exprs<- +#' @importFrom SummarizedExperiment rowData colData assays assays<- #' @importFrom stats rchisq rgamma splatSimBCVMeans <- function(sim, params) { @@ -650,13 +647,12 @@ splatSimBCVMeans <- function(sim, params) { #' distribution where Each gene in each cell has it's own mean based on the #' group (or path position), expected library size and BCV. #' -#' @param sim SCESet to add true counts to. +#' @param sim SingleCellExperiment to add true counts to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated true counts. +#' @return SingleCellExperiment with simulated true counts. #' -#' @importFrom Biobase fData pData -#' @importFrom scater get_exprs set_exprs<- +#' @importFrom SummarizedExperiment rowData colData assays assays<- #' @importFrom stats rpois splatSimTrueCounts <- function(sim, params) { @@ -684,13 +680,12 @@ splatSimTrueCounts <- function(sim, params) { #' gene in each cell. These probabilities are used in a Bernoulli distribution #' to decide which counts should be dropped. #' -#' @param sim SCESet to add dropout to. +#' @param sim SingleCellExperiment to add dropout to. #' @param params SplatParams object with simulation parameters. #' -#' @return SCESet with simulated dropout and observed counts. +#' @return SingleCellExperiment with simulated dropout and observed counts. #' -#' @importFrom Biobase fData pData -#' @importFrom scater get_exprs set_exprs<- +#' @importFrom SummarizedExperiment rowData colData assays assays<- #' @importFrom stats rbinom splatSimDropout <- function(sim, params) { diff --git a/man/lun2Estimate.Rd b/man/lun2Estimate.Rd index 369634764aa1b172861920701a4538e85065448e..d0e240edbbdc6d983727a0e63d4f98e68ccb9283 100644 --- a/man/lun2Estimate.Rd +++ b/man/lun2Estimate.Rd @@ -2,22 +2,23 @@ % Please edit documentation in R/lun2-estimate.R \name{lun2Estimate} \alias{lun2Estimate} -\alias{lun2Estimate.SCESet} +\alias{lun2Estimate.SingleCellExperiment} \alias{lun2Estimate.matrix} \title{Estimate Lun2 simulation parameters} \usage{ lun2Estimate(counts, plates, params = newLun2Params(), min.size = 200, verbose = TRUE, BPPARAM = SerialParam()) -\method{lun2Estimate}{SCESet}(counts, plates, params = newLun2Params(), - min.size = 200, verbose = TRUE, BPPARAM = SerialParam()) +\method{lun2Estimate}{SingleCellExperiment}(counts, plates, + params = newLun2Params(), min.size = 200, verbose = TRUE, + BPPARAM = SerialParam()) \method{lun2Estimate}{matrix}(counts, plates, params = newLun2Params(), min.size = 200, verbose = TRUE, BPPARAM = SerialParam()) } \arguments{ -\item{counts}{either a counts matrix or an SCESet object containing count -data to estimate parameters from.} +\item{counts}{either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.} \item{plates}{integer vector giving the plate that each cell originated from.} diff --git a/man/lun2Simulate.Rd b/man/lun2Simulate.Rd index 491ba6787afdfc9bf75f949d3680225f4f15b6e3..e091ce9d8c739de001334b4f9b8a0f6b2d3975c4 100644 --- a/man/lun2Simulate.Rd +++ b/man/lun2Simulate.Rd @@ -17,7 +17,7 @@ lun2Simulate(params = newLun2Params(), zinb = FALSE, verbose = TRUE, ...) \code{params}.} } \value{ -SCESet containing simulated counts. +SingleCellExperiment containing simulated counts. } \description{ Simulate single-cell RNA-seq count data using the method described in Lun diff --git a/man/lunEstimate.Rd b/man/lunEstimate.Rd index 8ee55bea76967ecf9c7fa9a895178fb7950d3c97..82f5e670b199dc49e618014924c6273be5cc5f12 100644 --- a/man/lunEstimate.Rd +++ b/man/lunEstimate.Rd @@ -2,19 +2,19 @@ % Please edit documentation in R/lun-estimate.R \name{lunEstimate} \alias{lunEstimate} -\alias{lunEstimate.SCESet} +\alias{lunEstimate.SingleCellExperiment} \alias{lunEstimate.matrix} \title{Estimate Lun simulation parameters} \usage{ lunEstimate(counts, params = newLunParams()) -\method{lunEstimate}{SCESet}(counts, params = newLunParams()) +\method{lunEstimate}{SingleCellExperiment}(counts, params = newLunParams()) \method{lunEstimate}{matrix}(counts, params = newLunParams()) } \arguments{ -\item{counts}{either a counts matrix or an SCESet object containing count -data to estimate parameters from.} +\item{counts}{either a counts matrix or an SingleCellExperiment object +containing count data to estimate parameters from.} \item{params}{LunParams object to store estimated values in.} } diff --git a/man/lunSimulate.Rd b/man/lunSimulate.Rd index 4ccd94ac6181f50aef6f0e710698b88810ba9b51..0e48781f767033532c76864f75eabfcaa08d06d6 100644 --- a/man/lunSimulate.Rd +++ b/man/lunSimulate.Rd @@ -15,8 +15,8 @@ lunSimulate(params = newLunParams(), verbose = TRUE, ...) \code{params}.} } \value{ -SCESet object containing the simulated counts and intermediate -values. +SingleCellExperiment object containing the simulated counts and +intermediate values. } \description{ Simulate single-cell RNA-seq count data using the method described in Lun, diff --git a/man/scDDEstimate.Rd b/man/scDDEstimate.Rd index 44bd40141ff5035b354433b7ac47ab958dc2e85b..6eb052e2e0bcbf8a587701f2fdccf7f1bf38373e 100644 --- a/man/scDDEstimate.Rd +++ b/man/scDDEstimate.Rd @@ -2,22 +2,22 @@ % Please edit documentation in R/scDD-estimate.R \name{scDDEstimate} \alias{scDDEstimate} -\alias{scDDEstimate.SCESet} +\alias{scDDEstimate.SingleCellExperiment} \alias{scDDEstimate.matrix} \title{Estimate scDD simulation parameters} \usage{ scDDEstimate(counts, conditions, params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam()) -\method{scDDEstimate}{SCESet}(counts, conditions, params = newSCDDParams(), - verbose = TRUE, BPPARAM = SerialParam()) +\method{scDDEstimate}{SingleCellExperiment}(counts, conditions, + params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam()) \method{scDDEstimate}{matrix}(counts, conditions, params = newSCDDParams(), verbose = TRUE, BPPARAM = SerialParam()) } \arguments{ -\item{counts}{either a counts matrix or an SCESet object containing count -data to estimate parameters from.} +\item{counts}{either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.} \item{conditions}{Vector giving the condition that each cell belongs to. Conditions can be 1 or 2.} diff --git a/man/scDDSimulate.Rd b/man/scDDSimulate.Rd index 387413b2a636f9169a9bc13bd5ed9382cc42d3b5..24f4c5a62f22470ea1fd9e703e0a7e4e974f72b9 100644 --- a/man/scDDSimulate.Rd +++ b/man/scDDSimulate.Rd @@ -25,7 +25,7 @@ giving the parallel back-end to be used. Default is \code{params}.} } \value{ -SCESet containing simulated counts +SingleCellExperiment containing simulated counts } \description{ Simulate counts using the scDD method. @@ -33,8 +33,9 @@ Simulate counts using the scDD method. \details{ This function is just a wrapper around \code{\link[scDD]{simulateSet}} that takes a \code{\link{SCDDParams}}, runs the simulation then converts the -output to an \code{\link[scater]{SCESet}} object. See -\code{\link[scDD]{simulateSet}} for more details of how the simulation works. +output to a \code{\link[SingleCellExperiment]{SingleCellExperiment}} object. +See \code{\link[scDD]{simulateSet}} for more details about how the simulation +works. } \examples{ \dontrun{ diff --git a/man/simpleEstimate.Rd b/man/simpleEstimate.Rd index 3be8654a88d7e163a2241a42abd7be00b66c041e..159c87953cde355894abcd344b60ee8ce5106fd3 100644 --- a/man/simpleEstimate.Rd +++ b/man/simpleEstimate.Rd @@ -2,19 +2,20 @@ % Please edit documentation in R/simple-estimate.R \name{simpleEstimate} \alias{simpleEstimate} -\alias{simpleEstimate.SCESet} +\alias{simpleEstimate.SingleCellExperiment} \alias{simpleEstimate.matrix} \title{Estimate simple simulation parameters} \usage{ simpleEstimate(counts, params = newSimpleParams()) -\method{simpleEstimate}{SCESet}(counts, params = newSimpleParams()) +\method{simpleEstimate}{SingleCellExperiment}(counts, + params = newSimpleParams()) \method{simpleEstimate}{matrix}(counts, params = newSimpleParams()) } \arguments{ -\item{counts}{either a counts matrix or an SCESet object containing count -data to estimate parameters from.} +\item{counts}{either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.} \item{params}{SimpleParams object to store estimated values in.} } diff --git a/man/simpleSimulate.Rd b/man/simpleSimulate.Rd index b2f5fda8c2bb960446c0cc808a457c305956f1d0..e52be18cbe30fddf3f5cf79f5c34978144addf48 100644 --- a/man/simpleSimulate.Rd +++ b/man/simpleSimulate.Rd @@ -15,7 +15,7 @@ simpleSimulate(params = newSimpleParams(), verbose = TRUE, ...) \code{params}.} } \value{ -SCESet containing simulated counts +SingleCellExperiment containing simulated counts } \description{ Simulate counts from a simple negative binomial distribution without diff --git a/man/splatEstimate.Rd b/man/splatEstimate.Rd index f698fd93e1c57409d5f4317350c05b75bb1554c1..b14d5195af99f9d04700f1bd300487cdfc8c951b 100644 --- a/man/splatEstimate.Rd +++ b/man/splatEstimate.Rd @@ -2,19 +2,20 @@ % Please edit documentation in R/splat-estimate.R \name{splatEstimate} \alias{splatEstimate} -\alias{splatEstimate.SCESet} +\alias{splatEstimate.SingleCellExperiment} \alias{splatEstimate.matrix} \title{Estimate Splat simulation parameters} \usage{ splatEstimate(counts, params = newSplatParams()) -\method{splatEstimate}{SCESet}(counts, params = newSplatParams()) +\method{splatEstimate}{SingleCellExperiment}(counts, + params = newSplatParams()) \method{splatEstimate}{matrix}(counts, params = newSplatParams()) } \arguments{ -\item{counts}{either a counts matrix or an SCESet object containing count -data to estimate parameters from.} +\item{counts}{either a counts matrix or a SingleCellExperiment object +containing count data to estimate parameters from.} \item{params}{SplatParams object to store estimated values in.} } diff --git a/man/splatSimBCVMeans.Rd b/man/splatSimBCVMeans.Rd index 315b5ae7c733d54c5f468d38679fcd3491d8801c..9ffc622a39e450d7c0cda24888373d95f77f87b3 100644 --- a/man/splatSimBCVMeans.Rd +++ b/man/splatSimBCVMeans.Rd @@ -7,12 +7,12 @@ splatSimBCVMeans(sim, params) } \arguments{ -\item{sim}{SCESet to add BCV means to.} +\item{sim}{SingleCellExperiment to add BCV means to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated BCV means. +SingleCellExperiment with simulated BCV means. } \description{ Simulate means for each gene in each cell that are adjusted to follow a diff --git a/man/splatSimBatchCellMeans.Rd b/man/splatSimBatchCellMeans.Rd index edd0736eade9125283331e9eba752a50247ceae4..e0d7869c22900a0c204d8993fac9ef87b8bf6b35 100644 --- a/man/splatSimBatchCellMeans.Rd +++ b/man/splatSimBatchCellMeans.Rd @@ -7,12 +7,12 @@ splatSimBatchCellMeans(sim, params) } \arguments{ -\item{sim}{SCESet to add batch means to.} +\item{sim}{SingleCellExperiment to add batch means to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated batch means. +SingleCellExperiment with simulated batch means. } \description{ Simulate a mean for each gene in each cell incorporating batch effect diff --git a/man/splatSimBatchEffects.Rd b/man/splatSimBatchEffects.Rd index 76c43040a913982189364cc7c283f377410f290c..c047ab4e6619a133793506e38ac48d9d04186211 100644 --- a/man/splatSimBatchEffects.Rd +++ b/man/splatSimBatchEffects.Rd @@ -7,12 +7,12 @@ splatSimBatchEffects(sim, params) } \arguments{ -\item{sim}{SCESet to add batch effects to.} +\item{sim}{SingleCellExperiment to add batch effects to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated batch effects. +SingleCellExperiment with simulated batch effects. } \description{ Simulate batch effects. Batch effect factors for each batch are produced diff --git a/man/splatSimCellMeans.Rd b/man/splatSimCellMeans.Rd index 436fd6fe380941b7c750c94fb67912df304de65d..de5222b2f54d448a1f87f4d65bd8265a757a776c 100644 --- a/man/splatSimCellMeans.Rd +++ b/man/splatSimCellMeans.Rd @@ -14,12 +14,12 @@ splatSimGroupCellMeans(sim, params) splatSimPathCellMeans(sim, params) } \arguments{ -\item{sim}{SCESet to add cell means to.} +\item{sim}{SingleCellExperiment to add cell means to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with added cell means. +SingleCellExperiment with added cell means. } \description{ Simulate a gene by cell matrix giving the mean expression for each gene in diff --git a/man/splatSimDE.Rd b/man/splatSimDE.Rd index 85f7680705553abb29af3e92d0f4c71039f16ac8..257fb1c7d43b6fbf1a6c9fc11f9d8c0864eae720 100644 --- a/man/splatSimDE.Rd +++ b/man/splatSimDE.Rd @@ -11,12 +11,12 @@ splatSimGroupDE(sim, params) splatSimPathDE(sim, params) } \arguments{ -\item{sim}{SCESet to add differential expression to.} +\item{sim}{SingleCellExperiment to add differential expression to.} \item{params}{splatParams object with simulation parameters.} } \value{ -SCESet with simulated differential expression. +SingleCellExperiment with simulated differential expression. } \description{ Simulate differential expression. Differential expression factors for each diff --git a/man/splatSimDropout.Rd b/man/splatSimDropout.Rd index 166336c8c317a19ffbdebeac8e4016ebcf2336c0..7f68ba3c5ede69f35e49615d824f8f22df785766 100644 --- a/man/splatSimDropout.Rd +++ b/man/splatSimDropout.Rd @@ -7,12 +7,12 @@ splatSimDropout(sim, params) } \arguments{ -\item{sim}{SCESet to add dropout to.} +\item{sim}{SingleCellExperiment to add dropout to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated dropout and observed counts. +SingleCellExperiment with simulated dropout and observed counts. } \description{ A logistic function is used to form a relationshop between the expression diff --git a/man/splatSimGeneMeans.Rd b/man/splatSimGeneMeans.Rd index 7d738db8f2efa32e5f5f3f796c732f3cd612b8f0..4a1326948e9356166abe417d1cdd2dc55f279ca6 100644 --- a/man/splatSimGeneMeans.Rd +++ b/man/splatSimGeneMeans.Rd @@ -7,12 +7,12 @@ splatSimGeneMeans(sim, params) } \arguments{ -\item{sim}{SCESet to add gene means to.} +\item{sim}{SingleCellExperiment to add gene means to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated gene means. +SingleCellExperiment with simulated gene means. } \description{ Simulate gene means from a gamma distribution. Also simulates outlier diff --git a/man/splatSimLibSizes.Rd b/man/splatSimLibSizes.Rd index 4785021b318feedef285c865cc071497286db40e..3c5c380d91cc3bea40c224f26b0dd564aca7cc26 100644 --- a/man/splatSimLibSizes.Rd +++ b/man/splatSimLibSizes.Rd @@ -7,12 +7,12 @@ splatSimLibSizes(sim, params) } \arguments{ -\item{sim}{SCESet to add library size to.} +\item{sim}{SingleCellExperiment to add library size to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated library sizes. +SingleCellExperiment with simulated library sizes. } \description{ Simulate expected library sizes from a log-normal distribution diff --git a/man/splatSimTrueCounts.Rd b/man/splatSimTrueCounts.Rd index 4fc2464f381bb14a4a20a87f80e36bf765a5e2a8..cb2ba3036d6a961229f26b7ddc7a43d2a0daddd5 100644 --- a/man/splatSimTrueCounts.Rd +++ b/man/splatSimTrueCounts.Rd @@ -7,12 +7,12 @@ splatSimTrueCounts(sim, params) } \arguments{ -\item{sim}{SCESet to add true counts to.} +\item{sim}{SingleCellExperiment to add true counts to.} \item{params}{SplatParams object with simulation parameters.} } \value{ -SCESet with simulated true counts. +SingleCellExperiment with simulated true counts. } \description{ Simulate a true counts matrix. Counts are simulated from a poisson diff --git a/man/splatSimulate.Rd b/man/splatSimulate.Rd index d827f16918dde453d4061c6554b7374204eb6061..0db1f7205a0264e5b164c796fc2814dc27ea0120 100644 --- a/man/splatSimulate.Rd +++ b/man/splatSimulate.Rd @@ -31,8 +31,8 @@ trajectories (eg. differentiation processes).} \code{params}.} } \value{ -SCESet object containing the simulated counts and intermediate -values. +SingleCellExperiment object containing the simulated counts and +intermediate values. } \description{ Simulate count data from a fictional single-cell RNA-seq experiment using @@ -56,15 +56,16 @@ The simulation involves the following steps: \item Simulate BCV adjusted cell means \item Simulate true counts \item Simulate dropout - \item Create final SCESet object + \item Create final dataset } -The final output is an \code{\link[scater]{SCESet}} object that contains the -simulated counts but also the values for various intermediate steps. These -are stored in the \code{\link[Biobase]{phenoData}} (for cell specific -information), \code{\link[Biobase]{featureData}} (for gene specific -information) or \code{\link[Biobase]{assayData}} (for gene by cell matrices) -slots. This additional information includes: +The final output is a +\code{\link[SingleCellExperiment]{SingleCellExperiment}} object that +contains the simulated counts but also the values for various intermediate +steps. These are stored in the \code{\link[SummarizedExperiment]{colData}} +(for cell specific information), \code{\link[SummarizedExperiment]{rowData}} +(for gene specific information) or \code{\link[SummarizedExperiment]{assays}} +(for gene by cell matrices) slots. This additional information includes: \describe{ \item{\code{phenoData}}{ \describe{ @@ -108,9 +109,9 @@ slots. This additional information includes: } } -Values that have been added by Splatter are named using \code{CamelCase} in -order to differentiate them from the values added by Scater which uses -\code{underscore_naming}. +Values that have been added by Splatter are named using \code{UpperCamelCase} +in order to differentiate them from the values added by analysis packages +which typically use \code{underscore_naming}. } \examples{ # Simulation with default parameters