From daf194c89ddea1b917bcb93dc49bcbb310d446c5 Mon Sep 17 00:00:00 2001 From: "Ian Buller, PhD, MA" Date: Thu, 29 Oct 2020 14:50:01 -0400 Subject: [PATCH] Preparing gateR 0.1.1 for submission gateR 0.1.0 did not pass the incoming CRAN checks automatically Flavor: r-devel-windows-ix86+x86_64 Check: Overall checktime, Result: NOTE Overall checktime 16 min > 10 min Flavor: r-devel-linux-x86_64-debian-gcc Check: CRAN incoming feasibility, Result: NOTE Maintainer: 'Ian D. Buller ' New submission Possibly mis-spelled words in DESCRIPTION: Bithell (38:63, 40:24) Cytometry (3:57) al (37:57) et (37:54) immunologically (32:19) ------ The mis-spelled words can be safely ignored. However, reduced the checktime by streamlining the examples and testthat Changed example in gating() by changing from \donttest{} to if (interactive()) {} Streamlined the number of "[it] works" tests in testthat for gating(), lotrrs(), and rrs() Updated cran-comments.md for CRAN resubmission Added CRAN-RELEASE to .Rbuildignore --- .Rbuildignore | 1 + DESCRIPTION | 4 +- R/gating.R | 4 +- R/lotrrs.R | 2 +- R/rrs.R | 2 +- cran-comments.md | 14 ++++- dev/build.R | 2 +- man/gating.Rd | 2 +- tests/testthat/test-gating.R | 110 +++++++++++++++++------------------ tests/testthat/test-lotrrs.R | 21 ++++--- tests/testthat/test-rrs.R | 20 +++---- 11 files changed, 97 insertions(+), 85 deletions(-) diff --git a/.Rbuildignore b/.Rbuildignore index cdd3c86..38a7273 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -4,3 +4,4 @@ ^cran-comments\.md$ ^vignette\.Rmd$ ^dev$ +^CRAN-RELEASE$ diff --git a/DESCRIPTION b/DESCRIPTION index 24ecf65..61faef7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: gateR Type: Package Title: Statistical Gating Application for Flow and Mass Cytometry Analysis via Spatial Kernel Density Estimation -Version: 0.1.0 -Date: 2020-10-28 +Version: 0.1.1 +Date: 2020-10-29 Authors@R: c(person(given = "Ian D.", family = "Buller", diff --git a/R/gating.R b/R/gating.R index ccd41e5..76c94b1 100644 --- a/R/gating.R +++ b/R/gating.R @@ -55,7 +55,7 @@ #' @export #' #' @examples -#' \donttest{ +#' if (interactive()) { #' # Use 'extdata' from the {flowWorkspaceData} package #' flowDataPath <- system.file("extdata", package = "flowWorkspaceData") #' fcsFiles <- list.files(pattern = "CytoTrol", flowDataPath, full = TRUE) @@ -63,7 +63,7 @@ #' fr1 <- ncfs[[1]] #' fr2 <- ncfs[[2]] #' -#' ## Comparison of two samples (single condition) "g1" +#' # Comparison of two samples (single condition) "g1" #' ## Two gates (four markers) "CD4", "CD38", "CD8", and "CD3" #' ## Log10 Transformation for both markers #' ## Remove cells with NA and Inf values diff --git a/R/lotrrs.R b/R/lotrrs.R index 1bf92b4..bb8b424 100644 --- a/R/lotrrs.R +++ b/R/lotrrs.R @@ -52,7 +52,7 @@ #' fr1 <- ncfs[[1]] #' fr2 <- ncfs[[2]] #' -#' ## Comparison of two samples at two time points (two conditions) "g1" and "g2" +#' # Comparison of two samples at two time points (two conditions) "g1" and "g2" #' ## (Create a random binary variable for "g2") #' ## One gate (two markers) "CD4", "CD38" #' ## Log10 Transformation for both markers diff --git a/R/rrs.R b/R/rrs.R index b3b5677..469dbae 100644 --- a/R/rrs.R +++ b/R/rrs.R @@ -46,7 +46,7 @@ #' fr1 <- ncfs[[1]] #' fr2 <- ncfs[[2]] #' -#' ## Comparison of two samples (single condition) "g1" +#' # Comparison of two samples (single condition) "g1" #' ## One gate (two markers) "CD4", "CD38" #' ## Log10 Transformation for both markers #' ## Remove cells with NA and Inf values diff --git a/cran-comments.md b/cran-comments.md index 3a8ab32..3d50a62 100644 --- a/cran-comments.md +++ b/cran-comments.md @@ -1,4 +1,9 @@ -## This is a new release +## This is the first resubmission + +* Actions taken regarding feedback from CRAN teams' auto-check service + * Reduced overall checktime by changing example in gating() by changing from \donttest{} to if (interactive()) {} + * Reduced overall checktime by streamlining the number of "[it] works" tests in testthat for gating(), lotrrs(), and rrs() + * Note about "Possibly mis-spelled words in DESCRIPTION" can be safely ignored ## Test environments * local OS X install, R 3.6.3 @@ -16,8 +21,15 @@ There was 1 NOTE: * Cytometry (3:57) * al (37:57) * et (37:54) + * immunologically (32:19) ## R CMD check results 0 errors | 0 warnings | 0 notes +* Duration + * local OS X install, R 3.6.3: 99 seconds + * win-builder, devel: 584 seconds (under 10 minutes) + * win-builder, oldrelease: 530 seconds + * win-builder, release: 620 seconds + ## Submitted by Maintainer diff --git a/dev/build.R b/dev/build.R index 6a18719..42d6d4d 100644 --- a/dev/build.R +++ b/dev/build.R @@ -24,7 +24,7 @@ use_test() test() # NAMESPACE -document() +devtools::document() install() # Check diff --git a/man/gating.Rd b/man/gating.Rd index b09a201..6143a9e 100644 --- a/man/gating.Rd +++ b/man/gating.Rd @@ -84,7 +84,7 @@ The p-value surface of the ratio of relative risk surfaces is estimated assuming Provides functionality for a correction for multiple testing. If \code{p_correct = "uncorrelated"}, then a conventional Bonferroni correction is calculated by dividing the \code{alpha} level by the number of gridded knots across the estimated surface. The default in the \code{\link[sparr]{risk}} function is a resolution of 128 x 128 or n = 16,384 knots and a custom resolution can be specified using the \code{resolution} argument within the \code{\link[sparr]{risk}} function. If \code{p_correct = "correlated"} (NOTE: May take a considerable amount of computation resources and time), then a Bonferroni correction that takes into account the spatial correlation of the surface is calculated within the internal \code{pval_correct} function. The \code{alpha} level is divided by the minimum number of knots that are not spatially correlated. The minimum number of knots that are not spatially correlated is computed by counting the knots that are a distance apart that exceeds the minimum distance of non-significant spatial correlation based on a correlogram using the \code{\link[pgirmess]{correlog}} function. If \code{p_correct = "none"} (the default), then the function does not account for multiple testing and uses the uncorrected \code{alpha} level. See the internal \code{pval_correct} function documentation for more details. } \examples{ -\donttest{ +if (interactive()) { # Use 'extdata' from the {flowWorkspaceData} package flowDataPath <- system.file("extdata", package = "flowWorkspaceData") fcsFiles <- list.files(pattern = "CytoTrol", flowDataPath, full = TRUE) diff --git a/tests/testthat/test-gating.R b/tests/testthat/test-gating.R index b4a68f7..047aab3 100644 --- a/tests/testthat/test-gating.R +++ b/tests/testthat/test-gating.R @@ -80,13 +80,13 @@ test_that("gating throws error with invalid arguments", { p_correct = "none") ) - expect_error( - gating(dat = fubar, - vars = c("log10_CD4", "log10_CD38", - "log10_CD8", "log10_CD3"), - n_condition = 2, - p_correct = "none") - ) + # expect_error( + # gating(dat = fubar, + # vars = c("log10_CD4", "log10_CD38", + # "log10_CD8", "log10_CD3"), + # n_condition = 2, + # p_correct = "none") + # ) # Non-binary third feature expect_error( @@ -167,53 +167,53 @@ test_that("gating works", { p_correct = "none") ) - expect_named( - gating(dat = obs_dat, - vars = c("log10_CD4", "log10_CD38", - "log10_CD8", "log10_CD3"), - n_condition = 2, - p_correct = "none") - ) - -# expect_named( -# gating(dat = obs_dat, -# vars = c("log10_CD4", "log10_CD38"), -# n_condition = 1, -# alpha = 0.1, -# p_correct = "none") -# ) -# -# expect_named( -# gating(dat = obs_dat, -# vars = c("log10_CD4", "log10_CD38"), -# n_condition = 1, -# alpha = 0.01, -# p_correct = "none") -# ) -# -# expect_named( -# gating(dat = obs_dat, -# vars = c("log10_CD4", "log10_CD38"), -# n_condition = 1, -# numerator = FALSE, -# p_correct = "none") -# ) -# # -# expect_named( -# gating(dat = obs_dat, -# vars = c("log10_CD4", "log10_CD38"), -# n_condition = 2, -# doplot = TRUE, -# rcols = c("green", "yellow", "purple"), -# p_correct = "none") -# ) -# -# expect_named( -# gating(dat = obs_dat, -# vars = c("log10_CD4", "log10_CD38"), -# n_condition = 1, -# resolution = 40, -# p_correct = "correlated") -# ) + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38", + # "log10_CD8", "log10_CD3"), + # n_condition = 2, + # p_correct = "none") + # ) + # + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38"), + # n_condition = 1, + # alpha = 0.1, + # p_correct = "none") + # ) + # + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38"), + # n_condition = 1, + # alpha = 0.01, + # p_correct = "none") + # ) + # + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38"), + # n_condition = 1, + # numerator = FALSE, + # p_correct = "none") + # ) + # + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38"), + # n_condition = 2, + # doplot = TRUE, + # rcols = c("green", "yellow", "purple"), + # p_correct = "none") + # ) + # + # expect_named( + # gating(dat = obs_dat, + # vars = c("log10_CD4", "log10_CD38"), + # n_condition = 1, + # resolution = 40, + # p_correct = "correlated") + # ) } ) diff --git a/tests/testthat/test-lotrrs.R b/tests/testthat/test-lotrrs.R index ab0c085..3007576 100644 --- a/tests/testthat/test-lotrrs.R +++ b/tests/testthat/test-lotrrs.R @@ -70,7 +70,6 @@ test_that("lotrrs throws error with invalid arguments", { p_correct = "none") ) - # Incorrectly specified alpha expect_error( lotrrs(dat = obs_dat, @@ -89,22 +88,22 @@ test_that("lotrrs throws error with invalid arguments", { test_that("lotrrs works", { - expect_named( - lotrrs(dat = obs_dat, - p_correct = "none") - ) + # expect_named( + # lotrrs(dat = obs_dat, + # p_correct = "none") + # ) expect_named( lotrrs(dat = obs_dat, p_correct = "uncorrelated") ) - expect_named( - lotrrs(dat = obs_dat, - resolution = 40, - p_correct = "correlated") - ) - + # expect_named( + # lotrrs(dat = obs_dat, + # resolution = 40, + # p_correct = "correlated") + # ) + # # expect_named( # lotrrs(dat = obs_dat, # alpha = 0.1, diff --git a/tests/testthat/test-rrs.R b/tests/testthat/test-rrs.R index 3074633..52f82f1 100644 --- a/tests/testthat/test-rrs.R +++ b/tests/testthat/test-rrs.R @@ -80,22 +80,22 @@ test_that("rrs throws error with invalid arguments", { test_that("rrs works", { - expect_named( - rrs(dat = obs_dat, - p_correct = "none") - ) + # expect_named( + # rrs(dat = obs_dat, + # p_correct = "none") + # ) expect_named( rrs(dat = obs_dat, p_correct = "uncorrelated") ) - expect_named( - rrs(dat = obs_dat, - resolution = 40, - p_correct = "correlated") - ) - + # expect_named( + # rrs(dat = obs_dat, + # resolution = 40, + # p_correct = "correlated") + # ) + # # expect_named( # rrs(dat = obs_dat, # alpha = 0.1,