Newer
Older
#' List simulations
#'
#' List all the simulations that are currently available in Splatter with a
#' brief description.
#'
#' @param print logical. Whether to print to the console.
#'
#' @return Invisibly returns a data.frame containing the information that is
#' displayed.
#' @examples
#' listSims()
#' @export
listSims <- function(print = TRUE) {
sims <- list(c("Splat", "splat", "", "",
"The Splat simulation generates means from a gamma
distribution, adjusts them for BCV and generates counts from
a gamma-poisson. Dropout can be optionally added."),
c("Splat Single", "splatSingle", "", "",
"The Splat simulation with a single population."),
c("Splat Groups", "splatGroups", "", "",
"The Splat simulation with multiple groups. Each group can
have it's own differential expression probability and
fold change distribution."),
c("Splat Paths", "splatPaths", "", "",
"The Splat simulation with differentiation paths. Each
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
path can have it's own length, skew and probability. Genes
can change in non-linear ways."),
c("Simple", "simple", "", "",
"A simple simulation with gamma means and negative binomial
counts."),
c("Lun", "lun", "10.1186/s13059-016-0947-7",
"MarioniLab/Deconvolution2016",
"Gamma distributed means and negative binomial counts. Cells
are given a size factor and differential expression can be
simulated with fixed fold changes."),
c("Lun 2", "lun2", "10.1101/073973",
"MarioniLab/PlateEffects2016",
"Negative binomial counts where the means and dispersions
have been sampled from a real dataset. The core feature of
the Lun 2 simulation is the addition of plate effects.
Differential expression can be added between two groups of
plates and optionally a zero-inflated negative-binomial can
be used."),
c("scDD", "scDD", "10.1101/035501", "kdkorthauer/scDD",
"The scDD simulation samples a given dataset and can
simulate differentially expressed and differentially
distributed genes between two conditions."))
sims.table <- data.frame(Name = rep(NA, length(sims)),
Prefix = rep(NA, length(sims)),
DOI = rep(NA, length(sims)),
Github = rep(NA, length(sims)),
Description = rep(NA, length(sims)))
for (idx in 1:length(sims)) {
entry <- sims[[idx]]
entry[5] <- gsub("[[:space:]]+", " ", entry[5])
sims.table[idx, ] <- entry
}
if (print) {
cat("Splatter currently contains", length(sims), "simulations", "\n\n")
for (idx in 1:nrow(sims.table)) {
sim <- as.character(sims.table[idx, ])
cat(sim[1], paste0("(", sim[2], ")"), "\n")
cat("DOI:", sim[3], "\t", "Github:", sim[4], "\n")
cat(sim[5], "\n\n")
}
}
invisible(sims.table)
}