Package: designit 0.5.0.9000

Iakov I. Davydov

designit: Blocking and Randomization for Experimental Design

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>).

Authors:Iakov I. Davydov [aut, cre, cph], Juliane Siebourg-Polster [aut, cph], Guido Steiner [aut, cph], Konrad Rudolph [ctb], Jitao David Zhang [aut, cph], Balazs Banfai [aut, cph], F. Hoffman-La Roche [cph, fnd]

designit_0.5.0.9000.tar.gz
designit_0.5.0.9000.zip(r-4.5)designit_0.5.0.9000.zip(r-4.4)designit_0.5.0.9000.zip(r-4.3)
designit_0.5.0.9000.tgz(r-4.4-any)designit_0.5.0.9000.tgz(r-4.3-any)
designit_0.5.0.9000.tar.gz(r-4.5-noble)designit_0.5.0.9000.tar.gz(r-4.4-noble)
designit_0.5.0.9000.tgz(r-4.4-emscripten)designit_0.5.0.9000.tgz(r-4.3-emscripten)
designit.pdf |designit.html
designit/json (API)
NEWS

# Install 'designit' in R:
install.packages('designit', repos = c('https://bedapub.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/bedapub/designit/issues

Datasets:

On CRAN:

design-of-experimentsrandomization

7.37 score 7 stars 24 scripts 532 downloads 32 exports 38 dependencies

Last updated 12 days agofrom:fb873c1c7c. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 11 2024
R-4.5-winOKNov 11 2024
R-4.5-linuxOKNov 11 2024
R-4.4-winOKNov 11 2024
R-4.4-macOKNov 11 2024
R-4.3-winOKNov 11 2024
R-4.3-macOKNov 11 2024

Exports:accept_leftmost_improvementassign_from_tableassign_in_orderassign_randombatch_container_from_tableBatchContainerBatchContainerDimensioncompile_possible_subgroup_allocationcomplete_random_shufflingdrop_orderfirst_score_onlyform_homogeneous_subgroupsgenerate_termsget_orderL1_normL2s_normmk_exponentially_weighted_acceptance_funcmk_plate_scoring_functionsmk_simanneal_acceptance_funcmk_simanneal_temp_funcmk_subgroup_shuffling_functionmk_swapping_functionoptimize_designoptimize_multi_plate_designosat_scoreosat_score_generatorplot_plateshuffle_grouped_datashuffle_with_constraintsshuffle_with_subgroup_formationsum_scoresworst_score

Dependencies:assertthatclicolorspacecpp11data.tabledplyrfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerrlangscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr

Basic example of using designit: plate layout with two factors

Rendered frombasic_examples.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-10-16
Started: 2022-10-13

Batch effects and false positives: a simulation study

Rendered fromfalse_positives.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-11-11
Started: 2024-10-16

designit: a flexible engine to generate experiment layouts

Rendered fromNCS22_talk.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2023-02-06

In-vivo study design

Rendered frominvivo_study_design.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

Nested dimension example

Rendered fromnested_dimensions_examples.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

Optimizer examples

Rendered fromoptimizer_examples.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

OSAT and scoring functions

Rendered fromosat.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-10-16
Started: 2022-10-13

Plate layouts

Rendered fromplate_layouts.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

Shuffling with constraints

Rendered fromshuffling_with_constraints.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

Using custom shuffle schedule

Rendered fromcustom_shuffle.Rmdusingknitr::rmarkdownon Nov 11 2024.

Last update: 2024-03-13
Started: 2022-10-13

Readme and manuals

Help Manual

Help pageTopics
Alternative acceptance function for multi-dimensional scores in which order (left to right, e.g. first to last) denotes relevance.accept_leftmost_improvement
Distributes samples based on a sample sheet.assign_from_table
Distributes samples in order.assign_in_order
Assignment function which distributes samples randomly.assign_random
Creates a BatchContainer from a table (data.frame/tibble::tibble) containing sample and location information.batch_container_from_table
R6 Class representing a batch container.BatchContainer
R6 Class representing a batch container dimension.BatchContainerDimension
Compile list of all possible ways to assign levels of the allocation variable to a given set of subgroupscompile_possible_subgroup_allocation
Reshuffle sample indices completely randomlycomplete_random_shuffling
Drop highest order interactionsdrop_order
Aggregation of scores: take first (primary) score onlyfirst_score_only
Form groups and subgroups of 'homogeneous' samples as defined by certain variables and size constraintsform_homogeneous_subgroups
Generate 'terms.object' (formula with attributes)generate_terms
Get highest order interactionget_order
A sample list from an in vivo experiment with multiple treatments and 2 strainsinvivo_study_samples
A treatment list together with additional constraints on the strain and sex of animalsinvivo_study_treatments
Aggregation of scores: L1 normL1_norm
Aggregation of scores: L2 norm squaredL2s_norm
Create locations table from dimensions and exclude tablelocations_table_from_dimensions
Subject sample list with group and time plus controlslongitudinal_subject_samples
Alternative acceptance function for multi-dimensional scores with exponentially downweighted score improvements from left to rightmk_exponentially_weighted_acceptance_func
Create a list of scoring functions (one per plate) that quantify the spatially homogeneous distribution of conditions across the platemk_plate_scoring_functions
Generate acceptance function for an optimization protocol based on simulated annealingmk_simanneal_acceptance_func
Create a temperature function that returns the annealing temperature at a given step (iteration)mk_simanneal_temp_func
Created a shuffling function that permutes samples within certain subgroups of the container locationsmk_subgroup_shuffling_function
Create function to propose swaps of samples on each call, either with a constant number of swaps or following a user defined protocolmk_swapping_function
Unbalanced treatment and time sample listmulti_trt_day_samples
Generic optimizer that can be customized by user provided functions for generating shuffles and progressing towards the minimal scoreoptimize_design
Convenience wrapper to optimize a typical multi-plate designoptimize_multi_plate_design
Compute OSAT score for sample assignment.osat_score
Convenience wrapper for the OSAT scoreosat_score_generator
Example dataset with a plate effectplate_effect_example
Plot plate layoutsplot_plate
Generate in one go a shuffling function that produces permutations with specific constraints on multiple sample variables and group sizes fitting one specific allocation variableshuffle_grouped_data
Shuffling proposal function with constraints.shuffle_with_constraints
Compose shuffling function based on already available subgrouping and allocation informationshuffle_with_subgroup_formation
Aggregation of scores: sum up all individual scoressum_scores
Validates sample data.frame.validate_samples
Aggregation of scores: take the maximum (i.e. worst score only)worst_score