From bce9b2ceda93c31863a613a6681ac87ab2fa353c Mon Sep 17 00:00:00 2001
From: Luke Zappia <lazappi@users.noreply.github.com>
Date: Wed, 13 Sep 2017 13:58:56 +1000
Subject: [PATCH] Run checks

---
 .Rbuildignore        |  1 +
 DESCRIPTION          | 41 +++++++++++++++++++++--------------------
 R/lun2-simulate.R    |  2 +-
 R/splat-simulate.R   |  6 +++---
 man/splatSimulate.Rd |  2 +-
 5 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/.Rbuildignore b/.Rbuildignore
index a087f76..5c7dbad 100644
--- a/.Rbuildignore
+++ b/.Rbuildignore
@@ -6,5 +6,6 @@
 ^NEWS\.md$
 ^\.git*
 ^docs$
+^index\.md$
 ^_pkgdown\.yml$
 ^pkgdown$
diff --git a/DESCRIPTION b/DESCRIPTION
index 304ab01..bd992ad 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -21,36 +21,37 @@ License: GPL-3 + file LICENSE
 LazyData: TRUE
 Depends:
     R (>= 3.4),
-    scater
+    scater,
+    SingleCellExperiment
 Imports:
-    fitdistrplus,
-    edgeR,
-    stats,
-    locfit,
     akima,
-    Biobase,
+    BiocGenerics,
+    BiocParallel,
     checkmate,
-    methods,
-    utils,
-    matrixStats,
+    edgeR,
+    fitdistrplus,
     ggplot2,
+    locfit,
+    matrixStats,
+    methods,
     scales,
-    BiocParallel,
-    SummarizedExperiment
+    stats,
+    SummarizedExperiment,
+    utils
 Suggests:
-    testthat,
-    scran,
-    progress,
+    BiocStyle,
+    covr,
+    cowplot,
+    knitr,
+    limSolve,
     lme4,
+    progress,
     pscl,
-    scDD,
-    knitr,
+    testthat,
     rmarkdown,
-    BiocStyle,
-    covr,
     S4Vectors,
-    cowplot,
-    limSolve
+    scDD,
+    scran
 biocViews: SingleCell, RNASeq, Transcriptomics, GeneExpression, Sequencing,
     Software
 URL: https://github.com/Oshlack/splatter
diff --git a/R/lun2-simulate.R b/R/lun2-simulate.R
index 21e3cdb..35329de 100644
--- a/R/lun2-simulate.R
+++ b/R/lun2-simulate.R
@@ -137,7 +137,7 @@ lun2Simulate <- function(params = newLun2Params(), zinb = FALSE,
         plate.means[, ingroup] <- plate.means[, ingroup] * de.facs
         plate.means[, -ingroup] <- plate.means[, -ingroup] * (1 / de.facs)
 
-        phenos$Ingroup <- cell.plates %in% plate.ingroup
+        cells$Ingroup <- cell.plates %in% plate.ingroup
         features$DEFacIngroup <- de.facs
         features$DEFacOutgroup <- 1 / de.facs
         for (idx in seq_len(nPlates)) {
diff --git a/R/splat-simulate.R b/R/splat-simulate.R
index 6684d23..98dd989 100644
--- a/R/splat-simulate.R
+++ b/R/splat-simulate.R
@@ -100,8 +100,8 @@
 #'
 #' @examples
 #' # Simulation with default parameters
-#' \dontrun{
 #' sim <- splatSimulate()
+#' \dontrun{
 #' # Simulation with different number of genes
 #' sim <- splatSimulate(nGenes = 1000)
 #' # Simulation with custom parameters
@@ -699,7 +699,7 @@ splatSimDropout <- function(sim, params) {
         nGenes <- getParam(params, "nGenes")
         dropout.mid <- getParam(params, "dropout.mid")
         dropout.shape <- getParam(params, "dropout.shape")
-        cell.means <- get_exprs(sim, "CellMeans")
+        cell.means <- assays(sim)$CellMeans
 
         # Generate probabilites based on expression
         drop.prob <- sapply(seq_len(nCells), function(idx) {
@@ -724,7 +724,7 @@ splatSimDropout <- function(sim, params) {
         counts <- true.counts
     }
 
-    counts(sim) <- counts
+    BiocGenerics::counts(sim) <- counts
 
     return(sim)
 }
diff --git a/man/splatSimulate.Rd b/man/splatSimulate.Rd
index 0db1f72..1b06a3f 100644
--- a/man/splatSimulate.Rd
+++ b/man/splatSimulate.Rd
@@ -115,8 +115,8 @@ which typically use \code{underscore_naming}.
 }
 \examples{
 # Simulation with default parameters
-\dontrun{
 sim <- splatSimulate()
+\dontrun{
 # Simulation with different number of genes
 sim <- splatSimulate(nGenes = 1000)
 # Simulation with custom parameters
-- 
GitLab