designit0.5.0 package

Blocking and Randomization for Experimental Design

accept_leftmost_improvement

Alternative acceptance function for multi-dimensional scores in which ...

accept_strict_improvement

Default acceptance function. Accept current score if and only if all e...

all_equal_df

Compare two data.frames.

assign_from_table

Distributes samples based on a sample sheet.

assign_in_order

Distributes samples in order.

assign_random

Assignment function which distributes samples randomly.

batch_container_from_table

Creates a BatchContainer from a table (data.frame /tibble::tibble ) co...

BatchContainer

R6 Class representing a batch container.

BatchContainerDimension

R6 Class representing a batch container dimension.

compile_possible_subgroup_allocation

Compile list of all possible ways to assign levels of the allocation v...

complete_random_shuffling

Reshuffle sample indices completely randomly

designit-package

designit: Blocking and Randomization for Experimental Design

dot-datatable.aware

Show that the package is designed to rely on data.table functionality

drop_order

Drop highest order interactions

extract_shuffle_params

Extract relevant parameters from a generic shuffle function output

find_possible_block_allocations

Internal function to generate possible subgroup combinations that add ...

first_score_only

Aggregation of scores: take first (primary) score only

form_homogeneous_subgroups

Form groups and subgroups of 'homogeneous' samples as defined by certa...

generate_terms

Generate terms.object (formula with attributes)

get_order

Get highest order interaction

L1_norm

Aggregation of scores: L1 norm

L2s_norm

Aggregation of scores: L2 norm squared

locations_table_from_dimensions

Create locations table from dimensions and exclude table

make_colnames

Make matrix column names unique.

mk_autoscale_function

Create a function that transforms a current (multi-dimensional) score ...

mk_constant_swapping_function

Create function to propose n pairwise swaps of samples on each call (n...

mk_dist_matrix

Internal helper function to set up an (n m) x (n m) pairwise distance ...

mk_exponentially_weighted_acceptance_func

Alternative acceptance function for multi-dimensional scores with expo...

mk_plate_scoring_functions

Create a list of scoring functions (one per plate) that quantify the s...

mk_simanneal_acceptance_func

Generate acceptance function for an optimization protocol based on sim...

mk_simanneal_temp_func

Create a temperature function that returns the annealing temperature a...

mk_subgroup_shuffling_function

Created a shuffling function that permutes samples within certain subg...

mk_swapping_function

Create function to propose swaps of samples on each call, either with ...

optimize_design

Generic optimizer that can be customized by user provided functions fo...

optimize_multi_plate_design

Convenience wrapper to optimize a typical multi-plate design

osat_score

Compute OSAT score for sample assignment.

osat_score_generator

Convenience wrapper for the OSAT score

pairwise_swapping

Proposes pairwise swap of samples on each call.

plot_plate

Plot plate layouts

random_score_variances

Estimate the variance of individual scores by a series of completely r...

report_scores

Helper function to print out one set of scores plus (if needed) aggreg...

sample_random_scores

Sample scores from a number of completely random sample permutations

shrink_mat

Shrinks a matrix with scores and adds an iteration column.

shuffle_grouped_data

Generate in one go a shuffling function that produces permutations wit...

shuffle_with_constraints

Shuffling proposal function with constraints.

shuffle_with_subgroup_formation

Compose shuffling function based on already available subgrouping and ...

simanneal_acceptance_prob

Acceptance probability for a new solution

sum_scores

Aggregation of scores: sum up all individual scores

update_batchcontainer

Updates a batch container by permuting samples according to a shufflin...

validate_samples

Validates sample data.frame.

validate_subgrouping_object

Validate subgroup object and stop with error message if not all requir...

worst_score

Aggregation of scores: take the maximum (i.e. worst score only)

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

  • Maintainer: Iakov I. Davydov
  • License: MIT + file LICENSE
  • Last published: 2024-03-21