Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

things to fix before resubmitting to CRAN #44

Merged
merged 18 commits into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,27 @@ Authors@R: c(
role = "ctb",
email = "[email protected]",
comment = c(ORCID = "0000-0002-9866-7051")),
person(given = "Jitao David",
family = "Zhang",
role = c("aut", "cph"),
email = "[email protected]",
comment = c(ORCID="0000-0002-3085-0909")),
person(given = "Balazs",
family = "Banfai",
role = c("aut", "cph"),
email = "[email protected]",
comment = c(ORCID = "0000-0003-0422-7977")),
person(given = "F. Hoffman-La Roche", role = c("cph", "fnd")))
Description:
Reducing batch effect by intelligently assigning samples to batches.
Batch-effect have a strong influence in data analysis, especially when
samples-to-batches assignment is coinciding with contrast groups.
By defining your batch container and a scoring function reflecting
the contrasts, you can assign samples in such a way that the potential
batch-effect has minimal effect on the comparison of interest.
Intelligently assign samples to batches in order to reduce batch effects.
Batch effects can have a significant impact on data analysis, especially
when the assignment of samples to batches coincides with the contrast
groups being studied. By defining a batch container and a scoring function
that reflects the contrasts, this package allows users to assign samples in
a way that minimizes the potential impact of batch effects on the
comparison of interest. Among other functionality, we provide an
implementation for OSAT score by Yan et al. (2012,
<doi:10.1186/1471-2164-13-689>).
License: MIT + file LICENSE
URL: https://bedapub.github.io/designit/, https://github.com/BEDApub/designit/
BugReports: https://github.com/BEDApub/designit/issues
Expand All @@ -51,7 +59,6 @@ Imports:
assertthat,
stringr,
R6,
ineq,
data.table,
stats
Suggests:
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
YEAR: 2022
COPYRIGHT HOLDER: Iakov I. Davydov, Juliane Siebourg-Polster, Guido Steiner, Balazs Banfai, F. Hoffman-La Roche
YEAR: 2024
COPYRIGHT HOLDER: designit authors
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2022 Iakov I. Davydov, Juliane Siebourg-Polster, Guido Steiner, Balazs Banfai, F. Hoffman-La Roche
Copyright (c) 2024 designit authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# designit (development version)

* remove magrittr, glue, checkmate, forcats, and tidyselect dependencies
* remove magrittr, glue, checkmate, forcats, ineq, and tidyselect dependencies
* minimum R version 4.1.0 (for the native pipe and lambda functions)
* remove several unexported functions
* BatchContainer trace saves the random seed as well as RNG kind
* preparing for CRAN resumbission

# designit 0.4.1

Expand Down
11 changes: 9 additions & 2 deletions R/optimize.R
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,16 @@ optimize_design <- function(batch_container, samples = NULL,
start_assignment_vec = list(batch_container$assignment)
)

# based on https://stat.ethz.ch/pipermail/r-help/2007-September/141717.html
if (!exists(".Random.seed")) stats::runif(1)
# saving the current random seed for reproducibility
if (!exists(".Random.seed", .GlobalEnv)) {
# Sets the default random number generator and initializes
# .Random.seed in the global environment.
# This doesn't affect the way random seed would have been set in
# downstream functions such as `sample()`.
set.seed(NULL)
}
trace$seed <- list(.Random.seed)
trace$rng_kind <- list(RNGkind())

if (is.null(samples)) {
assertthat::assert_that(batch_container$has_samples,
Expand Down
2 changes: 1 addition & 1 deletion R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ plot_design <- function(.tbl, ..., .color, .alpha = NULL) {
#' .color = Treatment, .alpha = Timepoint
#' )
#'
#' \dontrun{
#' \donttest{
#' plot_plate(bc$get_samples(),
#' plate = plate, column = column, row = row,
#' .color = Treatment, .pattern = Timepoint
Expand Down
Loading
Loading