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

Run checks

parent c59cb0f6
No related branches found
No related tags found
No related merge requests found
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
#' #'
#' @return List containing the combined datasets and plots. #' @return List containing the combined datasets and plots.
#' @examples #' @examples
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2)) #' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2))
#' names(comparison) #' names(comparison)
...@@ -249,7 +249,7 @@ compareSCESets <- function(sces, point.size = 0.1, point.alpha = 0.1, ...@@ -249,7 +249,7 @@ compareSCESets <- function(sces, point.size = 0.1, point.alpha = 0.1,
#' #'
#' @return List containing the combined datasets and plots. #' @return List containing the combined datasets and plots.
#' @examples #' @examples
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") #' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
#' names(difference) #' names(difference)
...@@ -521,7 +521,7 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1, ...@@ -521,7 +521,7 @@ diffSCESets <- function(sces, ref, point.size = 0.1, point.alpha = 0.1,
#' #'
#' @examples #' @examples
#' \dontrun{ #' \dontrun{
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2)) #' comparison <- compareSCESets(list(Splat = sim1, Simple = sim2))
#' panel <- makeCompPanel(comparison) #' panel <- makeCompPanel(comparison)
...@@ -605,7 +605,7 @@ makeCompPanel <- function(comp, title = "Comparison", ...@@ -605,7 +605,7 @@ makeCompPanel <- function(comp, title = "Comparison",
#' #'
#' @examples #' @examples
#' \dontrun{ #' \dontrun{
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") #' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
#' panel <- makeDiffPanel(difference) #' panel <- makeDiffPanel(difference)
...@@ -697,7 +697,7 @@ makeDiffPanel <- function(diff, title = "Difference comparison", ...@@ -697,7 +697,7 @@ makeDiffPanel <- function(diff, title = "Difference comparison",
#' #'
#' @examples #' @examples
#' \dontrun{ #' \dontrun{
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' comparison <- compSCESets(list(Splat = sim1, Simple = sim2)) #' comparison <- compSCESets(list(Splat = sim1, Simple = sim2))
#' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") #' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
...@@ -798,7 +798,7 @@ makeOverallPanel <- function(comp, diff, title = "Overall comparison", ...@@ -798,7 +798,7 @@ makeOverallPanel <- function(comp, diff, title = "Overall comparison",
#' #'
#' @return List with MADs, ranks and both combined in long format #' @return List with MADs, ranks and both combined in long format
#' @examples #' @examples
#' sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) #' sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
#' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) #' sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
#' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") #' difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
#' summary <- summariseDiff(difference) #' summary <- summariseDiff(difference)
......
...@@ -57,7 +57,7 @@ and should be in the correct format to allow you to create further plots ...@@ -57,7 +57,7 @@ and should be in the correct format to allow you to create further plots
using \code{\link[ggplot2]{ggplot}}. using \code{\link[ggplot2]{ggplot}}.
} }
\examples{ \examples{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
comparison <- compareSCESets(list(Splat = sim1, Simple = sim2)) comparison <- compareSCESets(list(Splat = sim1, Simple = sim2))
names(comparison) names(comparison)
......
...@@ -77,7 +77,7 @@ and should be in the correct format to allow you to create further plots ...@@ -77,7 +77,7 @@ and should be in the correct format to allow you to create further plots
using \code{\link[ggplot2]{ggplot}}. using \code{\link[ggplot2]{ggplot}}.
} }
\examples{ \examples{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
names(difference) names(difference)
......
...@@ -23,7 +23,7 @@ Combine the plots from \code{compareSCESets} into a single panel. ...@@ -23,7 +23,7 @@ Combine the plots from \code{compareSCESets} into a single panel.
} }
\examples{ \examples{
\dontrun{ \dontrun{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
comparison <- compareSCESets(list(Splat = sim1, Simple = sim2)) comparison <- compareSCESets(list(Splat = sim1, Simple = sim2))
panel <- makeCompPanel(comparison) panel <- makeCompPanel(comparison)
......
...@@ -23,7 +23,7 @@ Combine the plots from \code{diffSCESets} into a single panel. ...@@ -23,7 +23,7 @@ Combine the plots from \code{diffSCESets} into a single panel.
} }
\examples{ \examples{
\dontrun{ \dontrun{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
panel <- makeDiffPanel(difference) panel <- makeDiffPanel(difference)
......
...@@ -27,7 +27,7 @@ single panel. ...@@ -27,7 +27,7 @@ single panel.
} }
\examples{ \examples{
\dontrun{ \dontrun{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
comparison <- compSCESets(list(Splat = sim1, Simple = sim2)) comparison <- compSCESets(list(Splat = sim1, Simple = sim2))
difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
......
...@@ -18,7 +18,7 @@ properties are sorted, differences calculated, the Median Absolute Deviation ...@@ -18,7 +18,7 @@ properties are sorted, differences calculated, the Median Absolute Deviation
taken as the summary statistic and the ranks calculated. taken as the summary statistic and the ranks calculated.
} }
\examples{ \examples{
sim1 <- splatSimulate(nGenes = 1000, groupCells = 20) sim1 <- splatSimulate(nGenes = 1000, batchCells = 20)
sim2 <- simpleSimulate(nGenes = 1000, nCells = 20) sim2 <- simpleSimulate(nGenes = 1000, nCells = 20)
difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple") difference <- diffSCESets(list(Splat = sim1, Simple = sim2), ref = "Simple")
summary <- summariseDiff(difference) summary <- summariseDiff(difference)
......
...@@ -21,7 +21,7 @@ test_that("path.from checks work", { ...@@ -21,7 +21,7 @@ test_that("path.from checks work", {
expect_silent(validObject(params)) expect_silent(validObject(params))
params <- setParamUnchecked(params, "path.from", c(0, 3)) params <- setParamUnchecked(params, "path.from", c(0, 3))
expect_error(validObject(params), expect_error(validObject(params),
paste('invalid class SplatParams object: path.from:', paste('invalid class "SplatParams" object: path.from:',
"All elements must be <= 2")) "All elements must be <= 2"))
params <- setParamUnchecked(params, "path.from", c(1, 0)) params <- setParamUnchecked(params, "path.from", c(1, 0))
expect_error(validObject(params), "path cannot begin at itself") expect_error(validObject(params), "path cannot begin at itself")
......
context("Splatter simulations") context("Splatter simulations")
test.params <- newSplatParams(nGenes = 100, groupCells = c(5, 5), lib.scale = 0) test.params <- newSplatParams(nGenes = 100, batchCells = c(5, 5),
group.prob = c(0.5, 0.5), lib.scale = 0)
test_that("splatSimulate output is valid", { test_that("splatSimulate output is valid", {
expect_true(validObject(splatSimulate(test.params, method = "single"))) expect_true(validObject(splatSimulate(test.params, method = "single")))
...@@ -10,10 +11,10 @@ test_that("splatSimulate output is valid", { ...@@ -10,10 +11,10 @@ test_that("splatSimulate output is valid", {
test_that("one group switches to single mode", { test_that("one group switches to single mode", {
expect_warning(splatSimulate(test.params, method = "groups", expect_warning(splatSimulate(test.params, method = "groups",
groupCells = c(10)), group.prob = c(1)),
"nGroups is 1, switching to single mode") "nGroups is 1, switching to single mode")
expect_silent(splatSimulate(test.params, method = "paths", expect_silent(splatSimulate(test.params, method = "paths",
groupCells = c(10), verbose = FALSE)) group.prob = c(1), verbose = FALSE))
}) })
test_that("infinite bcv.df is detected", { test_that("infinite bcv.df is detected", {
......
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