Skip to content
Snippets Groups Projects
Commit 9df97dd1 authored by Luke Zappia's avatar Luke Zappia
Browse files

Address Bioconductor build warnings, notes

* Add locfit to NAMESPACE
* Add return values to logistic, showPP documentation
* Delete commented mergeParams function
* Switch to aes_string in compareSCESets
* Add examples to getParam, setParam
* Adjust line lengths
* Adjust indentation
parent 4097cba4
No related branches found
No related tags found
No related merge requests found
Package: splatter Package: splatter
Type: Package Type: Package
Title: Simple Simulation of Single-cell RNA Sequencing Data Title: Simple Simulation of Single-cell RNA Sequencing Data
Version: 0.99.0 Version: 0.99.1
Date: 2016-12-05 Date: 2016-12-12
Author: Luke Zappia Author: Luke Zappia
Authors@R: Authors@R:
c(person("Luke", "Zappia", role = c("aut", "cre"), c(person("Luke", "Zappia", role = c("aut", "cre"),
......
...@@ -53,7 +53,7 @@ importFrom(checkmate,checkIntegerish) ...@@ -53,7 +53,7 @@ importFrom(checkmate,checkIntegerish)
importFrom(checkmate,checkLogical) importFrom(checkmate,checkLogical)
importFrom(checkmate,checkNumber) importFrom(checkmate,checkNumber)
importFrom(checkmate,checkNumeric) importFrom(checkmate,checkNumeric)
importFrom(ggplot2,aes) importFrom(ggplot2,aes_string)
importFrom(ggplot2,geom_boxplot) importFrom(ggplot2,geom_boxplot)
importFrom(ggplot2,geom_point) importFrom(ggplot2,geom_point)
importFrom(ggplot2,geom_smooth) importFrom(ggplot2,geom_smooth)
...@@ -65,6 +65,7 @@ importFrom(ggplot2,scale_y_log10) ...@@ -65,6 +65,7 @@ importFrom(ggplot2,scale_y_log10)
importFrom(ggplot2,theme_minimal) importFrom(ggplot2,theme_minimal)
importFrom(ggplot2,xlab) importFrom(ggplot2,xlab)
importFrom(ggplot2,ylab) importFrom(ggplot2,ylab)
importFrom(locfit,locfit)
importFrom(methods,"slot<-") importFrom(methods,"slot<-")
importFrom(methods,as) importFrom(methods,as)
importFrom(methods,callNextMethod) importFrom(methods,callNextMethod)
......
# splatter 0.99.1
* Address Biocondutor build warnings, notes
# splatter 0.99.0 # splatter 0.99.0
* Submit to Bioconductor * Submit to Bioconductor
......
...@@ -7,9 +7,9 @@ ...@@ -7,9 +7,9 @@
#' The Params class defines the following parameters: #' The Params class defines the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{[nGenes]}}{The number of genes to simulate.} #' \item{\code{[nGenes]}}{The number of genes to simulate.}
#' \item{\code{[nCells]}}{The number of cells to simulate.} #' \item{\code{[nCells]}}{The number of cells to simulate.}
#' \item{\code{seed}}{Seed to use for generating random numbers.} #' \item{\code{seed}}{Seed to use for generating random numbers.}
#' } #' }
#' #'
#' The parameters shown in brackets can be estimated from real data. #' The parameters shown in brackets can be estimated from real data.
...@@ -34,15 +34,15 @@ setClass("Params", ...@@ -34,15 +34,15 @@ setClass("Params",
#' The simple simulation uses the following parameters: #' The simple simulation uses the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{nGenes}}{The number of genes to simulate.} #' \item{\code{nGenes}}{The number of genes to simulate.}
#' \item{\code{nCells}}{The number of cells to simulate.} #' \item{\code{nCells}}{The number of cells to simulate.}
#' \item{\code{[seed]}}{Seed to use for generating random numbers.} #' \item{\code{[seed]}}{Seed to use for generating random numbers.}
#' \item{\code{mean.shape}}{The shape parameter for the mean gamma #' \item{\code{mean.shape}}{The shape parameter for the mean gamma
#' distribution.} #' distribution.}
#' \item{\code{mean.rate}}{The rate parameter for the mean gamma #' \item{\code{mean.rate}}{The rate parameter for the mean gamma
#' distribution.} #' distribution.}
#' \item{\code{[count.disp]}}{The dispersion parameter for the counts negative #' \item{\code{[count.disp]}}{The dispersion parameter for the counts
#' binomial distribution.} #' negative binomial distribution.}
#' } #' }
#' #'
#' The parameters not shown in brackets can be estimated from real data using #' The parameters not shown in brackets can be estimated from real data using
...@@ -70,93 +70,97 @@ setClass("SimpleParams", ...@@ -70,93 +70,97 @@ setClass("SimpleParams",
#' The Splatter simulation requires the following parameters: #' The Splatter simulation requires the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{nGenes}}{The number of genes to simulate.} #' \item{\code{nGenes}}{The number of genes to simulate.}
#' \item{\code{nCells}}{The number of cells to simulate.} #' \item{\code{nCells}}{The number of cells to simulate.}
#' \item{\code{[nGroups]}}{The number of groups or paths to simulate.} #' \item{\code{[nGroups]}}{The number of groups or paths to simulate.}
#' \item{\code{[groupCells]}}{Vector giving the number of cells in each #' \item{\code{[groupCells]}}{Vector giving the number of cells in each
#' simulation group/path.} #' simulation group/path.}
#' \item{\code{[seed]}}{Seed to use for generating random numbers.} #' \item{\code{[seed]}}{Seed to use for generating random numbers.}
#' \item{\emph{Mean parameters}}{ #' \item{\emph{Mean parameters}}{
#' \describe{ #' \describe{
#' \item{\code{mean.shape}}{Shape parameter for the mean gamma #' \item{\code{mean.shape}}{Shape parameter for the mean gamma
#' distribution.} #' distribution.}
#' \item{\code{mean.rate}}{Rate parameter for the mean gamma #' \item{\code{mean.rate}}{Rate parameter for the mean gamma
#' distribution.} #' distribution.}
#' }
#' } #' }
#' } #' \item{\emph{Library size parameters}}{
#' \item{\emph{Library size parameters}}{ #' \describe{
#' \describe{ #' \item{\code{lib.loc}}{Location (meanlog) parameter for the
#' \item{\code{lib.loc}}{Location (meanlog) parameter for the library #' library size log-normal distribution.}
#' size log-normal distribution.} #' \item{\code{lib.scale}}{Scale (sdlog) parameter for the library
#' \item{\code{lib.scale}}{Scale (sdlog) parameter for the library size #' size log-normal distribution.}
#' log-normal distribution.} #' }
#' } #' }
#' } #' \item{\emph{Expression outlier parameters}}{
#' \item{\emph{Expression outlier parameters}}{ #' \describe{
#' \describe{ #' \item{\code{out.prob}}{Probability that a gene is an expression
#' \item{\code{out.prob}}{Probability that a gene is an expression #' outlier.}
#' outlier.} #' \item{\code{out.loProb}}{Probability that an expression outlier
#' \item{\code{out.loProb}}{Probability that an expression outlier gene #' gene is lowly expressed.}
#' is lowly expressed.} #' \item{\code{out.facLoc}}{Location (meanlog) parameter for the
#' \item{\code{out.facLoc}}{Location (meanlog) parameter for the #' expression outlier factor log-normal distribution.}
#' expression outlier factor log-normal distribution.} #' \item{\code{out.facScale}}{Scale (sdlog) parameter for the
#' \item{\code{out.facScale}}{Scale (sdlog) parameter for the expression #' expression outlier factor log-normal distribution.}
#' outlier factor log-normal distribution.} #' }
#' } #' }
#' } #' \item{\emph{Differential expression parameters}}{
#' \item{\emph{Differential expression parameters}}{ #' \describe{
#' \describe{ #' \item{\code{[de.prob]}}{Probability that a gene is differentially
#' \item{\code{[de.prob]}}{Probability that a gene is differentially #' expressed in a group. Can be a vector.}
#' expressed in a group. Can be a vector.} #' \item{\code{[de.loProb]}}{Probability that a differentially
#' \item{\code{[de.loProb]}}{Probability that a differentially expressed #' expressed gene is down-regulated. Can be a vector.}
#' gene is down-regulated. Can be a vector.} #' \item{\code{[de.facLoc]}}{Location (meanlog) parameter for the
#' \item{\code{[de.facLoc]}}{Location (meanlog) parameter for the #' differential expression factor log-normal distribution. Can be a
#' differential expression factor log-normal distribution. Can be a #' vector.}
#' vector.} #' \item{\code{[de.facScale]}}{Scale (sdlog) parameter for the
#' \item{\code{[de.facScale]}}{Scale (sdlog) parameter for the #' differential expression factor log-normal distribution. Can be a
#' differential expression factor log-normal distribution. Can be a #' vector.}
#' vector.} #' }
#' } #' }
#' } #' \item{\emph{Biological Coefficient of Variation parameters}}{
#' \item{\emph{Biological Coefficient of Variation parameters}}{ #' \describe{
#' \describe{ #' \item{\code{bcv.common}}{Underlying common dispersion across all
#' \item{\code{bcv.common}}{Underlying common dispersion across all #' genes.}
#' genes.} #' \item{\code{bcv.df}}{Degrees of Freedom for the BCV inverse
#' \item{\code{bcv.df}}{Degrees of Freedom for the BCV inverse chi-squared #' chi-squared distribution.}
#' distribution.} #' }
#' } #' }
#' } #' \item{\emph{Dropout parameters}}{
#' \item{\emph{Dropout parameters}}{ #' \describe{
#' \describe{ #' \item{\code{dropout.present}}{Logical. Whether to simulate
#' \item{\code{dropout.present}}{Logical. Whether to simulate dropout.} #' dropout.}
#' \item{\code{dropout.mid}}{Midpoint parameter for the dropout logistic #' \item{\code{dropout.mid}}{Midpoint parameter for the dropout
#' function.} #' logistic function.}
#' \item{\code{dropout.shape}}{Shape parameter for the dropout logistic #' \item{\code{dropout.shape}}{Shape parameter for the dropout
#' function.} #' logistic function.}
#' }
#' } #' }
#' } #' \item{\emph{Differentiation path parameters}}{
#' \item{\emph{Differentiation path parameters}}{ #' \describe{
#' \describe{ #' \item{\code{[path.from]}}{Vector giving the originating point of
#' \item{\code{[path.from]}}{Vector giving the originating point of each #' each path. This allows path structure such as a cell type which
#' path. This allows path structure such as a cell type which #' differentiates into an intermediate cell type that then
#' differentiates into an intermediate cell type that then differentiates #' differentiates into two mature cell types. A path structure of
#' into two mature cell types. A path structure of this form would have a #' this form would have a "from" parameter of c(0, 1, 1) (where 0 is
#' "from" parameter of c(0, 1, 1) (where 0 is the origin). If no vector is #' the origin). If no vector is given all paths will start at the
#' given all paths will start at the origin.} #' origin.}
#' \item{\code{[path.length]}}{Vector giving the number of steps to #' \item{\code{[path.length]}}{Vector giving the number of steps to
#' simulate along each path. If a single value is given it will be applied #' simulate along each path. If a single value is given it will be
#' to all paths.} #' applied to all paths.}
#' \item{\code{[path.skew]}}{Vector giving the skew of each path. Values #' \item{\code{[path.skew]}}{Vector giving the skew of each path.
#' closer to 1 will give more cells towards the starting population, #' Values closer to 1 will give more cells towards the starting
#' values closer to 0 will give more cells towards the final population. #' population, values closer to 0 will give more cells towards the
#' If a single value is given it will be applied to all paths.} #' final population. If a single value is given it will be applied
#' \item{\code{[path.nonlinearProb]}}{Probability that a gene follows a #' to all paths.}
#' non-linear path along the differentiation path. This allows more #' \item{\code{[path.nonlinearProb]}}{Probability that a gene
#' complex gene patterns such as a gene being equally expressed at the #' follows a non-linear path along the differentiation path. This
#' beginning an end of a path but lowly expressed in the middle.} #' allows more complex gene patterns such as a gene being equally
#' \item{\code{[path.sigmaFac]}}{Sigma factor for non-linear gene paths. #' expressed at the beginning an end of a path but lowly expressed
#' A higher value will result in more extreme non-linear variations along #' in the middle.}
#' a path.} #' \item{\code{[path.sigmaFac]}}{Sigma factor for non-linear gene
#' paths. A higher value will result in more extreme non-linear
#' variations along a path.}
#' } #' }
#' } #' }
#' } #' }
...@@ -229,34 +233,35 @@ setClass("SplatParams", ...@@ -229,34 +233,35 @@ setClass("SplatParams",
#' The Lun simulation uses the following parameters: #' The Lun simulation uses the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{nGenes}}{The number of genes to simulate.} #' \item{\code{nGenes}}{The number of genes to simulate.}
#' \item{\code{nCells}}{The number of cells to simulate.} #' \item{\code{nCells}}{The number of cells to simulate.}
#' \item{\code{[nGroups]}}{The number of groups to simulate.} #' \item{\code{[nGroups]}}{The number of groups to simulate.}
#' \item{\code{[groupCells]}}{Vector giving the number of cells in each #' \item{\code{[groupCells]}}{Vector giving the number of cells in each
#' simulation group/path.} #' simulation group/path.}
#' \item{\code{[seed]}}{Seed to use for generating random numbers.} #' \item{\code{[seed]}}{Seed to use for generating random numbers.}
#' \item{\emph{Mean parameters}}{ #' \item{\emph{Mean parameters}}{
#' \describe{ #' \describe{
#' \item{\code{[mean.shape]}}{Shape parameter for the mean gamma #' \item{\code{[mean.shape]}}{Shape parameter for the mean gamma
#' distribution.} #' distribution.}
#' \item{\code{[mean.rate]}}{Rate parameter for the mean gamma #' \item{\code{[mean.rate]}}{Rate parameter for the mean gamma
#' distribution.} #' distribution.}
#' }
#' } #' }
#' } #' \item{\emph{Counts parameters}}{
#' \item{\emph{Counts parameters}}{ #' \describe{
#' \describe{ #' \item{\code{[count.disp]}}{The dispersion parameter for the
#' \item{\code{[count.disp]}}{The dispersion parameter for the counts #' counts negative binomial distribution.}
#' negative binomial distribution.} #' }
#' } #' }
#' } #' \item{\emph{Differential expression parameters}}{
#' \item{\emph{Differential expression parameters}}{ #' \describe{
#' \describe{ #' \item{\code{[de.nGenes]}}{The number of genes that are
#' \item{\code{[de.nGenes]}}{The number of genes that are differentially #' differentially expressed in each group}
#' expressed in each group} #' \item{\code{[de.upProp]}}{The proportion of differentially
#' \item{\code{[de.upProp]}}{The proportion of differentially expressed #' expressed genes that are up-regulated in each group}
#' genes that are up-regulated in each group} #' \item{\code{[de.upFC]}}{The fold change for up-regulated genes}
#' \item{\code{[de.upFC]}}{The fold change for up-regulated genes} #' \item{\code{[de.downFC]}}{The fold change for down-regulated
#' \item{\code{[de.downFC]}}{The fold change for down-regulated genes} #' genes}
#' } #' }
#' } #' }
#' } #' }
...@@ -290,41 +295,43 @@ setClass("LunParams", ...@@ -290,41 +295,43 @@ setClass("LunParams",
#' The Lun2 simulation uses the following parameters: #' The Lun2 simulation uses the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{nGenes}}{The number of genes to simulate.} #' \item{\code{nGenes}}{The number of genes to simulate.}
#' \item{\code{nCells}}{The number of cells to simulate.} #' \item{\code{nCells}}{The number of cells to simulate.}
#' \item{\code{[seed]}}{Seed to use for generating random numbers.} #' \item{\code{[seed]}}{Seed to use for generating random numbers.}
#' \item{\code{[nPlates]}}{The number of plates to simulate.} #' \item{\code{[nPlates]}}{The number of plates to simulate.}
#' \item{\emph{Plate parameters}}{ #' \item{\emph{Plate parameters}}{
#' \describe{ #' \describe{
#' \item{\code{plate.ingroup}}{Character vecotor giving the plates #' \item{\code{plate.ingroup}}{Character vecotor giving the plates
#' considered to be part of the "ingroup".} #' considered to be part of the "ingroup".}
#' \item{\code{plate.mod}}{Plate effect modifier factor. The plate effect #' \item{\code{plate.mod}}{Plate effect modifier factor. The plate
#' variance is divided by this value.} #' effect variance is divided by this value.}
#' \item{\code{plate.var}}{Plate effect variance.} #' \item{\code{plate.var}}{Plate effect variance.}
#' }
#' } #' }
#' } #' \item{\emph{Gene parameters}}{
#' \item{\emph{Gene parameters}}{ #' \describe{
#' \describe{ #' \item{\code{gene.means}}{Mean expression for each gene.}
#' \item{\code{gene.means}}{Mean expression for each gene.} #' \item{\code{gene.disps}}{Dispersion for each gene.}
#' \item{\code{gene.disps}}{Dispersion for each gene.} #' \item{\code{gene.ziMeans}}{Zero-inflated gene means.}
#' \item{\code{gene.ziMeans}}{Zero-inflated gene means.} #' \item{\code{gene.ziDisps}}{Zero-inflated gene dispersions.}
#' \item{\code{gene.ziDisps}}{Zero-inflated gene dispersions.} #' \item{\code{gene.ziProps}}{Zero-inflated gene zero proportions.}
#' \item{\code{gene.ziProps}}{Zero-inflated gene zero proportions.} #' }
#' } #' }
#' } #' \item{\emph{Cell parameters}}{
#' \item{\emph{Cell parameters}}{ #' \describe{
#' \describe{ #' \item{\code{cell.plates}}{Factor giving the plate that each cell
#' \item{\code{cell.plates}}{Factor giving the plate that each cell comes #' comes from.}
#' from.} #' \item{\code{cell.libSizes}}{Library size for each cell.}
#' \item{\code{cell.libSizes}}{Library size for each cell.} #' \item{\code{cell.libMod}}{Modifier factor for library sizes.
#' \item{\code{cell.libMod}}{Modifier factor for library sizes. #' The library sizes are multiplied by this value.}
#' The library sizes are multiplied by this value.} #' }
#' } #' }
#' } #' \item{\emph{Differential expression parameters}}{
#' \item{\emph{Differential expression parameters}}{ #' \describe{
#' \describe{ #' \item{\code{de.nGenes}}{Number of differentially expressed
#' \item{\code{de.nGenes}}{Number of differentially expressed genes.} #' genes.}
#' \item{\code{de.fc}}{Fold change for differentially expressed genes.} #' \item{\code{de.fc}}{Fold change for differentially expressed
#' genes.}
#' } #' }
#' } #' }
#' } #' }
...@@ -377,20 +384,20 @@ setClass("Lun2Params", ...@@ -377,20 +384,20 @@ setClass("Lun2Params",
#' The SCDD simulation uses the following parameters: #' The SCDD simulation uses the following parameters:
#' #'
#' \describe{ #' \describe{
#' \item{\code{[nGenes]}}{The number of genes to simulate (not used).} #' \item{\code{[nGenes]}}{The number of genes to simulate (not used).}
#' \item{\code{nCells}}{The number of cells to simulate in each condition.} #' \item{\code{nCells}}{The number of cells to simulate in each condition.}
#' \item{\code{[seed]}}{Seed to use for generating random numbers.} #' \item{\code{[seed]}}{Seed to use for generating random numbers.}
#' \item{\code{SCdat}}{\code{\link{ExpressionSet}} containing real data.} #' \item{\code{SCdat}}{\code{\link{ExpressionSet}} containing real data.}
#' \item{\code{[nDE]}}{Number of DE genes to simulate.} #' \item{\code{[nDE]}}{Number of DE genes to simulate.}
#' \item{\code{[nDP]}}{Number of DP genes to simulate.} #' \item{\code{[nDP]}}{Number of DP genes to simulate.}
#' \item{\code{[nDM]}}{Number of DM genes to simulate.} #' \item{\code{[nDM]}}{Number of DM genes to simulate.}
#' \item{\code{[nDB]}}{Number of DB genes to simulate.} #' \item{\code{[nDB]}}{Number of DB genes to simulate.}
#' \item{\code{[nEE]}}{Number of EE genes to simulate.} #' \item{\code{[nEE]}}{Number of EE genes to simulate.}
#' \item{\code{[nEP]}}{Number of EP genes to simulate.} #' \item{\code{[nEP]}}{Number of EP genes to simulate.}
#' \item{\code{[sd.range]}}{Interval for fold change standard deviations.} #' \item{\code{[sd.range]}}{Interval for fold change standard deviations.}
#' \item{\code{[modeFC]}}{Values for DP, DM and DB mode fold changes.} #' \item{\code{[modeFC]}}{Values for DP, DM and DB mode fold changes.}
#' \item{\code{[varInflation}]}{Variance inflation factors for each #' \item{\code{[varInflation}]}{Variance inflation factors for each
#' condition.} #' condition.}
#' } #' }
#' #'
#' The parameters not shown in brackets can be estimated from real data using #' The parameters not shown in brackets can be estimated from real data using
......
...@@ -22,6 +22,10 @@ NULL ...@@ -22,6 +22,10 @@ NULL
#' #'
#' @return The extracted parameter value #' @return The extracted parameter value
#' #'
#' @examples
#' params <- newSimpleParams()
#' getParam(params, "nGenes")
#'
#' @rdname getParam #' @rdname getParam
#' @export #' @export
setGeneric("getParam", function(object, name) {standardGeneric("getParam")}) setGeneric("getParam", function(object, name) {standardGeneric("getParam")})
...@@ -36,10 +40,14 @@ setGeneric("getParam", function(object, name) {standardGeneric("getParam")}) ...@@ -36,10 +40,14 @@ setGeneric("getParam", function(object, name) {standardGeneric("getParam")})
#' #'
#' @return Object with new parameter value. #' @return Object with new parameter value.
#' #'
#' @examples
#' params <- newSimpleParams()
#' setParam(params, "nGenes", 100)
#'
#' @rdname setParam #' @rdname setParam
#' @export #' @export
setGeneric("setParam", setGeneric("setParam",
function(object, name, value) { function(object, name, value) {
standardGeneric("setParam") standardGeneric("setParam")
}) })
......
...@@ -9,19 +9,21 @@ ...@@ -9,19 +9,21 @@
#' The return list has three items: #' The return list has three items:
#' #'
#' \describe{ #' \describe{
#' \item{\code{FeatureData}}{Combined feature data from the provided SCESets.} #' \item{\code{FeatureData}}{Combined feature data from the provided
#' \item{\code{PhenoData}}{Combined pheno data from the provided SCESets.} #' SCESets.}
#' \item{\code{Plots}}{Comparison plots #' \item{\code{PhenoData}}{Combined pheno data from the provided SCESets.}
#' \describe{ #' \item{\code{Plots}}{Comparison plots
#' \item{\code{Means}}{Violin plot of mean distribution.} #' \describe{
#' \item{\code{Variances}}{Violin plot of variance distribution.} #' \item{\code{Means}}{Violin plot of mean distribution.}
#' \item{\code{MeanVar}}{Scatter plot with fitted lines showing the #' \item{\code{Variances}}{Violin plot of variance distribution.}
#' mean-variance relationship.} #' \item{\code{MeanVar}}{Scatter plot with fitted lines showing the
#' \item{\code{LibraySizes}}{Boxplot of the library size distribution.} #' mean-variance relationship.}
#' \item{\code{ZerosGene}}{Boxplot of the percentage of each gene that is #' \item{\code{LibraySizes}}{Boxplot of the library size
#' zero.} #' distribution.}
#' \item{\code{ZerosCell}}{Boxplot of the percentage of each cell that is #' \item{\code{ZerosGene}}{Boxplot of the percentage of each gene
#' zero.} #' that is zero.}
#' \item{\code{ZerosCell}}{Boxplot of the percentage of each cell
#' that is zero.}
#' } #' }
#' } #' }
#' } #' }
...@@ -39,7 +41,7 @@ ...@@ -39,7 +41,7 @@
#' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2)) #' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2))
#' names(comparison) #' names(comparison)
#' names(comparison$Plots) #' names(comparison$Plots)
#' @importFrom ggplot2 ggplot aes geom_point geom_smooth geom_boxplot #' @importFrom ggplot2 ggplot aes_string geom_point geom_smooth geom_boxplot
#' geom_violin scale_y_continuous scale_y_log10 xlab ylab ggtitle theme_minimal #' geom_violin scale_y_continuous scale_y_log10 xlab ylab ggtitle theme_minimal
#' @importFrom scater cpm<- #' @importFrom scater cpm<-
#' @export #' @export
...@@ -48,7 +50,6 @@ compareSCESets <- function(sces) { ...@@ -48,7 +50,6 @@ compareSCESets <- function(sces) {
checkmate::assertList(sces, types = "SCESet", any.missing = FALSE, checkmate::assertList(sces, types = "SCESet", any.missing = FALSE,
min.len = 1, names = "unique") min.len = 1, names = "unique")
for (name in names(sces)) { for (name in names(sces)) {
sce <- sces[[name]] sce <- sces[[name]]
fData(sce)$Dataset <- name fData(sce)$Dataset <- name
...@@ -76,14 +77,16 @@ compareSCESets <- function(sces) { ...@@ -76,14 +77,16 @@ compareSCESets <- function(sces) {
pData.all$Dataset <- factor(pData.all$Dataset, levels = names(sces)) pData.all$Dataset <- factor(pData.all$Dataset, levels = names(sces))
means <- ggplot(fData.all, means <- ggplot(fData.all,
aes(x = Dataset, y = mean_log_cpm, colour = Dataset)) + aes_string(x = "Dataset", y = "mean_log_cpm",
colour = "Dataset")) +
geom_violin(draw_quantiles = c(0.25, 0.5, 0.75)) + geom_violin(draw_quantiles = c(0.25, 0.5, 0.75)) +
ylab(expression(paste("Mean ", log[2], "(CPM + 1)"))) + ylab(expression(paste("Mean ", log[2], "(CPM + 1)"))) +
ggtitle("Distribution of mean expression") + ggtitle("Distribution of mean expression") +
theme_minimal() theme_minimal()
vars <- ggplot(fData.all, vars <- ggplot(fData.all,
aes(x = Dataset, y = var_cpm, colour = Dataset)) + aes_string(x = "Dataset", y = "var_cpm",
colour = "Dataset")) +
geom_violin(draw_quantiles = c(0.25, 0.5, 0.75)) + geom_violin(draw_quantiles = c(0.25, 0.5, 0.75)) +
scale_y_log10(labels = scales::comma) + scale_y_log10(labels = scales::comma) +
ylab("CPM Variance") + ylab("CPM Variance") +
...@@ -91,8 +94,8 @@ compareSCESets <- function(sces) { ...@@ -91,8 +94,8 @@ compareSCESets <- function(sces) {
theme_minimal() theme_minimal()
mean.var <- ggplot(fData.all, mean.var <- ggplot(fData.all,
aes(x = mean_log_cpm, y = var_log_cpm, colour = Dataset, aes_string(x = "mean_log_cpm", y = "var_log_cpm",
fill = Dataset)) + olour = "Dataset", fill = "Dataset")) +
geom_point() + geom_point() +
geom_smooth() + geom_smooth() +
xlab(expression(paste("Mean ", log[2], "(CPM + 1)"))) + xlab(expression(paste("Mean ", log[2], "(CPM + 1)"))) +
...@@ -101,7 +104,8 @@ compareSCESets <- function(sces) { ...@@ -101,7 +104,8 @@ compareSCESets <- function(sces) {
theme_minimal() theme_minimal()
libs <- ggplot(pData.all, libs <- ggplot(pData.all,
aes(x = Dataset, y = total_counts, colour = Dataset)) + aes_string(x = "Dataset", y = "total_counts",
colour = "Dataset")) +
geom_boxplot() + geom_boxplot() +
scale_y_continuous(labels = scales::comma) + scale_y_continuous(labels = scales::comma) +
ylab("Total counts per cell") + ylab("Total counts per cell") +
...@@ -109,7 +113,8 @@ compareSCESets <- function(sces) { ...@@ -109,7 +113,8 @@ compareSCESets <- function(sces) {
theme_minimal() theme_minimal()
z.gene <- ggplot(fData.all, z.gene <- ggplot(fData.all,
aes(x = Dataset, y = pct_dropout, colour = Dataset)) + aes_string(x = "Dataset", y = "pct_dropout",
colour = "Dataset")) +
geom_boxplot() + geom_boxplot() +
scale_y_continuous(limits = c(0, 100)) + scale_y_continuous(limits = c(0, 100)) +
ylab("Percentage zeros per gene") + ylab("Percentage zeros per gene") +
...@@ -117,7 +122,8 @@ compareSCESets <- function(sces) { ...@@ -117,7 +122,8 @@ compareSCESets <- function(sces) {
theme_minimal() theme_minimal()
z.cell <- ggplot(pData.all, z.cell <- ggplot(pData.all,
aes(x = Dataset, y = pct_dropout, colour = Dataset)) + aes_string(x = "Dataset", y = "pct_dropout",
colour = "Dataset")) +
geom_boxplot() + geom_boxplot() +
scale_y_continuous(limits = c(0, 100)) + scale_y_continuous(limits = c(0, 100)) +
ylab("Percentage zeros per cell") + ylab("Percentage zeros per cell") +
......
...@@ -39,6 +39,7 @@ lun2Estimate.SCESet <- function(counts, plates, params = newLun2Params(), ...@@ -39,6 +39,7 @@ lun2Estimate.SCESet <- function(counts, plates, params = newLun2Params(),
#' @rdname lun2Estimate #' @rdname lun2Estimate
#' @importFrom stats model.matrix #' @importFrom stats model.matrix
#' @importFrom locfit locfit
#' @export #' @export
lun2Estimate.matrix <- function(counts, plates, params = newLun2Params(), lun2Estimate.matrix <- function(counts, plates, params = newLun2Params(),
min.size = 200, verbose = TRUE) { min.size = 200, verbose = TRUE) {
...@@ -125,11 +126,12 @@ lun2Estimate.matrix <- function(counts, plates, params = newLun2Params(), ...@@ -125,11 +126,12 @@ lun2Estimate.matrix <- function(counts, plates, params = newLun2Params(),
collected <- lapply(seq_len(nrow(dge)), function(i) { collected <- lapply(seq_len(nrow(dge)), function(i) {
if (progress) {pb$tick()} if (progress) {pb$tick()}
tryCatch({ tryCatch({
out <- lme4::glmer(Counts ~ 0 + (1 | Plate) + offset(log(sum.facs)), out <- lme4::glmer(
data = data.frame(Counts = as.integer(counts[i, ]), Counts ~ 0 + (1 | Plate) + offset(log(sum.facs)),
Group = groups, data = data.frame(Counts = as.integer(counts[i, ]),
Plate = plates), Group = groups,
family = lme4::negative.binomial(1 / dge$tagwise[i])) Plate = plates),
family = lme4::negative.binomial(1 / dge$tagwise[i]))
output <- unlist(lme4::VarCorr(out)) output <- unlist(lme4::VarCorr(out))
return(output) return(output)
}, error = function(err) { }, error = function(err) {
......
...@@ -105,6 +105,8 @@ setParamsUnchecked <- function(params, update = NULL, ...) { ...@@ -105,6 +105,8 @@ setParamsUnchecked <- function(params, update = NULL, ...) {
#' @param params object to show. #' @param params object to show.
#' @param pp list specifying how the object should be displayed. #' @param pp list specifying how the object should be displayed.
#' #'
#' @return Print params object to console
#'
#' @importFrom utils head #' @importFrom utils head
showPP <- function(params, pp) { showPP <- function(params, pp) {
...@@ -131,29 +133,4 @@ showPP <- function(params, pp) { ...@@ -131,29 +133,4 @@ showPP <- function(params, pp) {
print(noquote(short.values), print.gap = 2) print(noquote(short.values), print.gap = 2)
cat("\n") cat("\n")
} }
} }
\ No newline at end of file
# mergeParams <- function(params1, params2) {
#
# if (class(params1) != class(params2)) {
# stop("params1 and params2 must be of the same Params class")
# }
#
# default <- new(class(params1))
#
# update <- list()
# for (parameter in slotNames(params1)) {
# value1 <- getParam(params1, parameter)
# default.value <- getParam(default, parameter)
# if (value1 == default.value) {
# value2 <- getParam(params2, parameter)
# update[[parameter]] <- value2
# } else {
# update[[parameter]] <- value1
# }
# }
#
# merged <- setParams(default, update)
#
# return(merged)
# }
\ No newline at end of file
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#' #'
#' The simulation involves the following steps: #' The simulation involves the following steps:
#' \enumerate{ #' \enumerate{
#' \item Set up simulation object #' \item Set up simulation object
#' \item Simulate library sizes #' \item Simulate library sizes
#' \item Simulate gene means #' \item Simulate gene means
#' \item Simulate groups/paths #' \item Simulate groups/paths
#' \item Simulate BCV adjusted cell means #' \item Simulate BCV adjusted cell means
#' \item Simulate true counts #' \item Simulate true counts
#' \item Simulate dropout #' \item Simulate dropout
#' \item Create final SCESet object #' \item Create final SCESet object
#' } #' }
#' #'
#' The final output is an \code{\link[scater]{SCESet}} object that contains the #' The final output is an \code{\link[scater]{SCESet}} object that contains the
...@@ -41,41 +41,41 @@ ...@@ -41,41 +41,41 @@
#' information) or \code{\link[Biobase]{assayData}} (for gene by cell matrices) #' information) or \code{\link[Biobase]{assayData}} (for gene by cell matrices)
#' slots. This additional information includes: #' slots. This additional information includes:
#' \describe{ #' \describe{
#' \item{\code{phenoData}}{ #' \item{\code{phenoData}}{
#' \describe{ #' \describe{
#' \item{Cell}{Unique cell identifier.} #' \item{Cell}{Unique cell identifier.}
#' \item{Group}{The group or path the cell belongs to.} #' \item{Group}{The group or path the cell belongs to.}
#' \item{ExpLibSize}{The expected library size for that cell.} #' \item{ExpLibSize}{The expected library size for that cell.}
#' \item{Step (paths only)}{how far along the path each cell is.} #' \item{Step (paths only)}{how far along the path each cell is.}
#' }
#' } #' }
#' } #' \item{\code{featureData}}{
#' \item{\code{featureData}}{ #' \describe{
#' \describe{ #' \item{Gene}{Unique gene identifier.}
#' \item{Gene}{Unique gene identifier.} #' \item{BaseGeneMean}{The base expression level for that gene.}
#' \item{BaseGeneMean}{The base expression level for that gene.} #' \item{OutlierFactor}{Expression outlier factor for that gene. Values
#' \item{OutlierFactor}{Expression outlier factor for that gene. Values #' of 1 indicate the gene is not an expression outlier.}
#' of 1 indicate the gene is not an expression outlier.} #' \item{GeneMean}{Expression level after applying outlier factors.}
#' \item{GeneMean}{Expression level after applying outlier factors.} #' \item{DEFac[Group]}{The differential expression factor for each gene
#' \item{DEFac[Group]}{The differential expression factor for each gene #' in a particular group. Values of 1 indicate the gene is not
#' in a particular group. Values of 1 indicate the gene is not #' differentially expressed.}
#' differentially expressed.} #' \item{GeneMean[Group]}{Expression level of a gene in a particular
#' \item{GeneMean[Group]}{Expression level of a gene in a particular #' group after applying differential expression factors.}
#' group after applying differential expression factors.} #' }
#' } #' }
#' } #' \item{\code{assayData}}{
#' \item{\code{assayData}}{ #' \describe{
#' \describe{ #' \item{BaseCellMeans}{The expression of genes in each cell adjusted for
#' \item{BaseCellMeans}{The expression of genes in each cell adjusted for #' expected library size.}
#' expected library size.} #' \item{BCV}{The Biological Coefficient of Variation for each gene in
#' \item{BCV}{The Biological Coefficient of Variation for each gene in #' each cell.}
#' each cell.} #' \item{CellMeans}{The expression level of genes in each cell adjusted
#' \item{CellMeans}{The expression level of genes in each cell adjusted #' for BCV.}
#' for BCV.} #' \item{TrueCounts}{The simulated counts before dropout.}
#' \item{TrueCounts}{The simulated counts before dropout.} #' \item{Dropout}{Logical matrix showing which values have been dropped
#' \item{Dropout}{Logical matrix showing which values have been dropped #' in which cells.}
#' in which cells.} #' }
#' } #' }
#' }
#' } #' }
#' #'
#' Values that have been added by Splatter are named using \code{CamelCase} in #' Values that have been added by Splatter are named using \code{CamelCase} in
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#' @param x value to apply the function to. #' @param x value to apply the function to.
#' @param x0 midpoint parameter. Gives the centre of the function. #' @param x0 midpoint parameter. Gives the centre of the function.
#' @param k shape parameter. Gives the slope of the function. #' @param k shape parameter. Gives the slope of the function.
#'
#' @return Value of logistic funciton with given parameters
logistic <- function(x, x0, k) { logistic <- function(x, x0, k) {
1 / (1 + exp(-k * (x - x0))) 1 / (1 + exp(-k * (x - x0)))
} }
......
...@@ -14,41 +14,43 @@ S4 class that holds parameters for the Lun simulation. ...@@ -14,41 +14,43 @@ S4 class that holds parameters for the Lun simulation.
The Lun2 simulation uses the following parameters: The Lun2 simulation uses the following parameters:
\describe{ \describe{
\item{\code{nGenes}}{The number of genes to simulate.} \item{\code{nGenes}}{The number of genes to simulate.}
\item{\code{nCells}}{The number of cells to simulate.} \item{\code{nCells}}{The number of cells to simulate.}
\item{\code{[seed]}}{Seed to use for generating random numbers.} \item{\code{[seed]}}{Seed to use for generating random numbers.}
\item{\code{[nPlates]}}{The number of plates to simulate.} \item{\code{[nPlates]}}{The number of plates to simulate.}
\item{\emph{Plate parameters}}{ \item{\emph{Plate parameters}}{
\describe{ \describe{
\item{\code{plate.ingroup}}{Character vecotor giving the plates \item{\code{plate.ingroup}}{Character vecotor giving the plates
considered to be part of the "ingroup".} considered to be part of the "ingroup".}
\item{\code{plate.mod}}{Plate effect modifier factor. The plate effect \item{\code{plate.mod}}{Plate effect modifier factor. The plate
variance is divided by this value.} effect variance is divided by this value.}
\item{\code{plate.var}}{Plate effect variance.} \item{\code{plate.var}}{Plate effect variance.}
}
} }
} \item{\emph{Gene parameters}}{
\item{\emph{Gene parameters}}{ \describe{
\describe{ \item{\code{gene.means}}{Mean expression for each gene.}
\item{\code{gene.means}}{Mean expression for each gene.} \item{\code{gene.disps}}{Dispersion for each gene.}
\item{\code{gene.disps}}{Dispersion for each gene.} \item{\code{gene.ziMeans}}{Zero-inflated gene means.}
\item{\code{gene.ziMeans}}{Zero-inflated gene means.} \item{\code{gene.ziDisps}}{Zero-inflated gene dispersions.}
\item{\code{gene.ziDisps}}{Zero-inflated gene dispersions.} \item{\code{gene.ziProps}}{Zero-inflated gene zero proportions.}
\item{\code{gene.ziProps}}{Zero-inflated gene zero proportions.} }
} }
} \item{\emph{Cell parameters}}{
\item{\emph{Cell parameters}}{ \describe{
\describe{ \item{\code{cell.plates}}{Factor giving the plate that each cell
\item{\code{cell.plates}}{Factor giving the plate that each cell comes comes from.}
from.} \item{\code{cell.libSizes}}{Library size for each cell.}
\item{\code{cell.libSizes}}{Library size for each cell.} \item{\code{cell.libMod}}{Modifier factor for library sizes.
\item{\code{cell.libMod}}{Modifier factor for library sizes. The library sizes are multiplied by this value.}
The library sizes are multiplied by this value.} }
} }
} \item{\emph{Differential expression parameters}}{
\item{\emph{Differential expression parameters}}{ \describe{
\describe{ \item{\code{de.nGenes}}{Number of differentially expressed
\item{\code{de.nGenes}}{Number of differentially expressed genes.} genes.}
\item{\code{de.fc}}{Fold change for differentially expressed genes.} \item{\code{de.fc}}{Fold change for differentially expressed
genes.}
} }
} }
} }
......
...@@ -14,34 +14,35 @@ S4 class that holds parameters for the Lun simulation. ...@@ -14,34 +14,35 @@ S4 class that holds parameters for the Lun simulation.
The Lun simulation uses the following parameters: The Lun simulation uses the following parameters:
\describe{ \describe{
\item{\code{nGenes}}{The number of genes to simulate.} \item{\code{nGenes}}{The number of genes to simulate.}
\item{\code{nCells}}{The number of cells to simulate.} \item{\code{nCells}}{The number of cells to simulate.}
\item{\code{[nGroups]}}{The number of groups to simulate.} \item{\code{[nGroups]}}{The number of groups to simulate.}
\item{\code{[groupCells]}}{Vector giving the number of cells in each \item{\code{[groupCells]}}{Vector giving the number of cells in each
simulation group/path.} simulation group/path.}
\item{\code{[seed]}}{Seed to use for generating random numbers.} \item{\code{[seed]}}{Seed to use for generating random numbers.}
\item{\emph{Mean parameters}}{ \item{\emph{Mean parameters}}{
\describe{ \describe{
\item{\code{[mean.shape]}}{Shape parameter for the mean gamma \item{\code{[mean.shape]}}{Shape parameter for the mean gamma
distribution.} distribution.}
\item{\code{[mean.rate]}}{Rate parameter for the mean gamma \item{\code{[mean.rate]}}{Rate parameter for the mean gamma
distribution.} distribution.}
}
} }
} \item{\emph{Counts parameters}}{
\item{\emph{Counts parameters}}{ \describe{
\describe{ \item{\code{[count.disp]}}{The dispersion parameter for the
\item{\code{[count.disp]}}{The dispersion parameter for the counts counts negative binomial distribution.}
negative binomial distribution.} }
} }
} \item{\emph{Differential expression parameters}}{
\item{\emph{Differential expression parameters}}{ \describe{
\describe{ \item{\code{[de.nGenes]}}{The number of genes that are
\item{\code{[de.nGenes]}}{The number of genes that are differentially differentially expressed in each group}
expressed in each group} \item{\code{[de.upProp]}}{The proportion of differentially
\item{\code{[de.upProp]}}{The proportion of differentially expressed expressed genes that are up-regulated in each group}
genes that are up-regulated in each group} \item{\code{[de.upFC]}}{The fold change for up-regulated genes}
\item{\code{[de.upFC]}}{The fold change for up-regulated genes} \item{\code{[de.downFC]}}{The fold change for down-regulated
\item{\code{[de.downFC]}}{The fold change for down-regulated genes} genes}
} }
} }
} }
......
...@@ -14,9 +14,9 @@ Virtual S4 class that all other Params classes inherit from. ...@@ -14,9 +14,9 @@ Virtual S4 class that all other Params classes inherit from.
The Params class defines the following parameters: The Params class defines the following parameters:
\describe{ \describe{
\item{\code{[nGenes]}}{The number of genes to simulate.} \item{\code{[nGenes]}}{The number of genes to simulate.}
\item{\code{[nCells]}}{The number of cells to simulate.} \item{\code{[nCells]}}{The number of cells to simulate.}
\item{\code{seed}}{Seed to use for generating random numbers.} \item{\code{seed}}{Seed to use for generating random numbers.}
} }
The parameters shown in brackets can be estimated from real data. The parameters shown in brackets can be estimated from real data.
......
...@@ -14,20 +14,20 @@ S4 class that holds parameters for the scDD simulation. ...@@ -14,20 +14,20 @@ S4 class that holds parameters for the scDD simulation.
The SCDD simulation uses the following parameters: The SCDD simulation uses the following parameters:
\describe{ \describe{
\item{\code{[nGenes]}}{The number of genes to simulate (not used).} \item{\code{[nGenes]}}{The number of genes to simulate (not used).}
\item{\code{nCells}}{The number of cells to simulate in each condition.} \item{\code{nCells}}{The number of cells to simulate in each condition.}
\item{\code{[seed]}}{Seed to use for generating random numbers.} \item{\code{[seed]}}{Seed to use for generating random numbers.}
\item{\code{SCdat}}{\code{\link{ExpressionSet}} containing real data.} \item{\code{SCdat}}{\code{\link{ExpressionSet}} containing real data.}
\item{\code{[nDE]}}{Number of DE genes to simulate.} \item{\code{[nDE]}}{Number of DE genes to simulate.}
\item{\code{[nDP]}}{Number of DP genes to simulate.} \item{\code{[nDP]}}{Number of DP genes to simulate.}
\item{\code{[nDM]}}{Number of DM genes to simulate.} \item{\code{[nDM]}}{Number of DM genes to simulate.}
\item{\code{[nDB]}}{Number of DB genes to simulate.} \item{\code{[nDB]}}{Number of DB genes to simulate.}
\item{\code{[nEE]}}{Number of EE genes to simulate.} \item{\code{[nEE]}}{Number of EE genes to simulate.}
\item{\code{[nEP]}}{Number of EP genes to simulate.} \item{\code{[nEP]}}{Number of EP genes to simulate.}
\item{\code{[sd.range]}}{Interval for fold change standard deviations.} \item{\code{[sd.range]}}{Interval for fold change standard deviations.}
\item{\code{[modeFC]}}{Values for DP, DM and DB mode fold changes.} \item{\code{[modeFC]}}{Values for DP, DM and DB mode fold changes.}
\item{\code{[varInflation}]}{Variance inflation factors for each \item{\code{[varInflation}]}{Variance inflation factors for each
condition.} condition.}
} }
The parameters not shown in brackets can be estimated from real data using The parameters not shown in brackets can be estimated from real data using
......
...@@ -14,15 +14,15 @@ S4 class that holds parameters for the simple simulation. ...@@ -14,15 +14,15 @@ S4 class that holds parameters for the simple simulation.
The simple simulation uses the following parameters: The simple simulation uses the following parameters:
\describe{ \describe{
\item{\code{nGenes}}{The number of genes to simulate.} \item{\code{nGenes}}{The number of genes to simulate.}
\item{\code{nCells}}{The number of cells to simulate.} \item{\code{nCells}}{The number of cells to simulate.}
\item{\code{[seed]}}{Seed to use for generating random numbers.} \item{\code{[seed]}}{Seed to use for generating random numbers.}
\item{\code{mean.shape}}{The shape parameter for the mean gamma \item{\code{mean.shape}}{The shape parameter for the mean gamma
distribution.} distribution.}
\item{\code{mean.rate}}{The rate parameter for the mean gamma \item{\code{mean.rate}}{The rate parameter for the mean gamma
distribution.} distribution.}
\item{\code{[count.disp]}}{The dispersion parameter for the counts negative \item{\code{[count.disp]}}{The dispersion parameter for the counts
binomial distribution.} negative binomial distribution.}
} }
The parameters not shown in brackets can be estimated from real data using The parameters not shown in brackets can be estimated from real data using
......
...@@ -14,93 +14,97 @@ S4 class that holds parameters for the Splatter simulation. ...@@ -14,93 +14,97 @@ S4 class that holds parameters for the Splatter simulation.
The Splatter simulation requires the following parameters: The Splatter simulation requires the following parameters:
\describe{ \describe{
\item{\code{nGenes}}{The number of genes to simulate.} \item{\code{nGenes}}{The number of genes to simulate.}
\item{\code{nCells}}{The number of cells to simulate.} \item{\code{nCells}}{The number of cells to simulate.}
\item{\code{[nGroups]}}{The number of groups or paths to simulate.} \item{\code{[nGroups]}}{The number of groups or paths to simulate.}
\item{\code{[groupCells]}}{Vector giving the number of cells in each \item{\code{[groupCells]}}{Vector giving the number of cells in each
simulation group/path.} simulation group/path.}
\item{\code{[seed]}}{Seed to use for generating random numbers.} \item{\code{[seed]}}{Seed to use for generating random numbers.}
\item{\emph{Mean parameters}}{ \item{\emph{Mean parameters}}{
\describe{ \describe{
\item{\code{mean.shape}}{Shape parameter for the mean gamma \item{\code{mean.shape}}{Shape parameter for the mean gamma
distribution.} distribution.}
\item{\code{mean.rate}}{Rate parameter for the mean gamma \item{\code{mean.rate}}{Rate parameter for the mean gamma
distribution.} distribution.}
}
} }
} \item{\emph{Library size parameters}}{
\item{\emph{Library size parameters}}{ \describe{
\describe{ \item{\code{lib.loc}}{Location (meanlog) parameter for the
\item{\code{lib.loc}}{Location (meanlog) parameter for the library library size log-normal distribution.}
size log-normal distribution.} \item{\code{lib.scale}}{Scale (sdlog) parameter for the library
\item{\code{lib.scale}}{Scale (sdlog) parameter for the library size size log-normal distribution.}
log-normal distribution.} }
} }
} \item{\emph{Expression outlier parameters}}{
\item{\emph{Expression outlier parameters}}{ \describe{
\describe{ \item{\code{out.prob}}{Probability that a gene is an expression
\item{\code{out.prob}}{Probability that a gene is an expression outlier.}
outlier.} \item{\code{out.loProb}}{Probability that an expression outlier
\item{\code{out.loProb}}{Probability that an expression outlier gene gene is lowly expressed.}
is lowly expressed.} \item{\code{out.facLoc}}{Location (meanlog) parameter for the
\item{\code{out.facLoc}}{Location (meanlog) parameter for the expression outlier factor log-normal distribution.}
expression outlier factor log-normal distribution.} \item{\code{out.facScale}}{Scale (sdlog) parameter for the
\item{\code{out.facScale}}{Scale (sdlog) parameter for the expression expression outlier factor log-normal distribution.}
outlier factor log-normal distribution.} }
} }
} \item{\emph{Differential expression parameters}}{
\item{\emph{Differential expression parameters}}{ \describe{
\describe{ \item{\code{[de.prob]}}{Probability that a gene is differentially
\item{\code{[de.prob]}}{Probability that a gene is differentially expressed in a group. Can be a vector.}
expressed in a group. Can be a vector.} \item{\code{[de.loProb]}}{Probability that a differentially
\item{\code{[de.loProb]}}{Probability that a differentially expressed expressed gene is down-regulated. Can be a vector.}
gene is down-regulated. Can be a vector.} \item{\code{[de.facLoc]}}{Location (meanlog) parameter for the
\item{\code{[de.facLoc]}}{Location (meanlog) parameter for the differential expression factor log-normal distribution. Can be a
differential expression factor log-normal distribution. Can be a vector.}
vector.} \item{\code{[de.facScale]}}{Scale (sdlog) parameter for the
\item{\code{[de.facScale]}}{Scale (sdlog) parameter for the differential expression factor log-normal distribution. Can be a
differential expression factor log-normal distribution. Can be a vector.}
vector.} }
} }
} \item{\emph{Biological Coefficient of Variation parameters}}{
\item{\emph{Biological Coefficient of Variation parameters}}{ \describe{
\describe{ \item{\code{bcv.common}}{Underlying common dispersion across all
\item{\code{bcv.common}}{Underlying common dispersion across all genes.}
genes.} \item{\code{bcv.df}}{Degrees of Freedom for the BCV inverse
\item{\code{bcv.df}}{Degrees of Freedom for the BCV inverse chi-squared chi-squared distribution.}
distribution.} }
} }
} \item{\emph{Dropout parameters}}{
\item{\emph{Dropout parameters}}{ \describe{
\describe{ \item{\code{dropout.present}}{Logical. Whether to simulate
\item{\code{dropout.present}}{Logical. Whether to simulate dropout.} dropout.}
\item{\code{dropout.mid}}{Midpoint parameter for the dropout logistic \item{\code{dropout.mid}}{Midpoint parameter for the dropout
function.} logistic function.}
\item{\code{dropout.shape}}{Shape parameter for the dropout logistic \item{\code{dropout.shape}}{Shape parameter for the dropout
function.} logistic function.}
}
} }
} \item{\emph{Differentiation path parameters}}{
\item{\emph{Differentiation path parameters}}{ \describe{
\describe{ \item{\code{[path.from]}}{Vector giving the originating point of
\item{\code{[path.from]}}{Vector giving the originating point of each each path. This allows path structure such as a cell type which
path. This allows path structure such as a cell type which differentiates into an intermediate cell type that then
differentiates into an intermediate cell type that then differentiates differentiates into two mature cell types. A path structure of
into two mature cell types. A path structure of this form would have a this form would have a "from" parameter of c(0, 1, 1) (where 0 is
"from" parameter of c(0, 1, 1) (where 0 is the origin). If no vector is the origin). If no vector is given all paths will start at the
given all paths will start at the origin.} origin.}
\item{\code{[path.length]}}{Vector giving the number of steps to \item{\code{[path.length]}}{Vector giving the number of steps to
simulate along each path. If a single value is given it will be applied simulate along each path. If a single value is given it will be
to all paths.} applied to all paths.}
\item{\code{[path.skew]}}{Vector giving the skew of each path. Values \item{\code{[path.skew]}}{Vector giving the skew of each path.
closer to 1 will give more cells towards the starting population, Values closer to 1 will give more cells towards the starting
values closer to 0 will give more cells towards the final population. population, values closer to 0 will give more cells towards the
If a single value is given it will be applied to all paths.} final population. If a single value is given it will be applied
\item{\code{[path.nonlinearProb]}}{Probability that a gene follows a to all paths.}
non-linear path along the differentiation path. This allows more \item{\code{[path.nonlinearProb]}}{Probability that a gene
complex gene patterns such as a gene being equally expressed at the follows a non-linear path along the differentiation path. This
beginning an end of a path but lowly expressed in the middle.} allows more complex gene patterns such as a gene being equally
\item{\code{[path.sigmaFac]}}{Sigma factor for non-linear gene paths. expressed at the beginning an end of a path but lowly expressed
A higher value will result in more extreme non-linear variations along in the middle.}
a path.} \item{\code{[path.sigmaFac]}}{Sigma factor for non-linear gene
paths. A higher value will result in more extreme non-linear
variations along a path.}
} }
} }
} }
......
...@@ -20,19 +20,21 @@ comparing. ...@@ -20,19 +20,21 @@ comparing.
The return list has three items: The return list has three items:
\describe{ \describe{
\item{\code{FeatureData}}{Combined feature data from the provided SCESets.} \item{\code{FeatureData}}{Combined feature data from the provided
\item{\code{PhenoData}}{Combined pheno data from the provided SCESets.} SCESets.}
\item{\code{Plots}}{Comparison plots \item{\code{PhenoData}}{Combined pheno data from the provided SCESets.}
\describe{ \item{\code{Plots}}{Comparison plots
\item{\code{Means}}{Violin plot of mean distribution.} \describe{
\item{\code{Variances}}{Violin plot of variance distribution.} \item{\code{Means}}{Violin plot of mean distribution.}
\item{\code{MeanVar}}{Scatter plot with fitted lines showing the \item{\code{Variances}}{Violin plot of variance distribution.}
mean-variance relationship.} \item{\code{MeanVar}}{Scatter plot with fitted lines showing the
\item{\code{LibraySizes}}{Boxplot of the library size distribution.} mean-variance relationship.}
\item{\code{ZerosGene}}{Boxplot of the percentage of each gene that is \item{\code{LibraySizes}}{Boxplot of the library size
zero.} distribution.}
\item{\code{ZerosCell}}{Boxplot of the percentage of each cell that is \item{\code{ZerosGene}}{Boxplot of the percentage of each gene
zero.} that is zero.}
\item{\code{ZerosCell}}{Boxplot of the percentage of each cell
that is zero.}
} }
} }
} }
......
...@@ -21,4 +21,9 @@ The extracted parameter value ...@@ -21,4 +21,9 @@ The extracted parameter value
\description{ \description{
Accessor function for getting parameter values. Accessor function for getting parameter values.
} }
\examples{
params <- newSimpleParams()
getParam(params, "nGenes")
}
...@@ -13,6 +13,9 @@ logistic(x, x0, k) ...@@ -13,6 +13,9 @@ logistic(x, x0, k)
\item{k}{shape parameter. Gives the slope of the function.} \item{k}{shape parameter. Gives the slope of the function.}
} }
\value{
Value of logistic funciton with given parameters
}
\description{ \description{
Implementation of the logistic function Implementation of the logistic function
} }
......
...@@ -35,4 +35,9 @@ Object with new parameter value. ...@@ -35,4 +35,9 @@ Object with new parameter value.
\description{ \description{
Function for setting parameter values. Function for setting parameter values.
} }
\examples{
params <- newSimpleParams()
setParam(params, "nGenes", 100)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment