optimal.block {OSAT}R Documentation

optimal.block

Description

Optimize a sample assingment setup by selecting from multiple candidate setup.

Usage

optimal.block(x, nSim = 100)

Arguments

x

A gExperimentSetup object.

nSim

Number of candidate setup created.

Details

Multiple (typically thousands of or more) sample assignment setups are first generated, based only on the list of specified blocking variable(s). Then, the optimal setup is chosen by selecting the setup of sample assignment (from the pool generated in blocking step) which minimizes the value of the objective function based on all variables considered.

Value

A gExperimentSetup object, after optimization.

See Also

optimal.shuffle

Examples

library("OSAT")
# data as an example
inPath <- system.file("extdata", package="OSAT")
pheno <- read.table(file.path(inPath, 'samples.txt'), header=TRUE, sep="\t")

## create object to hold sample information
gs <- setup.sample(pheno,  optimal=c("SampleType", "Race", "AgeGrp"), strata=c("SampleType") )
gs

gc <- setup.container(IlluminaBeadChip96Plate, 6, batch='plates')
gc

gSetup0 <- create.experiment.setup(sample=gs, container=gc)

g2 <- optimal.block(gSetup0, nSim=100)

[Package OSAT version 1.38.0 Index]