Skip to content

Commit

Permalink
Preparation for CRAN release
Browse files Browse the repository at this point in the history
Reduced the number of redunant tests in testthat (commented out, not deleted)

Updated language in vignette.Rmd to clarify conditions, variables, and features

Removed vignette_cache and set cache = FALSE to reduce size of package

Initial commit of cran-comments.md (and .Rbuildignore entry)

Initial commit of NEWS.md

Moved /figures into /man so README.md can read them during build

Moved gator.png to /dev

Updated date and version number (0.1.0)
  • Loading branch information
Ian Buller, PhD, MA committed Oct 28, 2020
1 parent 4807a2e commit 3dd10f8
Show file tree
Hide file tree
Showing 17 changed files with 344 additions and 293 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
^LICENSE\.md$
^.*\.Rproj$
^\.Rproj\.user$
^cran-comments\.md$
^vignette\.Rmd$
^dev$
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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.9000
Date: 2020-10-27
Version: 0.1.0
Date: 2020-10-28
Authors@R:
c(person(given = "Ian D.",
family = "Buller",
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# gateR (development version)
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
gateR: Statistical Gating Application for Flow and Mass Cytometry Analysis via Spatial Kernel Density Estimation <img src="dev/figures/gateR.png" width="120" align="right" />
gateR: Statistical Gating Application for Flow and Mass Cytometry Analysis via Spatial Kernel Density Estimation <img src="man/figures/gateR.png" width="120" align="right" />
===================================================

<h2 id="overview">
Expand Down Expand Up @@ -176,11 +176,11 @@ graphics::legend("topright",
bty = "n")
```

![](dev/figures/gate1.png)
![](man/figures/gate1.png)

![](dev/figures/gate2.png)
![](man/figures/gate2.png)

![](dev/figures/postgate.png)
![](man/figures/postgate.png)

```r
# ----------------------------- #
Expand Down
23 changes: 23 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## This is a new release

## Test environments
* local OS X install, R 3.6.3
* win-builder, (devel, oldrelease, release)
* Rhub
* Fedora Linux, R-devel, clang, gfortran
* Ubuntu Linux 16.04 LTS, R-release, GCC
* Windows Server 2008 R2 SP1, R-devel, 32⁄64 bit
* Debian Linux, R-devel, GCC

There was 1 NOTE:

* Possibly mis-spelled words in DESCRIPTION:
* Bithell (38:63, 40:24)
* Cytometry (3:57)
* al (37:57)
* et (37:54)

## R CMD check results
0 errors | 0 warnings | 0 notes

## Submitted by Maintainer
7 changes: 6 additions & 1 deletion dev/build.R
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,16 @@ usethis::use_build_ignore(c("build"))
usethis::use_build_ignore(c("figures"))

# rhub
rhub::validate_email()
devtools::check_rhub()
rhub::check_for_cran()

# Check on windows
devtools::check_win_devel()
devtools::check_win_oldrelease()
devtools::check_win_release()

# Release to CRAN
#devtools::release()

# Example in README
# ------------------ #
Expand Down
File renamed without changes
2 changes: 1 addition & 1 deletion dev/hexsticker_gateR.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
library(hexSticker)

# Image file
path_image <- "./man/figures/gator.png"
path_image <- "./dev/gator.png"

# Create hexSticker
## the alligator palette https://www.color-hex.com/color-palette/33955
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
120 changes: 60 additions & 60 deletions tests/testthat/test-gating.R
Original file line number Diff line number Diff line change
Expand Up @@ -138,26 +138,26 @@ test_that("gating throws error with invalid arguments", {

test_that("gating works", {

expect_named(
gating(dat = obs_dat,
vars = c("log10_CD4", "log10_CD38"),
n_condition = 1,
p_correct = "none")
)

expect_named(
gating(dat = obs_dat,
vars = c("log10_CD4", "log10_CD38"),
n_condition = 2,
p_correct = "none")
)

expect_named(
gating(dat = obs_dat,
vars = c("log10_CD4", "log10_CD38"),
n_condition = 1,
p_correct = "uncorrelated")
)
# expect_named(
# gating(dat = obs_dat,
# vars = c("log10_CD4", "log10_CD38"),
# n_condition = 1,
# p_correct = "none")
# )
#
# expect_named(
# gating(dat = obs_dat,
# vars = c("log10_CD4", "log10_CD38"),
# n_condition = 2,
# p_correct = "none")
# )
#
# expect_named(
# gating(dat = obs_dat,
# vars = c("log10_CD4", "log10_CD38"),
# n_condition = 1,
# p_correct = "uncorrelated")
# )

expect_named(
gating(dat = obs_dat,
Expand All @@ -175,45 +175,45 @@ test_that("gating works", {
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"),
# 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")
# )
}
)
37 changes: 25 additions & 12 deletions tests/testthat/test-lotrrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,30 @@ test_that("lotrrs works", {
p_correct = "correlated")
)

expect_named(
lotrrs(dat = obs_dat,
alpha = 0.01,
p_correct = "none")
)

expect_named(
lotrrs(dat = obs_dat,
doplot = TRUE,
rcols = c("green", "yellow", "purple"),
p_correct = "none")
)
# expect_named(
# lotrrs(dat = obs_dat,
# alpha = 0.1,
# p_correct = "none")
# )
#
# expect_named(
# lotrrs(dat = obs_dat,
# alpha = 0.01,
# p_correct = "none")
# )
#
#
# expect_named(
# lotrrs(dat = obs_dat,
# doplot = TRUE,
# p_correct = "none")
# )
#
# expect_named(
# lotrrs(dat = obs_dat,
# doplot = TRUE,
# rcols = c("green", "yellow", "purple"),
# p_correct = "none")
# )
}
)
48 changes: 24 additions & 24 deletions tests/testthat/test-rrs.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,29 +96,29 @@ test_that("rrs works", {
p_correct = "correlated")
)

expect_named(
rrs(dat = obs_dat,
alpha = 0.1,
p_correct = "none")
)

expect_named(
rrs(dat = obs_dat,
alpha = 0.01,
p_correct = "none")
)

expect_named(
rrs(dat = obs_dat,
doplot = TRUE,
p_correct = "none")
)

expect_named(
rrs(dat = obs_dat,
doplot = TRUE,
rcols = c("green", "yellow", "purple"),
p_correct = "none")
)
# expect_named(
# rrs(dat = obs_dat,
# alpha = 0.1,
# p_correct = "none")
# )
#
# expect_named(
# rrs(dat = obs_dat,
# alpha = 0.01,
# p_correct = "none")
# )
#
# expect_named(
# rrs(dat = obs_dat,
# doplot = TRUE,
# p_correct = "none")
# )
#
# expect_named(
# rrs(dat = obs_dat,
# doplot = TRUE,
# rcols = c("green", "yellow", "purple"),
# p_correct = "none")
# )
}
)
Loading

0 comments on commit 3dd10f8

Please sign in to comment.