Description Usage Arguments Details Value See Also Examples
Optimize a sample assingment setup by selecting from multiple candidate setup.
1 | optimal.block(x, nSim = 100)
|
x |
A |
nSim |
Number of candidate setup created. |
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.
A gExperimentSetup
object, after optimization.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.